diff --git a/README.md b/README.md index 10d09b1..2680823 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ The existing installation has not been changed by creating this repo. ## Start ```sh -git clone --branch v0.1.1 https://git.fiwlabs.dev/fiwdev/Fiw-Gentoo-Dots.git +git clone --branch v0.1.2 https://git.fiwlabs.dev/fiwdev/Fiw-Gentoo-Dots.git cd Fiw-Gentoo-Dots ./install ``` @@ -49,7 +49,8 @@ a final preview. Enter saves without applying. `r` runs the full restore; `v` enables selected services and `b` deploys the selected bootloader. `e` updates configs while preserving local edits; `p` opens pending changes for a diff and individual acceptance. `u` opens config backups for preview -and restoration. Apply actions finish +and restoration. `n` saves a [named device selection](docs/devices.md), available +alongside Stock and Fiw's Ryzen on the preset screen. Apply actions finish with a [combined report](docs/reports.md) of outcomes and remaining setup. Linux amd64 includes a verified prebuilt TUI; Git and Python 3.11+ are enough. Go 1.24+ is the source fallback for changed frontend code or other platforms. @@ -117,6 +118,8 @@ Fish, Kitty and Neovim are usable without KDE or KWin. Fastfetch keeps the tree layout and purple colours with the built-in Gentoo logo. MangoHud and Vesktop preferences are included; browser profiles, chat sessions and account data are excluded. App autostart is a separate optional selection. +Neovim's Catppuccin and VS Code's ayu MiDas themes are bundled with their +respective optional configs, so their styling is available on fresh devices. Ark, Gwenview and Prism preferences are individually optional too; see [app configs and requirements](docs/app-configs.md). Each config's required packages appear in the final preview without changing package selections. @@ -152,6 +155,8 @@ docs/ Setup, decisions and asset credits ```sh python3 tools/capture.py # recapture only the explicit allowlist +python3 tools/capture.py --config kde-shortcuts # refresh only shortcuts +python3 tools/capture.py --config kitty neovim # refresh only these apps python3 tools/check-private.py python3 -m unittest discover -s tests go test ./... @@ -162,6 +167,7 @@ service presets enable audio, networking, Bluetooth and power profiles for the next boot/login. See [setup](docs/setup.md) and the [helper list](docs/scripts.md). Review captures before committing. `local/` and built binaries are ignored. +See [selective recapture](docs/capture.md) for supported selections and pinned assets. This repo starts with fresh history. Third-party theme/cursor assets retain their licence notices; overlay ebuilds retain their original notices. diff --git a/VERSION b/VERSION index 17e51c3..d917d3e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.1 +0.1.2 diff --git a/assets/bin/SHA256SUMS b/assets/bin/SHA256SUMS index ef1f8c3..3d9fc62 100644 --- a/assets/bin/SHA256SUMS +++ b/assets/bin/SHA256SUMS @@ -1 +1 @@ -a14492188be4cbf1bfdda2f793527b07c0168b2e0d36b7f268922a5cb7b0c08c fiw-dots-linux-amd64.gz +98b963755ac7137176b07fa9a94cd340acd1f65d4de9f8d173aea7ea02862548 fiw-dots-linux-amd64.gz diff --git a/assets/bin/fiw-dots-linux-amd64.gz b/assets/bin/fiw-dots-linux-amd64.gz index 6c7b2cc..55a1f90 100644 Binary files a/assets/bin/fiw-dots-linux-amd64.gz and b/assets/bin/fiw-dots-linux-amd64.gz differ diff --git a/assets/bin/tui.json b/assets/bin/tui.json index 29d7c63..93e5ebb 100644 --- a/assets/bin/tui.json +++ b/assets/bin/tui.json @@ -1,12 +1,12 @@ { - "version": "0.1.1", - "source_sha256": "92a1dc2a662d9ec71c0abec3b96078662268ab16f358be6d2617bbcc4baaf324", + "version": "0.1.2", + "source_sha256": "fec416b33a93e3de28faf388d69d6b86c39296715a1a87a6ed32d6fb51c4a36c", "binaries": { "linux-amd64": { "file": "fiw-dots-linux-amd64.gz", - "sha256": "6da013a88843912b105f1e2a956cd094b22cfa853b5d9eeed3b2430c7f7ec798", - "gzip_sha256": "a14492188be4cbf1bfdda2f793527b07c0168b2e0d36b7f268922a5cb7b0c08c", - "size": 3559586 + "sha256": "c2856c93808c16c1d9003891beffd368e0c80b7ca965f4ca4e8849912fcfedaa", + "gzip_sha256": "98b963755ac7137176b07fa9a94cd340acd1f65d4de9f8d173aea7ea02862548", + "size": 3567778 } } } diff --git a/assets/editor-themes.json b/assets/editor-themes.json new file mode 100644 index 0000000..2853dfe --- /dev/null +++ b/assets/editor-themes.json @@ -0,0 +1,147 @@ +{ + "catppuccin": { + "upstream": "https://github.com/catppuccin/nvim", + "commit": "edefef779ab08ce1a4a404713e3012b0d202bd35", + "root": "configs/neovim/files/.config/nvim/pack/themes/start/catppuccin", + "license": "MIT", + "note": "Runtime colors, lua, after and original LICENSE.md; development files omitted.", + "sha256": { + "LICENSE.md": "814096d2c34cc216c624738a49356f32b7237733b4f7edb0685f4e50ef5074ba", + "after/queries/css/highlights.scm": "9ef978da67df48bd10f63a7e16a3a94786a52fad8623fde6abeb60c15711de9c", + "after/queries/javascript/highlights.scm": "db58666e2f5bd6e4198c600976c4a663a9bcc98b7f971d9e317ea2378d204d0d", + "after/queries/typescript/highlights.scm": "db58666e2f5bd6e4198c600976c4a663a9bcc98b7f971d9e317ea2378d204d0d", + "colors/catppuccin-frappe.lua": "d0b770fdea4ac6f7cf691c4fb7a66d231fc4c135de8fc91cf746d92bc7f7d4bf", + "colors/catppuccin-latte.lua": "90d0000a70dd909847cf453c779eb1175540a3a4a58e1aa2cce85a2b18f86ec4", + "colors/catppuccin-macchiato.lua": "d5f0982bfebce1414a44dcff86167504c3a806d0a69fa335aaa719a80de2269e", + "colors/catppuccin-mocha.lua": "74fb39acf4d305f83bc6bda410f131efb7af3aa3ce386f35ba893e1ad0f47f2c", + "colors/catppuccin-nvim.vim": "d3155fd94ee3859bf085ee68e3e169d9990cfd3d5a96384128b774a15cf20dba", + "colors/catppuccin.lua": "1e1018f7bcdf93d0bb0caedb7ed78968415b4034d9c6a7a677e97d93a33d262c", + "lua/barbecue/theme/catppuccin-frappe.lua": "42bcd5254df562dce48c50abd4064fb47b43f96b87fae770a40be25b8a0999b2", + "lua/barbecue/theme/catppuccin-latte.lua": "b8fe0214831c704a7e6a23a449a439db55bd8763bc3d97574b3f5b1d9001d40e", + "lua/barbecue/theme/catppuccin-macchiato.lua": "21d784621c89fee7f65c1e0487b53cd4714657c53ec6cc8b58a34d32eb6f4b06", + "lua/barbecue/theme/catppuccin-mocha.lua": "0cc2c282aea656e569730e3e46109385cfdb5c134b05f0b9d31fcf6a1881ccb3", + "lua/barbecue/theme/catppuccin-nvim.lua": "83945477aa880778ff313fe8fc57d486886c53629809471a27a2d8253feb400e", + "lua/catppuccin/groups/editor.lua": "34ee0baf52cff0bdc9fe667b80ff92f14bd8664695e96bcea5857c5ac36cf018", + "lua/catppuccin/groups/integrations/aerial.lua": "cb2599cbeb02012a01ff86f153ba71a6512d179a56356f9e752792faaad50331", + "lua/catppuccin/groups/integrations/alpha.lua": "20ffa273938f47611c54af9464da4fcd75e0cf19c9f64e5e57541c662b276f1e", + "lua/catppuccin/groups/integrations/artio.lua": "402c306b0bb6ecc8e65c77c90e7b0d7b883fb5a7f14c0e8299defdfbac9cb93f", + "lua/catppuccin/groups/integrations/avante.lua": "d035a3f0ced7e5a585999d83947ec27b8b2720130d1056d8c5ca13173db97fa7", + "lua/catppuccin/groups/integrations/barbar.lua": "a8c74328e4cd4c1cfc8fb28fd57e986fec4622b822b91a854d98d53b134ec5ca", + "lua/catppuccin/groups/integrations/beacon.lua": "22af2a39673f000c34d1a2151e0f11722e3834b74e9b07f9a79a791b5cdbf2e9", + "lua/catppuccin/groups/integrations/blink_cmp.lua": "8bedb10753b941cfa08514f81d7483e1688faf98b446f2a4ee01aa5645836ecc", + "lua/catppuccin/groups/integrations/blink_indent.lua": "2baacb882dad63b237fb13d4c80f7af5a857167475d0fab3aba2eb48d31d3334", + "lua/catppuccin/groups/integrations/blink_pairs.lua": "48b261f4437d99c39b307cdf81bc2b7606d1be378717cd8e4ba8cbfc6267e14f", + "lua/catppuccin/groups/integrations/buffon.lua": "376cd4344432dd65c3471863ba91a26530a31b064e3e1a53510e3c3c60374e03", + "lua/catppuccin/groups/integrations/cmp.lua": "d2aeff85075583e8427c0e4ddbe4463c1f3e31bd3435603fb6dc0efca79e3cd7", + "lua/catppuccin/groups/integrations/coc_nvim.lua": "19e3ae3a57be79b55d6ea361f40c47acc3bf759d13aaac775881727ae6d3823a", + "lua/catppuccin/groups/integrations/colorful_winsep.lua": "150e5862f68bf758eec4caf7a8e879afae8d7e8919d3888620c5fb2863d3f0e4", + "lua/catppuccin/groups/integrations/copilot_vim.lua": "97fb547d540e7a6bfb151472feac9ceb4f8ac476e41a1b2edb13a9a022381f07", + "lua/catppuccin/groups/integrations/dadbod_ui.lua": "039b52e1a60cf50b6c409a54dcfcb014d6b5e8630a04e26741d9f30bd31caa81", + "lua/catppuccin/groups/integrations/dap.lua": "3bce98869a5cf1dc74b764a489ebda0a0a2dcae74601beaa4b1b6089aa5ec69e", + "lua/catppuccin/groups/integrations/dap_ui.lua": "f85c73431892360006cd83203e261a1047101b4865268092878d331d488b450b", + "lua/catppuccin/groups/integrations/dashboard.lua": "830ce29d174ed6b97e0a4371002f62898639ce40a6705e88e92e496c80b78403", + "lua/catppuccin/groups/integrations/diffview.lua": "9331d113de7cb5f29bd3bb7b968c0c3d25e985aee67031a47c6efeff36ea3697", + "lua/catppuccin/groups/integrations/dropbar.lua": "1ecd99800619649aabb821070a909de0179a71da928d9db6352b183ef2c0835b", + "lua/catppuccin/groups/integrations/fern.lua": "8bb40443fb4894cc387eed3774909e00d829c03817432200b01983a5bb557935", + "lua/catppuccin/groups/integrations/fidget.lua": "61dde6fcfff3f7a28c99cae55ca073485136519c644bf4f72a0be37a8673e6bd", + "lua/catppuccin/groups/integrations/flash.lua": "1655696967541d4affece5542d751e5c75f8905c3a57d31df17b7947a269a601", + "lua/catppuccin/groups/integrations/fzf.lua": "15e3baceb760257106fd2eda566ee0c6264f94647d2f81ff3ee18f22db32f66c", + "lua/catppuccin/groups/integrations/gitgraph.lua": "8e48914515cb256d4c2739837f081956285ef045f8d5a774f53a56341ed673d0", + "lua/catppuccin/groups/integrations/gitgutter.lua": "65c6addaa60723ebbac45b0fc3d9ea01826b31c1f466a96b10b6d169c5c5a2a6", + "lua/catppuccin/groups/integrations/gitsigns.lua": "a9d6bbce752198a2dd4f4fae8fab8896bb84dd5ae7c03d1b09e919df1e0d0e23", + "lua/catppuccin/groups/integrations/grug_far.lua": "09f1e23be01d7e9175638e62387f42f0f928f1c82f69f090b58055eb9f674e52", + "lua/catppuccin/groups/integrations/harpoon.lua": "555387b4a0de62be54264e2adc438cf65ab5509fe0eaee7313306a82debc12ba", + "lua/catppuccin/groups/integrations/headlines.lua": "10f01ab32094733f09dda3c5f7a0effbc57b5e5b995d827899e88d53bb53ca48", + "lua/catppuccin/groups/integrations/hop.lua": "18a9568ca191cf4b9f9f77113d09c101d4f31b7c456ae0da7c0b47068f96b8bf", + "lua/catppuccin/groups/integrations/illuminate.lua": "d886f4d5275849101da9bacdbb4fc9180c2f658251694c63dc16c7bc50fbfcce", + "lua/catppuccin/groups/integrations/indent_blankline.lua": "0c0d72ea4117dc9ca2ecebbd1edb31111521d978a72dc8a93ca2df2cab931d11", + "lua/catppuccin/groups/integrations/leap.lua": "bb972bc3e7249a24a6a9023683070f1af4617bab3e32109621b41218655c6352", + "lua/catppuccin/groups/integrations/lightspeed.lua": "68f3239d64c6d3bd244c03973ff1b80643d9ca0545f8619e037cf6813fb44752", + "lua/catppuccin/groups/integrations/lir.lua": "bd386a9559d87e503a90348ec0dbb4351516c39a58c1eeb97204e33370fba14e", + "lua/catppuccin/groups/integrations/lsp_saga.lua": "eae83c1941bb7b90e1bfb0ac1db5aa130e2c9ada55124175c14b6cb9e8f4b819", + "lua/catppuccin/groups/integrations/lsp_trouble.lua": "7dff289346e6c0e6d82823b4b1ff55f0e7205a109c80f93cf1d74b4c774ec485", + "lua/catppuccin/groups/integrations/markview.lua": "ad1260c16e1b8913e4fb23372c4551d7bfeaa872cd7649adb0c99b71c11f6b14", + "lua/catppuccin/groups/integrations/mason.lua": "9b43638900613003456c515689c80f0d18cfd53daf632e103a21a194c7526277", + "lua/catppuccin/groups/integrations/mini.lua": "b44ea384e1bd8631b86717c6d45dc306abbf3154ab155e6d92a89ffac5bd1d7e", + "lua/catppuccin/groups/integrations/navic.lua": "975b5f57fc26688bf950f10938ac7d9a71c3632d22ffe14c261fc53ca9a1313e", + "lua/catppuccin/groups/integrations/neogit.lua": "31793ba38044ed119d392e03c3b62225400f4a38e6f1d9aad9e6adc0cdf5a67b", + "lua/catppuccin/groups/integrations/neotest.lua": "3f923cc1746f153b1c7ea8522b85cbf2a2e383c1d1f6e75abe2e2d7bc14b858a", + "lua/catppuccin/groups/integrations/neotree.lua": "26a7c4b63f954b4d7241adf4ef6b5ede9d52a34447ebf9bec421292bdcdbfb97", + "lua/catppuccin/groups/integrations/noice.lua": "582c9ecbe0aa3156bc22f9a76d1c160feea0ee895732c43c29552b3c4284028f", + "lua/catppuccin/groups/integrations/notifier.lua": "308faefafbd20d211f4c10a594bebaa3ed4c6c3e904b9eac99bf0fa08c23e36d", + "lua/catppuccin/groups/integrations/notify.lua": "753dd004bceeda176ca14798e369a7f214fbfd78258fb1e52d586d5f2770f4b2", + "lua/catppuccin/groups/integrations/nvim_surround.lua": "eb7ee6e25095af66b95fcd4edb0da68533bbcde73a032c8dcd94a8b80b17a94b", + "lua/catppuccin/groups/integrations/nvimtree.lua": "9fd02398db64403160a0dd74efb312f07c02a9e16780d33057f975eda0017d4f", + "lua/catppuccin/groups/integrations/octo.lua": "aa5e6cd0c0d8212c8bae0552caf3a585cb23694e97f693318b87331a0130b708", + "lua/catppuccin/groups/integrations/overseer.lua": "92bc318a88e5defdb2bcba933f259f15a2110777c7e4369baef02e30631c794a", + "lua/catppuccin/groups/integrations/pounce.lua": "9cea987d67ed8be8b96a44ad033aa891db28e2efd071969f73c1729fed7cddc4", + "lua/catppuccin/groups/integrations/rainbow_delimiters.lua": "1a62382dc80d7229beb0b3856fc398c2cfca7966556540694f6359e1ba4279a1", + "lua/catppuccin/groups/integrations/render_markdown.lua": "214d1d388e3b9042cae9d1115c7c26b443a1914fab64eed1f5a336c3c31fa37e", + "lua/catppuccin/groups/integrations/sandwich.lua": "ae4d4dedf4bd8e28e98055b02ef2f45d3a4386314028399142805d6d8fffba1e", + "lua/catppuccin/groups/integrations/signify.lua": "b614ae4abfd8db355c0b4be5d35d97eb07b46f20705962c4c086024bf0c5581b", + "lua/catppuccin/groups/integrations/snacks.lua": "9d505961e771340009d4d2f8727d6e4ad0d210db35860d48c4c1a310f3e1fcdf", + "lua/catppuccin/groups/integrations/symbols_outline.lua": "f23afaea70c8af25af5cc3e484b61f0addcc223612119dc06f82ed22d4e60895", + "lua/catppuccin/groups/integrations/telekasten.lua": "3ee8c1253c232c9541f932c07fc14164371d10248278378b5a2a37f1b9f83471", + "lua/catppuccin/groups/integrations/telescope.lua": "92f86988ac114c2b8bc985df034223306c486b1998cf8b829f35bc131f55568d", + "lua/catppuccin/groups/integrations/treesitter_context.lua": "e34887fc9eb755d2b2a205c650dac452bcd626777d58060fd863b8a3501a8fd9", + "lua/catppuccin/groups/integrations/ts_rainbow.lua": "14c47153066db7402dd8746aa1f220d13c05a6851f5baf60b883238bec8a542f", + "lua/catppuccin/groups/integrations/ts_rainbow2.lua": "0653536e22b227b80cb91b5019382cb088436c0aaf20ee7cb12f38263c47d184", + "lua/catppuccin/groups/integrations/ufo.lua": "8defc9c1cda22e12a6159c9d5ef877791395d503b46f3f31598bac89ced44a67", + "lua/catppuccin/groups/integrations/vim_sneak.lua": "e9bbfa98082602cd3ad5dac35b82599004b843810d2630c6ba9a061a99b4abf3", + "lua/catppuccin/groups/integrations/vimwiki.lua": "74c4368d697672c7785b7067e3f0c4295820e7bd26bfa6270c64e0f5e0d79706", + "lua/catppuccin/groups/integrations/which_key.lua": "231cfd466f8ad2daf9924bf4fe51a8f511e755bbc99bc093e156b40f4143ffb5", + "lua/catppuccin/groups/integrations/window_picker.lua": "937409a7c27fbf684b16bb7cc9f70873883a81c8d27c34c36414e91dbc566be8", + "lua/catppuccin/groups/lsp.lua": "9652febc3ed5114357f264b699d1a3ee820f05a781654674518b884ea9618d4c", + "lua/catppuccin/groups/semantic_tokens.lua": "ffcda7ae73b7ce6220a44bf43d013aea2be26c4870d0fd76a7beaf558afd60fd", + "lua/catppuccin/groups/syntax.lua": "7f1d30a72e2dca94a38ab35aff861953082c8012a41217abf349c1799f0b989c", + "lua/catppuccin/groups/terminal.lua": "2625a84419e9001a93256d7cd1bb1279d62c6a8a29c1ba2c05718b213801ee71", + "lua/catppuccin/groups/treesitter.lua": "5b5b0ca4da48f0650d9ec3866fd6b0805526dfc26c7fb88d5dff6a1752d428a0", + "lua/catppuccin/init.lua": "967b784814cfe5bea69a32b0c7d582f57485281290fc83faaa3a1defb2a7cfec", + "lua/catppuccin/lib/compiler.lua": "596f6331c052fec9999b8ef59c3159eba4bc5dfb40c4ca9c1c8c6b512c953161", + "lua/catppuccin/lib/detect_integrations.lua": "3bc529be585cd3c2dbffbc03d08fce8e209fa2eb06d27846d411c9a621c8a6e7", + "lua/catppuccin/lib/hashing.lua": "16a43b210468c5b37bd472036e776c110dba472be2cbcb0cf7d87368a7ac01a7", + "lua/catppuccin/lib/highlighter.lua": "03f3e558454d7e875fb9c9d157d7adc31999b168cf2ad73e2d974831baef482d", + "lua/catppuccin/lib/hsluv.lua": "d6835861b08b504e1c928d129adc2b7005a6553c2ed3207ec73e7c05909f6671", + "lua/catppuccin/lib/mapper.lua": "35993d791f42451b2f51d8eba03b28a5083b92585ea9f179c0dd38ad9419cc96", + "lua/catppuccin/palettes/frappe.lua": "9c07fdf3dda5bea178c0d7d9d7c7c1902517aeb56d924888935c51520bfa0e04", + "lua/catppuccin/palettes/init.lua": "8a3bf0ac9f2b9ff0f6f77f904d593e7da6b6b6132e93b8e824b4c20dcc0f6323", + "lua/catppuccin/palettes/latte.lua": "77972e16f8e73209e4a493469eddcc7532d5a9c767f446646ebab2736d125ab1", + "lua/catppuccin/palettes/macchiato.lua": "c7fcca540b7216137dc02e434f5b735332ccd30be8a2f4199237664acefcca66", + "lua/catppuccin/palettes/mocha.lua": "28963db88a817fb69a658c9859b2638e18d1175423e3d82df747b9a10660274c", + "lua/catppuccin/special/bufferline.lua": "56d7ac16d4f20580a288095bf6a4fa662f1334ffaa3c1f292576d8841da53340", + "lua/catppuccin/special/feline.lua": "30ce5edb9a2bfe18afe6243dee3e674003853c0cbc831ea0fc35825f5523a789", + "lua/catppuccin/types.lua": "27d70ce2a5e910b24a7b703647218c9066985928ad8c7a13d3c33bb5d6cd2558", + "lua/catppuccin/utils/barbecue.lua": "a967d799a795320b4ffcb33509d561900a50c352aae8d9fa356110b117b77530", + "lua/catppuccin/utils/colors.lua": "ce2ca2fd987bcaca257cc279b2df1c3b0ba484158e05ff3b8ae1f6a5ed4e6ae3", + "lua/catppuccin/utils/integration_mappings.lua": "38bdeb2cf7f7ca82a247b2a00da3560c2f855028b1c3394802b09414f3f41774", + "lua/catppuccin/utils/lualine.lua": "232ff22bbf79fff54af9395700a77ea45539a701a7d31886f729eaa7b2d2e957", + "lua/catppuccin/utils/reactive.lua": "05041a21d60ccbe02d9708c36831b796b6fb9b7a5c4347b636fc11293ee167ad", + "lua/lualine/themes/catppuccin-frappe.lua": "3249e12158dd4d8d747cb4fc276091374d323bc3a3d8dd8ea063c0cc09972dcf", + "lua/lualine/themes/catppuccin-latte.lua": "7b0dd2b09f33210d3d5b40b975de308f911754927b9d42b25dd3677b13f933bb", + "lua/lualine/themes/catppuccin-macchiato.lua": "39bd6d9ee7ffac4f8ffa1a3ed4f7306f3528ea6e25747d1ee4130ab8d1dc81c4", + "lua/lualine/themes/catppuccin-mocha.lua": "a0d78b086265ef72a5b9bce9cd0d77ff6aa5d792c4e05c6327adbb220b1608f1", + "lua/lualine/themes/catppuccin-nvim.lua": "7b16272fc6edf1e4f523073282d6a7ed22946f634392979d9aae5e8bfd050a71", + "lua/reactive/presets/catppuccin-frappe-cursor.lua": "5b784baca79d58766d45e24628105142c4578bfe609aef439cee2e50106f7e82", + "lua/reactive/presets/catppuccin-frappe-cursorline.lua": "98c9bd0d187ca3447185f1d29793d80aa30ed301483bdd7343b22feb23e989de", + "lua/reactive/presets/catppuccin-latte-cursor.lua": "d497c9d390114965a6cb470d2ab8e30117bee89d9abb1e8200e654dbdf510e4e", + "lua/reactive/presets/catppuccin-latte-cursorline.lua": "faa2da25887b83075bf87a32309e7653dc04405f659d0b48ab240bacb2d40b09", + "lua/reactive/presets/catppuccin-macchiato-cursor.lua": "513447dbe885e313bff1aa0d0f2acb06cdc5d6c833a3751092491259d77d1c7d", + "lua/reactive/presets/catppuccin-macchiato-cursorline.lua": "0d8061edc51c62fa302645724916857655e788c1d5e6f2419f550410280f9780", + "lua/reactive/presets/catppuccin-mocha-cursor.lua": "1e8f2afaee7d5a1a7bf2388931fa5e83338045e49231a905cef1837ead401f82", + "lua/reactive/presets/catppuccin-mocha-cursorline.lua": "313422042f9872b2533ced2b0ff8b79de46cb0b03454a4537b390b0762912750" + } + }, + "ayu-midas": { + "upstream": "https://github.com/qyurila/ayu-midas-vscode", + "commit": "8ce96d6002e7327be1aaf41a01f6106041517c8e", + "root": "configs/vscode/files/.vscode/extensions/qyurila.ayu-midas-1.1.0", + "version": "1.1.0", + "license": "MIT", + "note": "Original theme JSON and LICENSE with a runtime-only extension manifest; no JavaScript entry point.", + "sha256": { + "LICENSE": "e0af0e0d1754c18ca075649d42f5c6d9a60f8bdc03c20dfd97105f2253a94173", + "ayu-midas.json": "72dea34c4cfc7c5e993e95fd3c412277dc72bbb386584a1c69812c0c6beb5e5f", + "package.json": "05dedf22ea1d4ac7949370412b6c9b180a233c518105383f2fd80f7dc8eb7491" + } + } +} diff --git a/cmd/dots/main.go b/cmd/dots/main.go index 2edbb7d..e6507df 100644 --- a/cmd/dots/main.go +++ b/cmd/dots/main.go @@ -48,6 +48,7 @@ type catalog struct { Services map[string]setupOption `json:"services"` Stock selection `json:"stock"` Ryzen selection `json:"ryzen"` + Devices map[string]selection `json:"devices"` } type row struct { id, label string @@ -84,6 +85,7 @@ type model struct { done, loading bool proposalID, proposalStatus string proposals []proposalChoice + deviceName string } func contains(values []string, target string) bool { @@ -104,6 +106,21 @@ func (m *model) prepare() { if m.selection.Profile == "fiw-ryzen" { m.cursor = 1 } + ids := make([]string, 0, len(m.catalog.Devices)) + for id := range m.catalog.Devices { + ids = append(ids, id) + } + sort.Strings(ids) + for _, id := range ids { + selected := m.selection.Name == id + m.rows = append(m.rows, row{"device:" + id, "Device: " + id + " (" + m.catalog.Devices[id].Profile + ")", selected}) + if selected { + for i := range m.rows[:len(m.rows)-1] { + m.rows[i].checked = false + } + m.cursor = len(m.rows) - 1 + } + } case 1: for _, id := range m.catalog.Groups { label := id @@ -153,6 +170,17 @@ func (m *model) prepare() { } } } +func (m *model) choosePreset() { + id := m.rows[m.cursor].id + switch id { + case "stock": + m.selection = m.catalog.Stock + case "fiw-ryzen": + m.selection = m.catalog.Ryzen + default: + m.selection = m.catalog.Devices[strings.TrimPrefix(id, "device:")] + } +} func (m *model) remember() { switch m.stage { case 1: @@ -327,12 +355,39 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } case tea.KeyMsg: key := v.String() - if key == "ctrl+c" || key == "q" { + if key == "ctrl+c" || (key == "q" && m.stage != 10) { return m, tea.Quit } if m.loading { return m, nil } + if m.stage == 10 { + switch v.Type { + case tea.KeyEsc: + m.stage = 5 + m.errorText = "" + case tea.KeyBackspace, tea.KeyDelete: + if len(m.deviceName) > 0 { + m.deviceName = m.deviceName[:len(m.deviceName)-1] + } + case tea.KeyRunes: + for _, character := range strings.ToLower(string(v.Runes)) { + if len(m.deviceName) < 48 && ((character >= 'a' && character <= 'z') || (character >= '0' && character <= '9') || (len(m.deviceName) > 0 && (character == '-' || character == '_'))) { + m.deviceName += string(character) + } + } + m.errorText = "" + case tea.KeyEnter: + if m.deviceName == "" { + m.errorText = "Enter a device preset name." + return m, nil + } + m.selection.Name = m.deviceName + m.action, m.done = "n", true + return m, tea.Quit + } + return m, nil + } if m.stage == 5 || m.stage == 7 || m.stage == 9 { switch key { case "up", "k": @@ -372,6 +427,11 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { m.errorText = "" return m, m.loadProposals() } + case "n": + if m.stage == 5 && m.errorText == "" { + m.stage = 10 + m.deviceName = "" + } case "enter", "s", "a", "e", "i", "f", "v", "b", "r": if m.errorText == "" { if m.stage == 7 { @@ -442,11 +502,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { break } if m.stage == 0 { - if m.rows[m.cursor].id == "stock" { - m.selection = m.catalog.Stock - } else { - m.selection = m.catalog.Ryzen - } + m.choosePreset() m.prepare() } else { id := m.rows[m.cursor].id @@ -470,11 +526,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } case "enter": if m.stage == 0 { - if m.rows[m.cursor].id == "stock" { - m.selection = m.catalog.Stock - } else { - m.selection = m.catalog.Ryzen - } + m.choosePreset() } m.remember() m.stage++ @@ -498,8 +550,11 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { func (m model) View() string { const purple = "\033[38;2;157;143;217m" const reset = "\033[0m" - titles := []string{"Preset", "Package sections", "Optional app configs", "Kernel, bootloader and extras", "Flatpaks and optional services", "Final preview", "Config backups", "Restore backup preview", "Pending config updates", "Config update diff"} + titles := []string{"Preset", "Package sections", "Optional app configs", "Kernel, bootloader and extras", "Flatpaks and optional services", "Final preview", "Config backups", "Restore backup preview", "Pending config updates", "Config update diff", "Save device preset"} text := purple + " Fiw-Gentoo-Dots\n" + reset + " " + titles[m.stage] + " · " + m.selection.Name + "\n\n" + if m.stage == 10 { + return text + " Name: " + m.deviceName + "_\n\n Up to 48 lowercase letters, digits, hyphens or underscores.\n Saves your selection locally. Existing names ask before replacement.\n\n Enter save · Esc back · Ctrl+C cancel\n " + m.errorText + "\n" + } budget := m.height - 10 if budget < 5 { budget = 5 @@ -525,7 +580,7 @@ func (m model) View() string { text += "\n ↑/↓ scroll · Esc back · Enter accept with confirmation · q cancel\n" } } else { - text += "\n ↑/↓ scroll · Esc back · Enter save · r full restore · a configs · e update configs\n i packages · f Flatpaks · v services · b bootloader\n p pending updates · u config backups · q cancel\n" + text += "\n ↑/↓ scroll · Esc back · Enter save · n save device · r full restore\n a configs · e update configs · i packages · f Flatpaks · v services\n b bootloader · p pending updates · u config backups · q cancel\n" } if m.errorText != "" { text += " " + m.errorText + "\n" @@ -671,6 +726,12 @@ func main() { var actionErr error workflow := "restore" switch final.action { + case "n": + if err := run("--save-device", false, final.deviceName); err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } + return case "a": workflow = "configs" actionErr = run("--apply-configs", false) diff --git a/cmd/dots/main_test.go b/cmd/dots/main_test.go index e62e240..4cf2903 100644 --- a/cmd/dots/main_test.go +++ b/cmd/dots/main_test.go @@ -163,3 +163,45 @@ func TestConfigUpdateIsASeparateAction(t *testing.T) { t.Fatal("config update action was lost") } } + +func TestNamedDeviceKeepsItsSelections(t *testing.T) { + device := selection{Name: "portable", Profile: "stock", Groups: []string{"cli"}, Configs: []string{"neovim"}, Kernel: "binary", Bootloader: "keep"} + m := model{catalog: catalog{Stock: selection{Name: "Stock", Profile: "stock"}, Ryzen: selection{Name: "Ryzen", Profile: "fiw-ryzen"}, Devices: map[string]selection{"portable": device}}, selection: device} + m.prepare() + if m.cursor != 2 || !m.rows[2].checked || m.rows[0].checked { + t.Fatal("saved device is not selected in the preset chooser") + } + next, _ := m.Update(tea.KeyMsg{Type: tea.KeyEnter}) + m = next.(model) + if m.stage != 1 || len(m.selection.Groups) != 1 || !contains(m.selection.Configs, "neovim") || m.selection.Name != "portable" { + t.Fatal("device choices were replaced by the stock preset") + } +} + +func TestDeviceNameAcceptsQAndRequiresExplicitSave(t *testing.T) { + m := model{stage: 5} + next, _ := m.Update(tea.KeyMsg{Type: tea.KeyRunes, Runes: []rune{'n'}}) + m = next.(model) + if m.stage != 10 || m.done { + t.Fatal("n must open the name input without saving") + } + next, command := m.Update(tea.KeyMsg{Type: tea.KeyRunes, Runes: []rune{'q'}}) + m = next.(model) + if command != nil || m.deviceName != "q" { + t.Fatal("q should be accepted as part of a device name") + } + next, _ = m.Update(tea.KeyMsg{Type: tea.KeyEnter}) + m = next.(model) + if !m.done || m.action != "n" || m.selection.Name != "q" { + t.Fatal("explicit named-device save was lost") + } +} + +func TestDeviceNameEscapeDoesNotSave(t *testing.T) { + m := model{stage: 10, deviceName: "discard"} + next, command := m.Update(tea.KeyMsg{Type: tea.KeyEsc}) + m = next.(model) + if m.stage != 5 || m.done || command != nil { + t.Fatal("cancelled device input saved a selection") + } +} diff --git a/configs/catalog.json b/configs/catalog.json index 75a4746..9eff4ab 100644 --- a/configs/catalog.json +++ b/configs/catalog.json @@ -71,7 +71,7 @@ "packages": [ "app-editors/neovim" ], - "note": "Catppuccin is optional; the captured purple highlights also work with the built-in fallback." + "note": "Pinned Catppuccin runtime is bundled; no plugin manager, download or KDE dependency. Purple highlights retain a built-in fallback." }, "fastfetch": { "label": "Fastfetch tree layout with Gentoo logo", @@ -99,7 +99,8 @@ "group": "fiw-apps", "packages": [ "app-editors/vscode" - ] + ], + "note": "Pinned ayu MiDas colour theme is bundled as a user extension; no Marketplace download or compilation." }, "autostart": { "label": "Optional application autostart", diff --git a/configs/neovim/files/.config/nvim/init.lua b/configs/neovim/files/.config/nvim/init.lua index bc691f9..56126f6 100644 --- a/configs/neovim/files/.config/nvim/init.lua +++ b/configs/neovim/files/.config/nvim/init.lua @@ -1,6 +1,8 @@ -- Colors vim.opt.termguicolors = true --- catppuccin is a plugin (not bundled with Neovim); fall back to the built-in dark theme +-- Load the bundled native theme package before applying the captured highlights. +pcall(vim.cmd.packadd, "catppuccin") +-- Keep a built-in fallback if the theme package is intentionally omitted. if not pcall(vim.cmd.colorscheme, "catppuccin-mocha") then vim.o.background = "dark" vim.cmd.colorscheme "default" diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/LICENSE.md b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/LICENSE.md new file mode 100644 index 0000000..006383b --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Catppuccin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/after/queries/css/highlights.scm b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/after/queries/css/highlights.scm new file mode 100644 index 0000000..7dc8b31 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/after/queries/css/highlights.scm @@ -0,0 +1,16 @@ +;; extends +[ +(class_name) +] @property.class + +[ + (id_name) + ] @property.id + +[ + (declaration + (plain_value) @string.plain) + ] +[ + (tag_name) + ] @type.tag diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/after/queries/javascript/highlights.scm b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/after/queries/javascript/highlights.scm new file mode 100644 index 0000000..1ce3d33 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/after/queries/javascript/highlights.scm @@ -0,0 +1,4 @@ +;; extends +[ +"export" +] @keyword.export diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/after/queries/typescript/highlights.scm b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/after/queries/typescript/highlights.scm new file mode 100644 index 0000000..1ce3d33 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/after/queries/typescript/highlights.scm @@ -0,0 +1,4 @@ +;; extends +[ +"export" +] @keyword.export diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/colors/catppuccin-frappe.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/colors/catppuccin-frappe.lua new file mode 100644 index 0000000..48b6096 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/colors/catppuccin-frappe.lua @@ -0,0 +1 @@ +require("catppuccin").load "frappe" diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/colors/catppuccin-latte.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/colors/catppuccin-latte.lua new file mode 100644 index 0000000..a2f88b8 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/colors/catppuccin-latte.lua @@ -0,0 +1 @@ +require("catppuccin").load "latte" diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/colors/catppuccin-macchiato.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/colors/catppuccin-macchiato.lua new file mode 100644 index 0000000..eae599a --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/colors/catppuccin-macchiato.lua @@ -0,0 +1 @@ +require("catppuccin").load "macchiato" diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/colors/catppuccin-mocha.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/colors/catppuccin-mocha.lua new file mode 100644 index 0000000..a763bdb --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/colors/catppuccin-mocha.lua @@ -0,0 +1 @@ +require("catppuccin").load "mocha" diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/colors/catppuccin-nvim.vim b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/colors/catppuccin-nvim.vim new file mode 100644 index 0000000..916847b --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/colors/catppuccin-nvim.vim @@ -0,0 +1 @@ +lua require("catppuccin").load() diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/colors/catppuccin.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/colors/catppuccin.lua new file mode 100644 index 0000000..de89880 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/colors/catppuccin.lua @@ -0,0 +1 @@ +require("catppuccin").load() diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/barbecue/theme/catppuccin-frappe.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/barbecue/theme/catppuccin-frappe.lua new file mode 100644 index 0000000..ecebd5e --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/barbecue/theme/catppuccin-frappe.lua @@ -0,0 +1 @@ +return require "catppuccin.utils.barbecue" "frappe" diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/barbecue/theme/catppuccin-latte.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/barbecue/theme/catppuccin-latte.lua new file mode 100644 index 0000000..e52461d --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/barbecue/theme/catppuccin-latte.lua @@ -0,0 +1 @@ +return require "catppuccin.utils.barbecue" "latte" diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/barbecue/theme/catppuccin-macchiato.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/barbecue/theme/catppuccin-macchiato.lua new file mode 100644 index 0000000..5778cea --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/barbecue/theme/catppuccin-macchiato.lua @@ -0,0 +1 @@ +return require "catppuccin.utils.barbecue" "macchiato" diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/barbecue/theme/catppuccin-mocha.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/barbecue/theme/catppuccin-mocha.lua new file mode 100644 index 0000000..044f871 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/barbecue/theme/catppuccin-mocha.lua @@ -0,0 +1 @@ +return require "catppuccin.utils.barbecue" "mocha" diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/barbecue/theme/catppuccin-nvim.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/barbecue/theme/catppuccin-nvim.lua new file mode 100644 index 0000000..b5848cf --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/barbecue/theme/catppuccin-nvim.lua @@ -0,0 +1 @@ +return require "catppuccin.utils.barbecue"() diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/editor.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/editor.lua new file mode 100644 index 0000000..9ea64d5 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/editor.lua @@ -0,0 +1,118 @@ +local M = {} + +function M.get() + local pumsolid = O.float.solid + if vim.fn.has "nvim-0.12" == 1 then pumsolid = vim.o.pumborder == "solid" end + + return { + ColorColumn = { bg = C.surface0 }, -- used for the columns set with 'colorcolumn' + Conceal = { fg = C.overlay1 }, -- placeholder characters substituted for concealed text (see 'conceallevel') + Cursor = { fg = C.base, bg = C.rosewater }, -- character under the cursor + lCursor = { fg = C.base, bg = C.rosewater }, -- the character under the cursor when |language-mapping| is used (see 'guicursor') + CursorIM = { fg = C.base, bg = C.rosewater }, -- like Cursor, but used when in IME mode |CursorIM| + CursorColumn = { bg = C.mantle }, -- Screen-column at the cursor, when 'cursorcolumn' is set. + CursorLine = { + bg = U.vary_color({ latte = U.lighten(C.mantle, 0.70, C.base) }, U.darken(C.surface0, 0.64, C.base)), + }, -- Screen-line at the cursor, when 'cursorline' is set. Low-priority if forecrust (ctermfg OR guifg) is not set. + Dimmed = { fg = C.overlay1 }, + Directory = { fg = C.blue }, -- directory names (and other special names in listings) + EndOfBuffer = { fg = C.surface1 }, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|. + ErrorMsg = { fg = C.red, style = { "bold", "italic" } }, -- error messages on the command line + VertSplit = { fg = O.transparent_background and C.surface1 or C.crust }, -- the column separating vertically split windows + Folded = { fg = C.blue, bg = O.transparent_background and C.none or C.surface1 }, -- line used for closed folds + FoldColumn = { fg = C.overlay0 }, -- 'foldcolumn' + SignColumn = { fg = C.surface1 }, -- column where |signs| are displayed + SignColumnSB = { bg = C.crust, fg = C.surface1 }, -- column where |signs| are displayed + Substitute = { bg = C.surface1, fg = U.vary_color({ latte = C.red }, C.pink) }, -- |:substitute| replacement text highlighting + LineNr = { fg = C.surface1 }, -- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set. + CursorLineNr = { fg = C.lavender }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line. highlights the number in numberline. + MatchParen = { fg = C.peach, bg = U.darken(C.surface1, 0.70, C.base), style = { "bold" } }, -- The character under the cursor or just before it, if it is a paired bracket, and its match. |pi_paren.txt| + ModeMsg = { fg = C.text, style = { "bold" } }, -- 'showmode' message (e.g., "-- INSERT -- ") + -- MsgArea = { fg = C.text }, -- Area for messages and cmdline, don't set this highlight because of https://github.com/neovim/neovim/issues/17832 + MsgSeparator = { link = "WinSeparator" }, -- Separator for scrolled messages, `msgsep` flag of 'display' + MoreMsg = { fg = C.blue }, -- |more-prompt| + NonText = { fg = C.overlay0 }, -- '@' at the end of the window, characters from 'showbreak' and other characters that do not really exist in the text (e.g., ">" displayed when a double-wide character doesn't fit at the end of the line). See also |hl-EndOfBuffer|. + Normal = { fg = C.text, bg = O.transparent_background and C.none or C.base }, -- normal text + NormalNC = { + fg = C.text, + bg = (O.transparent_background and O.dim_inactive.enabled and C.dim) + or (O.dim_inactive.enabled and C.dim) + or (O.transparent_background and C.none) + or C.base, + }, -- normal text in non-current windows + NormalSB = { fg = C.text, bg = C.crust }, -- normal text in non-current windows + NormalFloat = { fg = C.text, bg = (O.float.transparent and vim.o.winblend == 0) and C.none or C.mantle }, -- Normal text in floating windows. + FloatBorder = O.float.solid + and ((O.float.transparent and vim.o.winblend == 0) and { fg = C.surface2, bg = C.none } or { + fg = C.mantle, + bg = C.mantle, + }) + or { fg = C.blue, bg = (O.float.transparent and vim.o.winblend == 0) and C.none or C.mantle }, + FloatTitle = O.float.solid and { + fg = C.crust, + bg = C.lavender, + } or { fg = C.subtext0, bg = (O.float.transparent and vim.o.winblend == 0) and C.none or C.mantle }, -- Title of floating windows + FloatShadow = { bg = (O.float.transparent and vim.o.winblend == 0) and C.none or C.overlay0, blend = 80 }, + FloatShadowThrough = { + bg = (O.float.transparent and vim.o.winblend == 0) and C.none or C.overlay0, + blend = 100, + }, + OkMsg = { fg = C.green }, -- success messages on the command line + Pmenu = { + bg = (O.transparent_background and vim.o.pumblend == 0) and C.none or C.mantle, + fg = C.overlay2, + }, -- Popup menu: normal item. + PmenuBorder = { + bg = (O.transparent_background and vim.o.pumblend == 0) and C.none or C.mantle, + fg = pumsolid and ((O.transparent_background and vim.o.pumblend == 0) and C.none or C.mantle) or C.blue, + }, -- Popup menu: border + PmenuSel = { bg = C.surface0, style = { "bold" } }, -- Popup menu: selected item. + PmenuMatch = { fg = C.text, style = { "bold" } }, -- Popup menu: matching text. + PmenuMatchSel = { style = { "bold" } }, -- Popup menu: matching text in selected item; is combined with |hl-PmenuMatch| and |hl-PmenuSel|. + PmenuSbar = { bg = C.surface0 }, -- Popup menu: scrollbar. + PmenuThumb = { bg = C.overlay0 }, -- Popup menu: Thumb of the scrollbar. + PmenuKind = { + bg = (O.transparent_background and vim.o.pumblend == 0) and C.none or C.mantle, + fg = C.blue, + }, -- Popup menu: item kind. Background and style must match `Pmenu`. + PmenuKindSel = { bg = C.surface0, fg = C.blue, style = { "bold" } }, -- Popup menu: selected item kind. Background and style must match `PmenuSel`. + PmenuExtra = { fg = C.overlay0 }, -- Popup menu: normal item extra text. + PmenuExtraSel = { + bg = C.surface0, + fg = C.overlay0, + style = { "bold" }, + }, -- Popup menu: selected item extra text. + ComplMatchIns = { link = "PreInsert" }, -- Matched text of the currently inserted completion. + PreInsert = { fg = C.overlay2 }, -- Text inserted when "preinsert" is in 'completeopt'. + ComplHint = { fg = C.subtext0 }, -- Virtual text of the currently selected completion. + ComplHintMore = { link = "Question" }, -- The additional information of the virtual text. + Question = { fg = C.blue }, -- |hit-enter| prompt and yes/no questions + QuickFixLine = { bg = U.darken(C.surface1, 0.70, C.base), style = { "bold" } }, -- Current |quickfix| item in the quickfix window. Combined with |hl-CursorLine| when the cursor is there. + Search = { bg = U.darken(C.sky, 0.30, C.base), fg = C.text }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out. + IncSearch = { bg = U.darken(C.sky, 0.90, C.base), fg = C.mantle }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c" + CurSearch = { bg = C.red, fg = C.mantle }, -- 'cursearch' highlighting: highlights the current search you're on differently + SpecialKey = { link = "NonText" }, -- Unprintable characters: text displayed differently from what it really is. But not 'listchars' textspace. |hl-Whitespace| + SpellBad = { sp = C.red, style = { "undercurl" } }, -- Word that is not recognized by the spellchecker. |spell| Combined with the highlighting used otherwise. + SpellCap = { sp = C.yellow, style = { "undercurl" } }, -- Word that should start with a capital. |spell| Combined with the highlighting used otherwise. + SpellLocal = { sp = C.blue, style = { "undercurl" } }, -- Word that is recognized by the spellchecker as one that is used in another region. |spell| Combined with the highlighting used otherwise. + SpellRare = { sp = C.green, style = { "undercurl" } }, -- Word that is recognized by the spellchecker as one that is hardly ever used. |spell| Combined with the highlighting used otherwise. + StatusLine = { fg = C.text, bg = O.transparent_background and C.none or C.mantle }, -- status line of current window + StatusLineNC = { fg = C.surface1, bg = O.transparent_background and C.none or C.mantle }, -- status lines of not-current windows Note: if this is equal to "StatusLine" Vim will use "^^^" in the status line of the current window. + TabLine = { bg = C.crust, fg = C.overlay0 }, -- tab pages line, not active tab page label + TabLineFill = { bg = O.transparent_background and C.none or C.mantle }, -- tab pages line, where there are no labels + TabLineSel = { link = "Normal" }, -- tab pages line, active tab page label + TermCursor = { fg = C.base, bg = C.rosewater }, -- cursor in a focused terminal + TermCursorNC = { fg = C.base, bg = C.overlay2 }, -- cursor in unfocused terminals + Title = { fg = C.blue, style = { "bold" } }, -- titles for output from ":set all", ":autocmd" etc. + Visual = { bg = C.surface1, style = { "bold" } }, -- Visual mode selection + VisualNOS = { bg = C.surface1, style = { "bold" } }, -- Visual mode selection when vim is "Not Owning the Selection". + WarningMsg = { fg = C.yellow }, -- warning messages + Whitespace = { fg = C.surface1 }, -- "nbsp", "space", "tab" and "trail" in 'listchars' + WildMenu = { bg = C.overlay0 }, -- current match in 'wildmenu' completion + WinBar = { fg = C.rosewater }, + WinBarNC = { link = "WinBar" }, + WinSeparator = { fg = O.transparent_background and C.surface1 or C.crust }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/aerial.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/aerial.lua new file mode 100644 index 0000000..0046751 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/aerial.lua @@ -0,0 +1,38 @@ +local M = {} + +M.url = "https://github.com/stevearc/aerial.nvim" + +function M.get() + return { + AerialLine = { fg = C.yellow, bg = C.none }, + AerialGuide = { fg = C.overlay2 }, + AerialBooleanIcon = { link = "@boolean" }, + AerialClassIcon = { link = "@type" }, + AerialConstantIcon = { link = "@constant" }, + AerialConstructorIcon = { link = "@constructor" }, + AerialFieldIcon = { link = "@field" }, + AerialFunctionIcon = { link = "@function" }, + AerialMethodIcon = { link = "@method" }, + AerialNamespaceIcon = { link = "@namespace" }, + AerialNumberIcon = { link = "@number" }, + AerialOperatorIcon = { link = "@operator" }, + AerialTypeParameterIcon = { link = "@type" }, + AerialPropertyIcon = { link = "@property" }, + AerialStringIcon = { link = "@string" }, + AerialVariableIcon = { link = "@constant" }, + AerialEnumMemberIcon = { link = "@field" }, + AerialEnumIcon = { link = "@type" }, + AerialFileIcon = { link = "@text.uri" }, + AerialModuleIcon = { link = "@namespace" }, + AerialPackageIcon = { link = "@namespace" }, + AerialInterfaceIcon = { link = "@type" }, + AerialStructIcon = { link = "@type" }, + AerialEventIcon = { link = "@type" }, + AerialArrayIcon = { link = "@constant" }, + AerialObjectIcon = { link = "@type" }, + AerialKeyIcon = { link = "@type" }, + AerialNullIcon = { link = "@type" }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/alpha.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/alpha.lua new file mode 100644 index 0000000..d7cf737 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/alpha.lua @@ -0,0 +1,15 @@ +local M = {} + +M.url = "https://github.com/goolord/alpha-nvim" + +function M.get() + return { + AlphaShortcut = { fg = C.green }, + AlphaHeader = { fg = C.blue }, + AlphaHeaderLabel = { fg = C.peach }, + AlphaButtons = { fg = C.lavender }, + AlphaFooter = { fg = C.yellow, style = { "italic" } }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/artio.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/artio.lua new file mode 100644 index 0000000..62c2e2c --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/artio.lua @@ -0,0 +1,26 @@ +local M = {} + +M.url = "https://github.com/comfysage/artio.nvim" + +function M.get() + local transparent_background = O.transparent_background + + return { + ArtioNormal = { + fg = C.text, + bg = transparent_background and "NONE" or C.mantle, + }, + ArtioSel = { + fg = C.flamingo, + bg = C.surface0, + style = { "bold" }, + }, + ArtioMatch = { fg = C.blue }, + ArtioPointer = { fg = C.flamingo }, + ArtioPrompt = { fg = C.blue }, + ArtioMark = { fg = C.yellow }, + ArtioMarkLine = { link = "Visual" }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/avante.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/avante.lua new file mode 100644 index 0000000..56c17ca --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/avante.lua @@ -0,0 +1,71 @@ +local M = {} + +M.url = "https://github.com/yetone/avante.nvim" + +function M.get() + local rounded = O.integrations.avante.windows_sidebar_header_rounded + return { + -- titles + AvanteTitle = rounded and { bg = C.lavender, fg = C.base } or { fg = C.lavender }, + AvanteReversedTitle = rounded and { bg = C.none, fg = C.lavender } or { fg = C.lavender }, + + AvanteSubtitle = rounded and { bg = C.peach, fg = C.base } or { fg = C.peach }, + AvanteReversedSubtitle = rounded and { bg = C.none, fg = C.peach } or { fg = C.peach }, + + AvanteThirdTitle = rounded and { bg = C.blue, fg = C.base } or { fg = C.blue }, + AvanteReversedThirdTitle = rounded and { bg = C.none, fg = C.blue } or { fg = C.blue }, + + -- hints + AvanteInlineHint = { fg = C.overlay0 }, + AvantePopupHint = { fg = C.overlay0 }, + AvanteAnnotation = { fg = C.overlay0 }, + AvanteSuggestion = { fg = C.overlay0 }, + + -- conflicts + AvanteConflictCurrent = { + bg = O.transparent_background and C.none or C.mantle, + fg = C.green, + }, + AvanteConflictCurrentLabel = { + bg = O.transparent_background and C.none or C.mantle, + fg = C.green, + }, + + AvanteConflictIncoming = { + bg = O.transparent_background and C.none or C.mantle, + fg = C.blue, + }, + AvanteConflictIncomingLabel = { + bg = O.transparent_background and C.none or C.mantle, + fg = C.blue, + }, + + AvanteConflictAncestor = { + bg = O.transparent_background and C.none or C.mantle, + fg = C.teal, + }, + AvanteConflictAncestorLabel = { + bg = O.transparent_background and C.none or C.mantle, + fg = C.teal, + }, + + AvanteToBeDeleted = { + bg = O.transparent_background and C.none or C.mantle, + fg = C.red, + }, + + AvanteSidebarWinSeparator = { + link = "WinSeparator", + }, + + AvantePromptInput = { + link = "FloatNormal", + }, + + AvantePromptInputBorder = { + link = "FloatBorder", + }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/barbar.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/barbar.lua new file mode 100644 index 0000000..b1c6520 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/barbar.lua @@ -0,0 +1,27 @@ +local M = {} + +M.url = "https://github.com/romgrk/barbar.nvim" + +function M.get() + return { + BufferCurrent = { bg = C.surface1, fg = C.text }, + BufferCurrentIndex = { bg = C.surface1, fg = C.blue }, + BufferCurrentMod = { bg = C.surface1, fg = C.yellow }, + BufferCurrentSign = { bg = C.surface1, fg = C.blue }, + BufferCurrentTarget = { bg = C.surface1, fg = C.red }, + BufferVisible = { bg = C.mantle, fg = C.text }, + BufferVisibleIndex = { bg = C.mantle, fg = C.blue }, + BufferVisibleMod = { bg = C.mantle, fg = C.yellow }, + BufferVisibleSign = { bg = C.mantle, fg = C.blue }, + BufferVisibleTarget = { bg = C.mantle, fg = C.red }, + BufferInactive = { bg = C.mantle, fg = C.overlay0 }, + BufferInactiveIndex = { bg = C.mantle, fg = C.overlay0 }, + BufferInactiveMod = { bg = C.mantle, fg = C.yellow }, + BufferInactiveSign = { bg = C.mantle, fg = C.blue }, + BufferInactiveTarget = { bg = C.mantle, fg = C.red }, + BufferTabpages = { bg = C.mantle, fg = C.none }, + BufferTabpage = { bg = C.mantle, fg = C.blue }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/beacon.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/beacon.lua new file mode 100644 index 0000000..1f10f41 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/beacon.lua @@ -0,0 +1,11 @@ +local M = {} + +M.url = "https://github.com/DanilaMihailov/beacon.nvim" + +function M.get() + return { + Beacon = { bg = C.blue }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/blink_cmp.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/blink_cmp.lua new file mode 100644 index 0000000..9333bd9 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/blink_cmp.lua @@ -0,0 +1,62 @@ +local M = {} + +M.url = "https://github.com/saghen/blink.cmp" + +function M.get() + local style = O.integrations.blink_cmp.style + + local highlights = { + BlinkCmpLabel = { fg = C.overlay2 }, + BlinkCmpLabelDeprecated = { fg = C.overlay0, style = { "strikethrough" } }, + BlinkCmpKind = { fg = C.blue }, + BlinkCmpMenu = { link = "Pmenu" }, + BlinkCmpDoc = { link = "NormalFloat" }, + BlinkCmpLabelMatch = { link = "PmenuMatch" }, + BlinkCmpMenuSelection = { bg = C.surface1, style = { "bold" } }, + BlinkCmpScrollBarGutter = { bg = C.surface1 }, + BlinkCmpScrollBarThumb = { bg = C.overlay0 }, + BlinkCmpLabelDescription = { link = "PmenuExtra" }, + BlinkCmpLabelDetail = { link = "PmenuExtra" }, + BlinkCmpSignatureHelpBorder = { link = "FloatBorder" }, + + BlinkCmpKindText = { fg = C.green }, + BlinkCmpKindMethod = { fg = C.blue }, + BlinkCmpKindFunction = { fg = C.blue }, + BlinkCmpKindConstructor = { fg = C.blue }, + BlinkCmpKindField = { fg = C.green }, + BlinkCmpKindVariable = { fg = C.flamingo }, + BlinkCmpKindClass = { fg = C.yellow }, + BlinkCmpKindInterface = { fg = C.yellow }, + BlinkCmpKindModule = { fg = C.blue }, + BlinkCmpKindProperty = { fg = C.blue }, + BlinkCmpKindUnit = { fg = C.green }, + BlinkCmpKindValue = { fg = C.peach }, + BlinkCmpKindEnum = { fg = C.yellow }, + BlinkCmpKindKeyword = { fg = C.mauve }, + BlinkCmpKindSnippet = { fg = C.flamingo }, + BlinkCmpKindColor = { fg = C.red }, + BlinkCmpKindFile = { fg = C.blue }, + BlinkCmpKindReference = { fg = C.red }, + BlinkCmpKindFolder = { fg = C.blue }, + BlinkCmpKindEnumMember = { fg = C.teal }, + BlinkCmpKindConstant = { fg = C.peach }, + BlinkCmpKindStruct = { fg = C.blue }, + BlinkCmpKindEvent = { fg = C.blue }, + BlinkCmpKindOperator = { fg = C.sky }, + BlinkCmpKindTypeParameter = { fg = C.maroon }, + BlinkCmpKindCopilot = { fg = C.teal }, + } + + if style == "bordered" then + -- uses FloatBorder.fg and Pmenu.bg + highlights["BlinkCmpMenuBorder"] = { + fg = C.blue, + bg = (O.transparent_background and vim.o.pumblend == 0) and C.none or C.mantle, + } + highlights["BlinkCmpDocBorder"] = { link = "FloatBorder" } + end + + return highlights +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/blink_indent.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/blink_indent.lua new file mode 100644 index 0000000..78f70e7 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/blink_indent.lua @@ -0,0 +1,28 @@ +local M = {} + +M.url = "https://github.com/saghen/blink.indent" + +function M.get() + return { + BlinkIndent = { fg = C.surface0 }, + BlinkIndentScope = { fg = C.overlay2 }, + + BlinkIndentRed = { fg = C.red }, + BlinkIndentOrange = { fg = C.peach }, + BlinkIndentYellow = { fg = C.yellow }, + BlinkIndentGreen = { fg = C.green }, + BlinkIndentCyan = { fg = C.sky }, + BlinkIndentBlue = { fg = C.blue }, + BlinkIndentViolet = { fg = C.mauve }, + + BlinkIndentRedUnderline = { sp = C.red, style = { "underline" } }, + BlinkIndentOrangeUnderline = { sp = C.peach, style = { "underline" } }, + BlinkIndentYellowUnderline = { sp = C.yellow, style = { "underline" } }, + BlinkIndentGreenUnderline = { sp = C.green, style = { "underline" } }, + BlinkIndentCyanUnderline = { sp = C.sky, style = { "underline" } }, + BlinkIndentBlueUnderline = { sp = C.blue, style = { "underline" } }, + BlinkIndentVioletUnderline = { sp = C.mauve, style = { "underline" } }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/blink_pairs.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/blink_pairs.lua new file mode 100644 index 0000000..2fe3081 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/blink_pairs.lua @@ -0,0 +1,19 @@ +local M = {} + +M.url = "https://github.com/saghen/blink.pairs" + +function M.get() + return { + BlinkPairsRed = { fg = C.red }, + BlinkPairsYellow = { fg = C.yellow }, + BlinkPairsBlue = { fg = C.blue }, + BlinkPairsOrange = { fg = C.peach }, + BlinkPairsGreen = { fg = C.green }, + BlinkPairsPurple = { fg = C.mauve }, + BlinkPairsCyan = { fg = C.teal }, + BlinkPairsUnmatched = { fg = C.red }, + BlinkPairsMatchParen = { link = "MatchParen" }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/buffon.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/buffon.lua new file mode 100644 index 0000000..c8521d6 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/buffon.lua @@ -0,0 +1,14 @@ +local M = {} + +M.url = "https://github.com/francescarpi/buffon.nvim" + +function M.get() + return { + BuffonUnloadedBuffer = { fg = C.surface1 }, + BuffonShortcut = { fg = C.peach }, + BuffonLineActive = { fg = C.sapphire }, + BuffonUnsavedIndicator = { fg = C.red }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/cmp.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/cmp.lua new file mode 100644 index 0000000..dcd77fc --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/cmp.lua @@ -0,0 +1,44 @@ +local M = {} + +M.url = "https://github.com/hrsh7th/nvim-cmp" + +function M.get() + return { + CmpItemAbbr = { fg = C.overlay2 }, + CmpItemAbbrDeprecated = { fg = C.overlay0, style = { "strikethrough" } }, + CmpItemKind = { fg = C.blue }, + CmpItemMenu = { fg = C.text }, + CmpItemAbbrMatch = { fg = C.text, style = { "bold" } }, + CmpItemAbbrMatchFuzzy = { fg = C.text, style = { "bold" } }, + + -- kind support + CmpItemKindSnippet = { fg = C.mauve }, + CmpItemKindKeyword = { fg = C.red }, + CmpItemKindText = { fg = C.teal }, + CmpItemKindMethod = { fg = C.blue }, + CmpItemKindConstructor = { fg = C.blue }, + CmpItemKindFunction = { fg = C.blue }, + CmpItemKindFolder = { fg = C.blue }, + CmpItemKindModule = { fg = C.blue }, + CmpItemKindConstant = { fg = C.peach }, + CmpItemKindField = { fg = C.green }, + CmpItemKindProperty = { fg = C.green }, + CmpItemKindEnum = { fg = C.green }, + CmpItemKindUnit = { fg = C.green }, + CmpItemKindClass = { fg = C.yellow }, + CmpItemKindVariable = { fg = C.flamingo }, + CmpItemKindFile = { fg = C.blue }, + CmpItemKindInterface = { fg = C.yellow }, + CmpItemKindColor = { fg = C.red }, + CmpItemKindReference = { fg = C.red }, + CmpItemKindEnumMember = { fg = C.red }, + CmpItemKindStruct = { fg = C.blue }, + CmpItemKindValue = { fg = C.peach }, + CmpItemKindEvent = { fg = C.blue }, + CmpItemKindOperator = { fg = C.blue }, + CmpItemKindTypeParameter = { fg = C.blue }, + CmpItemKindCopilot = { fg = C.teal }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/coc_nvim.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/coc_nvim.lua new file mode 100644 index 0000000..127e782 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/coc_nvim.lua @@ -0,0 +1,21 @@ +local M = {} + +M.url = "https://github.com/neoclide/coc.nvim" + +function M.get() + return { + -- These groups are for the coc.nvim, see ":h coc-highlights" + -- Custom popup menu since coc v0.0.82 + CocMenuSel = { link = "PmenuSel" }, + CocPumSearch = { fg = C.sky, style = { "bold" } }, + + -- Inlay hints + CocInlayHint = { + -- fg of `Comment` + fg = C.overlay0, + style = { "italic" }, + }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/colorful_winsep.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/colorful_winsep.lua new file mode 100644 index 0000000..24c6fe3 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/colorful_winsep.lua @@ -0,0 +1,17 @@ +local M = {} + +M.url = "https://github.com/nvim-zh/colorful-winsep.nvim" + +function M.get() + local color = U.select_color(O.integrations.colorful_winsep.color, "red") + + return { + ColorfulWinSep = { + fg = color, + bg = O.transparent_background and C.none or C.base, + }, + NvimSeparator = { link = "ColorfulWinSep" }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/copilot_vim.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/copilot_vim.lua new file mode 100644 index 0000000..cbd92bd --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/copilot_vim.lua @@ -0,0 +1,12 @@ +local M = {} + +M.url = "https://github.com/github/copilot.vim" + +function M.get() + return { + CopilotSuggestion = { fg = C.overlay0 }, + CopilotAnnotation = { fg = C.blue }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/dadbod_ui.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/dadbod_ui.lua new file mode 100644 index 0000000..9078164 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/dadbod_ui.lua @@ -0,0 +1,13 @@ +local M = {} + +M.url = "https://github.com/kristijanhusak/vim-dadbod-ui" + +function M.get() + return { + NotificationInfo = { fg = C.blue, bg = C.mantle }, + NotificationWarning = { fg = C.yellow, bg = C.mantle }, + NotificationError = { fg = C.red, bg = C.mantle }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/dap.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/dap.lua new file mode 100644 index 0000000..a191550 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/dap.lua @@ -0,0 +1,15 @@ +local M = {} + +M.url = "https://github.com/mfussenegger/nvim-dap" + +function M.get() + return { + DapBreakpoint = { fg = C.red }, + DapBreakpointCondition = { fg = C.yellow }, + DapBreakpointRejected = { fg = C.mauve }, + DapLogPoint = { fg = C.sky }, + DapStopped = { fg = C.maroon }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/dap_ui.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/dap_ui.lua new file mode 100644 index 0000000..38e4706 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/dap_ui.lua @@ -0,0 +1,49 @@ +local M = {} + +M.url = "https://github.com/rcarriga/nvim-dap-ui" + +function M.get() + return { + DapUIScope = { fg = C.sky }, + DapUIType = { fg = C.mauve }, + DapUIValue = { fg = C.sky }, + DapUIVariable = { fg = C.text }, + DapUIModifiedValue = { fg = C.peach }, + DapUIDecoration = { fg = C.sky }, + DapUIThread = { fg = C.green }, + DapUIStoppedThread = { fg = C.sky }, + DapUISource = { fg = C.lavender }, + DapUILineNumber = { fg = C.sky }, + DapUIFloatBorder = { link = "FloatBorder" }, + + DapUIWatchesEmpty = { fg = C.maroon }, + DapUIWatchesValue = { fg = C.green }, + DapUIWatchesError = { fg = C.maroon }, + + DapUIBreakpointsPath = { fg = C.sky }, + DapUIBreakpointsInfo = { fg = C.green }, + DapUIBreakpointsCurrentLine = { fg = C.green, style = { "bold" } }, + DapUIBreakpointsDisabledLine = { fg = C.surface2 }, + + DapUIStepOver = { fg = C.blue }, + DapUIStepOverNC = { link = "DapUIStepOver" }, + DapUIStepInto = { fg = C.blue }, + DapUIStepIntoNC = { link = "DapUIStepInto" }, + DapUIStepBack = { fg = C.blue }, + DapUIStepBackNC = { link = "DapUIStepBack" }, + DapUIStepOut = { fg = C.blue }, + DapUIStepOutNC = { link = "DapUIStepOut" }, + DapUIStop = { fg = C.red }, + DapUIStopNC = { link = "DapUIStop" }, + DapUIPlayPause = { fg = C.green }, + DapUIPlayPauseNC = { link = "DapUIPlayPause" }, + DapUIRestart = { fg = C.green }, + DapUIRestartNC = { link = "DapUIRestart" }, + DapUIUnavailable = { fg = C.surface1 }, + DapUIUnavailableNC = { link = "DapUIUnavailable" }, + + DapUIWinSelect = { fg = C.peach }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/dashboard.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/dashboard.lua new file mode 100644 index 0000000..93dd3dd --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/dashboard.lua @@ -0,0 +1,20 @@ +local M = {} + +M.url = "https://github.com/nvimdev/dashboard-nvim" + +function M.get() + return { + DashboardShortCut = { fg = C.pink }, + DashboardHeader = { fg = C.blue }, + DashboardCenter = { fg = C.green }, + DashboardFooter = { fg = C.yellow, style = { "italic" } }, + DashboardMruTitle = { fg = C.sky }, + DashboardProjectTitle = { fg = C.sky }, + DashboardFiles = { fg = C.lavender }, + DashboardKey = { fg = C.peach }, + DashboardDesc = { fg = C.blue }, + DashboardIcon = { fg = C.pink, bold = true }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/diffview.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/diffview.lua new file mode 100644 index 0000000..230cc71 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/diffview.lua @@ -0,0 +1,43 @@ +local M = {} + +M.url = "https://github.com/sindrets/diffview.nvim" + +function M.get() + return { + DiffviewDim1 = { link = "Comment" }, + DiffviewPrimary = { fg = C.blue }, + DiffviewSecondary = { fg = C.green }, + DiffviewNormal = { fg = C.text, bg = O.transparent_background and C.none or C.mantle }, + DiffviewWinSeparator = { + fg = O.transparent_background and C.surface1 or C.base, + bg = O.transparent_background and C.none or C.base, + }, + DiffviewFilePanelTitle = { fg = C.blue, style = { "bold" } }, + DiffviewFilePanelCounter = { fg = C.text }, + DiffviewFilePanelRootPath = { fg = C.lavender, style = { "bold" } }, + DiffviewFilePanelFileName = { fg = C.text }, + DiffviewFilePanelSelected = { fg = C.yellow }, + DiffviewFilePanelPath = { link = "Comment" }, + DiffviewFilePanelInsertions = { fg = C.green }, + DiffviewFilePanelDeletions = { fg = C.red }, + DiffviewFilePanelConflicts = { fg = C.yellow }, + DiffviewFolderName = { fg = C.blue, style = { "bold" } }, + DiffviewFolderSign = { fg = C.blue }, + DiffviewHash = { fg = C.flamingo }, + DiffviewReference = { fg = C.blue, style = { "bold" } }, + DiffviewReflogSelector = { fg = C.pink }, + DiffviewStatusAdded = { fg = C.green }, + DiffviewStatusUntracked = { fg = C.green }, + DiffviewStatusModified = { fg = C.yellow }, + DiffviewStatusRenamed = { fg = C.yellow }, + DiffviewStatusCopied = { fg = C.yellow }, + DiffviewStatusTypeChange = { fg = C.yellow }, + DiffviewStatusUnmerged = { fg = C.yellow }, + DiffviewStatusUnknown = { fg = C.red }, + DiffviewStatusDeleted = { fg = C.red }, + DiffviewStatusBroken = { fg = C.red }, + DiffviewStatusIgnored = { fg = C.overlay0 }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/dropbar.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/dropbar.lua new file mode 100644 index 0000000..38dbfe5 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/dropbar.lua @@ -0,0 +1,71 @@ +local M = {} + +M.url = "https://github.com/Bekaboo/dropbar.nvim" + +function M.get() + local color = O.integrations.dropbar.color_mode + return { + DropBarMenuHoverEntry = { link = "Visual" }, + DropBarMenuHoverIcon = { reverse = true }, + DropBarMenuHoverSymbol = { bold = true }, + DropBarIconUISeparator = { fg = C.overlay1 }, + DropBarKindArray = color and { link = "DropBarIconKindArray" } or { fg = C.text }, + DropBarKindBoolean = color and { link = "DropBarIconKindBoolean" } or { fg = C.text }, + DropBarKindBreakStatement = color and { link = "DropBarIconKindBreakStatement" } or { fg = C.text }, + DropBarKindCall = color and { link = "DropBarIconKindCall" } or { fg = C.text }, + DropBarKindCaseStatement = color and { link = "DropBarIconKindCaseStatement" } or { fg = C.text }, + DropBarKindClass = color and { link = "DropBarIconKindClass" } or { fg = C.text }, + DropBarKindConstant = color and { link = "DropBarIconKindConstant" } or { fg = C.text }, + DropBarKindConstructor = color and { link = "DropBarIconKindConstructor" } or { fg = C.text }, + DropBarKindContinueStatement = color and { link = "DropBarIconKindContinueStatement" } or { fg = C.text }, + DropBarKindDeclaration = color and { link = "DropBarIconKindDeclaration" } or { fg = C.text }, + DropBarKindDelete = color and { link = "DropBarIconKindDelete" } or { fg = C.text }, + DropBarKindDoStatement = color and { link = "DropBarIconKindDoStatement" } or { fg = C.text }, + DropBarKindElseStatement = color and { link = "DropBarIconKindElseStatement" } or { fg = C.text }, + DropBarKindEnum = color and { link = "DropBarIconKindEnum" } or { fg = C.text }, + DropBarKindEnumMember = color and { link = "DropBarIconKindEnumMember" } or { fg = C.text }, + DropBarKindEvent = color and { link = "DropBarIconKindEvent" } or { fg = C.text }, + DropBarKindField = color and { link = "DropBarIconKindField" } or { fg = C.text }, + DropBarKindFile = color and { link = "DropBarIconKindFile" } or { fg = C.text }, + DropBarKindFolder = color and { link = "DropBarIconKindFolder" } or { fg = C.text }, + DropBarKindForStatement = color and { link = "DropBarIconKindForStatement" } or { fg = C.text }, + DropBarKindFunction = color and { link = "DropBarIconKindFunction" } or { fg = C.text }, + DropBarKindIdentifier = color and { link = "DropBarIconKindIdentifier" } or { fg = C.text }, + DropBarKindIfStatement = color and { link = "DropBarIconKindIfStatement" } or { fg = C.text }, + DropBarKindInterface = color and { link = "DropBarIconKindInterface" } or { fg = C.text }, + DropBarKindKeyword = color and { link = "DropBarIconKindKeyword" } or { fg = C.text }, + DropBarKindList = color and { link = "DropBarIconKindList" } or { fg = C.text }, + DropBarKindMacro = color and { link = "DropBarIconKindMacro" } or { fg = C.text }, + DropBarKindMarkdownH1 = color and { link = "DropBarIconKindMarkdownH1" } or { fg = C.text }, + DropBarKindMarkdownH2 = color and { link = "DropBarIconKindMarkdownH2" } or { fg = C.text }, + DropBarKindMarkdownH3 = color and { link = "DropBarIconKindMarkdownH3" } or { fg = C.text }, + DropBarKindMarkdownH4 = color and { link = "DropBarIconKindMarkdownH4" } or { fg = C.text }, + DropBarKindMarkdownH5 = color and { link = "DropBarIconKindMarkdownH5" } or { fg = C.text }, + DropBarKindMarkdownH6 = color and { link = "DropBarIconKindMarkdownH6" } or { fg = C.text }, + DropBarKindMethod = color and { link = "DropBarIconKindMethod" } or { fg = C.text }, + DropBarKindModule = color and { link = "DropBarIconKindModule" } or { fg = C.text }, + DropBarKindNamespace = color and { link = "DropBarIconKindNamespace" } or { fg = C.text }, + DropBarKindNull = color and { link = "DropBarIconKindNull" } or { fg = C.text }, + DropBarKindNumber = color and { link = "DropBarIconKindNumber" } or { fg = C.text }, + DropBarKindObject = color and { link = "DropBarIconKindObject" } or { fg = C.text }, + DropBarKindOperator = color and { link = "DropBarIconKindOperator" } or { fg = C.text }, + DropBarKindPackage = color and { link = "DropBarIconKindPackage" } or { fg = C.text }, + DropBarKindProperty = color and { link = "DropBarIconKindProperty" } or { fg = C.text }, + DropBarKindReference = color and { link = "DropBarIconKindReference" } or { fg = C.text }, + DropBarKindRepeat = color and { link = "DropBarIconKindRepeat" } or { fg = C.text }, + DropBarKindScope = color and { link = "DropBarIconKindScope" } or { fg = C.text }, + DropBarKindSpecifier = color and { link = "DropBarIconKindSpecifier" } or { fg = C.text }, + DropBarKindStatement = color and { link = "DropBarIconKindStatement" } or { fg = C.text }, + DropBarKindString = color and { link = "DropBarIconKindString" } or { fg = C.text }, + DropBarKindStruct = color and { link = "DropBarIconKindStruct" } or { fg = C.text }, + DropBarKindSwitchStatement = color and { link = "DropBarIconKindSwitchStatement" } or { fg = C.text }, + DropBarKindType = color and { link = "DropBarIconKindType" } or { fg = C.text }, + DropBarKindTypeParameter = color and { link = "DropBarIconKindTypeParameter" } or { fg = C.text }, + DropBarKindUnit = color and { link = "DropBarIconKindUnit" } or { fg = C.text }, + DropBarKindValue = color and { link = "DropBarIconKindValue" } or { fg = C.text }, + DropBarKindVariable = color and { link = "DropBarIconKindVariable" } or { fg = C.text }, + DropBarKindWhileStatement = color and { link = "DropBarIconKindWhileStatement" } or { fg = C.text }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/fern.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/fern.lua new file mode 100644 index 0000000..4d3f744 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/fern.lua @@ -0,0 +1,11 @@ +local M = {} + +M.url = "https://github.com/lambdalisue/vim-fern" + +function M.get() + return { + FernBranchText = { fg = C.blue }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/fidget.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/fidget.lua new file mode 100644 index 0000000..d5b424d --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/fidget.lua @@ -0,0 +1,15 @@ +local M = {} + +M.url = "https://github.com/j-hui/fidget.nvim" + +function M.get() + return { + FidgetTask = { + bg = O.transparent_background and C.none or C.mantle, + fg = C.text, + }, + FidgetTitle = { fg = C.blue }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/flash.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/flash.lua new file mode 100644 index 0000000..fd4ed56 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/flash.lua @@ -0,0 +1,16 @@ +local M = {} + +M.url = "https://github.com/folke/flash.nvim" + +function M.get() + local bg = O.transparent_background and C.none or C.base + return { + FlashBackdrop = { fg = C.overlay0 }, + FlashLabel = { fg = C.green, bg = bg, style = { "bold" } }, + FlashMatch = { fg = C.lavender, bg = bg }, + FlashCurrent = { fg = C.peach, bg = bg }, + FlashPrompt = { link = "NormalFloat" }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/fzf.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/fzf.lua new file mode 100644 index 0000000..153f86c --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/fzf.lua @@ -0,0 +1,27 @@ +local M = {} + +M.url = "https://github.com/ibhagwan/fzf-lua" + +function M.get() + return { + FzfLuaNormal = { link = "NormalFloat" }, + FzfLuaBorder = { link = "FloatBorder" }, + FzfLuaTitle = { link = "FloatTitle" }, + FzfLuaHeaderBind = { fg = C.yellow }, + FzfLuaHeaderText = { fg = C.peach }, + FzfLuaDirPart = { link = "NonText" }, + FzfLuaFzfMatch = { fg = C.blue }, + FzfLuaFzfPrompt = { fg = C.blue }, + FzfLuaPathColNr = { fg = C.blue }, + FzfLuaPathLineNr = { fg = C.green }, + FzfLuaBufName = { fg = C.mauve }, + FzfLuaBufNr = { fg = C.yellow }, + FzfLuaBufFlagCur = { fg = C.peach }, + FzfLuaBufFlagAlt = { fg = C.blue }, + FzfLuaTabTitle = { fg = C.sky }, + FzfLuaTabMarker = { fg = C.yellow }, + FzfLuaLiveSym = { fg = C.peach }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/gitgraph.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/gitgraph.lua new file mode 100644 index 0000000..c367316 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/gitgraph.lua @@ -0,0 +1,21 @@ +local M = {} + +M.url = "https://github.com/isakbm/gitgraph.nvim" + +function M.get() + return { + GitGraphHash = { fg = C.mauve }, + GitGraphTimestamp = { fg = C.lavender }, + GitGraphAuthor = { fg = C.flamingo }, + GitGraphBranchName = { fg = C.teal }, + GitGraphBranchTag = { fg = C.pink }, + GitGraphBranchMsg = { fg = C.overlay2 }, + GitGraphBranch1 = { fg = C.yellow }, + GitGraphBranch2 = { fg = C.pink }, + GitGraphBranch3 = { fg = C.sky }, + GitGraphBranch4 = { fg = C.green }, + GitGraphBranch5 = { fg = C.red }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/gitgutter.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/gitgutter.lua new file mode 100644 index 0000000..24c1755 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/gitgutter.lua @@ -0,0 +1,16 @@ +local M = {} + +M.url = "https://github.com/airblade/vim-gitgutter" + +function M.get() + return { + GitGutterAdd = { fg = C.green }, + GitGutterChange = { fg = C.yellow }, + GitGutterDelete = { fg = C.red }, + GitGutterAddLineNr = { fg = C.green }, + GitGutterChangeLineNr = { fg = C.yellow }, + GitGutterDeleteLineNr = { fg = C.red }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/gitsigns.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/gitsigns.lua new file mode 100644 index 0000000..deb101e --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/gitsigns.lua @@ -0,0 +1,44 @@ +local M = {} + +M.url = "https://github.com/lewis6991/gitsigns.nvim" + +function M.get() + local transparent = U.nonnil(O.integrations.gitsigns.transparent, O.transparent_background) + + if transparent then + return { + GitSignsAdd = { fg = C.green }, -- diff mode: Added line |diff.txt| + GitSignsChange = { fg = C.yellow }, -- diff mode: Changed line |diff.txt| + GitSignsDelete = { fg = C.red }, -- diff mode: Deleted line |diff.txt| + + GitSignsCurrentLineBlame = { fg = C.surface1 }, + + GitSignsAddPreview = { fg = C.green, bg = C.none }, + GitSignsDeletePreview = { fg = C.red, bg = C.none }, + + -- for word diff in previews + GitSignsAddInline = { fg = C.base, bg = C.green, style = { "bold" } }, + GitSignsDeleteInline = { fg = C.base, bg = C.red, style = { "bold" } }, + GitSignsChangeInline = { fg = C.base, bg = C.blue, style = { "bold" } }, + + GitSignsDeleteVirtLn = { bg = C.none, fg = C.red }, + } + else + return { + GitSignsAdd = { fg = C.green }, -- diff mode: Added line |diff.txt| + GitSignsChange = { fg = C.yellow }, -- diff mode: Changed line |diff.txt| + GitSignsDelete = { fg = C.red }, -- diff mode: Deleted line |diff.txt| + + GitSignsCurrentLineBlame = { fg = C.surface1 }, + + GitSignsAddPreview = { link = "DiffAdd" }, + GitSignsDeletePreview = { link = "DiffDelete" }, + + GitSignsAddInline = { bg = U.darken(C.green, 0.36, C.base) }, + GitSignsChangeInline = { bg = U.darken(C.blue, 0.14, C.base) }, + GitSignsDeleteInline = { bg = U.darken(C.red, 0.36, C.base) }, + } + end +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/grug_far.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/grug_far.lua new file mode 100644 index 0000000..1e6eae0 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/grug_far.lua @@ -0,0 +1,11 @@ +local M = {} + +M.url = "https://github.com/MagicDuck/grug-far.nvim" + +function M.get() + return { + GrugFarResultsMatch = { link = "IncSearch" }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/harpoon.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/harpoon.lua new file mode 100644 index 0000000..2fd6959 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/harpoon.lua @@ -0,0 +1,12 @@ +local M = {} + +M.url = "https://github.com/ThePrimeagen/harpoon" + +function M.get() + return { + HarpoonWindow = { fg = C.text, bg = O.transparent_background and C.none or C.base }, + HarpoonBorder = { fg = C.blue }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/headlines.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/headlines.lua new file mode 100644 index 0000000..198ed3b --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/headlines.lua @@ -0,0 +1,20 @@ +local M = {} + +M.url = "https://github.com/lukas-reineke/headlines.nvim" + +function M.get() + return { + Dash = { fg = C.overlay2, style = { "bold" } }, + Quote = { link = "@markup.strong" }, + CodeBlock = { bg = C.mantle }, + Headline = { link = "Headline1" }, + Headline1 = { bg = C.surface0, fg = C.red }, + Headline2 = { bg = C.surface0, fg = C.peach }, + Headline3 = { bg = C.surface0, fg = C.yellow }, + Headline4 = { bg = C.surface0, fg = C.green }, + Headline5 = { bg = C.surface0, fg = C.sapphire }, + Headline6 = { bg = C.surface0, fg = C.lavender }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/hop.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/hop.lua new file mode 100644 index 0000000..f73f60c --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/hop.lua @@ -0,0 +1,15 @@ +local M = {} + +M.url = "https://github.com/hadronized/hop.nvim" + +function M.get() + local bg = O.transparent_background and C.none or C.base + return { + HopNextKey = { bg = bg, fg = C.peach, style = { "bold", "underline" } }, + HopNextKey1 = { bg = bg, fg = C.blue, style = { "bold" } }, + HopNextKey2 = { bg = bg, fg = C.teal, style = { "bold", "italic" } }, + HopUnmatched = { bg = bg, fg = C.overlay0 }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/illuminate.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/illuminate.lua new file mode 100644 index 0000000..5ccbe10 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/illuminate.lua @@ -0,0 +1,16 @@ +local M = {} + +M.url = "https://github.com/RRethy/vim-illuminate" + +function M.get() + return { + IlluminatedWordText = { bg = U.darken(C.surface1, 0.7, C.base) }, + IlluminatedWordRead = { bg = U.darken(C.surface1, 0.7, C.base) }, + IlluminatedWordWrite = { + bg = U.darken(C.surface1, 0.7, C.base), + style = O.integrations.illuminate.lsp and { "standout" } or {}, + }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/indent_blankline.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/indent_blankline.lua new file mode 100644 index 0000000..00e09e9 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/indent_blankline.lua @@ -0,0 +1,26 @@ +local M = {} + +M.url = "https://github.com/lukas-reineke/indent-blankline.nvim" + +function M.get() + local scope_color = U.select_color(O.integrations.indent_blankline.scope_color, "overlay2") + + local hi = { + IblIndent = { fg = C.surface0 }, + IblScope = { fg = scope_color }, + } + + if O.integrations.indent_blankline.colored_indent_levels then + hi["RainbowRed"] = { blend = 0, fg = C.red } + hi["RainbowYellow"] = { blend = 0, fg = C.yellow } + hi["RainbowBlue"] = { blend = 0, fg = C.blue } + hi["RainbowOrange"] = { blend = 0, fg = C.peach } + hi["RainbowGreen"] = { blend = 0, fg = C.green } + hi["RainbowViolet"] = { blend = 0, fg = C.mauve } + hi["RainbowCyan"] = { blend = 0, fg = C.teal } + end + + return hi +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/leap.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/leap.lua new file mode 100644 index 0000000..8b7db22 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/leap.lua @@ -0,0 +1,21 @@ +local M = {} + +M.url = "https://github.com/ggandor/leap.nvim" + +function M.get() + return { + LeapMatch = { + fg = O.transparent_background and C.pink or U.vary_color({ latte = "#222222" }, U.brighten(C.green, 0.3)), + style = { "underline", "nocombine", O.transparent_background and "bold" or nil }, + }, + LeapLabel = { + fg = O.transparent_background and C.green or U.vary_color({ latte = "#222222" }, C.base), + bg = O.transparent_background and C.none + or U.vary_color({ latte = U.brighten(C.red, 0.4) }, U.brighten(C.green, 0.3)), + style = { "nocombine", O.transparent_background and "bold" or nil }, + }, + LeapBackdrop = { fg = O.transparent_background and C.overlay0 or C.none }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/lightspeed.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/lightspeed.lua new file mode 100644 index 0000000..c6ee01a --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/lightspeed.lua @@ -0,0 +1,29 @@ +local M = {} + +M.url = "https://github.com/ggandor/lightspeed.nvim" + +function M.get() + return { + LightspeedLabel = { fg = C.red, style = { "bold", "underline" } }, + LightspeedLabelDistant = { + fg = U.vary_color({ latte = C.blue }, C.sky), + style = { "bold", "underline" }, + }, + LightspeedShortcut = { + fg = "#ffffff", + bg = U.increase_saturation(C.red, 0.7), + style = { "bold" }, + }, + LightspeedMaskedChar = { + fg = U.vary_color({ latte = U.lighten(C.pink, 0.7, C.text) }, U.darken(C.pink, 0.7, C.base)), + }, + LightspeedUnlabeledMatch = { fg = C.text, style = { "bold" } }, + LightspeedGreyWash = { link = "Comment" }, + LightspeedUniqueChar = { link = "LightspeedUnlabeledMatch" }, + LightspeedOneCharMatch = { link = "LightspeedShortcut" }, + LightspeedPendingOpArea = { link = "IncSearch" }, + LightspeedCursor = { link = "Cursor" }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/lir.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/lir.lua new file mode 100644 index 0000000..6952f60 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/lir.lua @@ -0,0 +1,28 @@ +local M = {} + +M.url = "https://github.com/tamago324/lir.nvim" + +function M.get() + return vim.tbl_deep_extend("force", {}, { + LirFloatNormal = { fg = C.text, bg = O.transparent_background and C.none or C.mantle }, + LirFloatBorder = { + fg = O.transparent_background and C.surface1 or C.base, + bg = O.transparent_background and C.none or C.base, + }, + LirFloatCursorLine = { link = "CursorLine" }, + LirDir = { fg = C.blue }, + LirSymLink = { fg = C.pink }, + LirEmptyDirText = { fg = C.blue }, + LirFloatCurdirWindowNormal = { fg = C.text }, + LirFloatCurdirWindowDirName = { fg = C.lavender, style = { "bold" } }, + }, ((O.integrations.lir and O.integrations.lir.git_status) and { + LirGitStatusBracket = { fg = C.overlay0 }, + LirGitStatusIndex = { fg = C.blue }, + LirGitStatusWorktree = { fg = C.yellow }, + LirGitStatusUnmerged = { fg = C.red }, + LirGitStatusUntracked = { fg = C.subtext0 }, + LirGitStatusIgnored = { fg = C.subtext0 }, + }) or {}) +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/lsp_saga.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/lsp_saga.lua new file mode 100644 index 0000000..2fc2319 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/lsp_saga.lua @@ -0,0 +1,134 @@ +local M = {} + +M.url = "https://github.com/nvimdev/lspsaga.nvim" + +function M.get() + return { + SagaTitle = { fg = C.teal, style = { "bold" } }, + SagaBorder = { fg = C.blue, bg = C.none }, + SagaNormal = { bg = O.transparent_background and C.none or C.base }, + SagaToggle = { fg = C.green }, + SagaCount = { fg = C.overlay1 }, + SagaBeacon = { bg = U.darken(C.surface0, 0.8, C.crust) }, + SagaVirtLine = { fg = C.surface2 }, + SagaSpinner = { fg = C.mauve, style = { "bold" } }, + SagaSpinnerTitle = { fg = C.mauve, style = { "bold" } }, + SagaText = { fg = C.text }, + SagaSelect = { fg = C.blue, style = { "bold" } }, + SagaSearch = { link = "Search" }, + SagaFinderFname = { fg = C.subtext0, style = { "bold" } }, + ActionFix = { fg = C.pink }, + ActionPreviewTitle = { fg = C.mauve, bg = O.transparent_background and C.none or C.base }, + CodeActionText = { fg = C.green }, + CodeActionNumber = { fg = C.pink }, + SagaImpIcon = { fg = C.pink }, + SagaLightBulb = { link = "DiagnosticSignHint" }, + RenameNormal = { fg = C.text }, + RenameMatch = { link = "Search" }, + DiagnosticText = { fg = C.text }, + SagaWinbarSep = { fg = C.flamingo }, + SagaDetail = { link = "Comment" }, + SagaFileName = { fg = C.overlay2, style = { "bold" } }, + SagaFolderName = { fg = C.overlay2, style = { "bold" } }, + SagaInCurrent = { fg = C.peach }, + + -- Lspkind icons support + LspKindClass = { fg = C.yellow }, + LspKindConstant = { fg = C.peach }, + LspKindConstructor = { fg = C.sapphire }, + LspKindEnum = { fg = C.yellow }, + LspKindEnumMember = { fg = C.teal }, + LspKindEvent = { fg = C.yellow }, + LspKindField = { fg = C.teal }, + LspKindFile = { fg = C.rosewater }, + LspKindFunction = { fg = C.blue }, + LspKindInterface = { fg = C.yellow }, + LspKindKey = { fg = C.red }, + LspKindMethod = { fg = C.blue }, + LspKindModule = { fg = C.blue }, + LspKindNamespace = { fg = C.blue }, + LspKindNumber = { fg = C.peach }, + LspKindOperator = { fg = C.sky }, + LspKindPackage = { fg = C.blue }, + LspKindProperty = { fg = C.teal }, + LspKindStruct = { fg = C.yellow }, + LspKindTypeParameter = { fg = C.blue }, + LspKindVariable = { fg = C.peach }, + LspKindArray = { fg = C.peach }, + LspKindBoolean = { fg = C.peach }, + LspKindNull = { fg = C.yellow }, + LspKindObject = { fg = C.yellow }, + LspKindString = { fg = C.green }, + -- ccls-specific icons. + LspKindTypeAlias = { fg = C.green }, + LspKindParameter = { fg = C.blue }, + LspKindStaticMethod = { fg = C.peach }, + -- Microsoft-specific icons. + LspKindText = { fg = C.green }, + LspKindSnippet = { fg = C.mauve }, + LspKindFolder = { fg = C.blue }, + LspKindUnit = { fg = C.green }, + LspKindValue = { fg = C.peach }, + } +end + +function M.custom_kind() + return { + File = { "󰈙 ", "LspKindFile" }, + Module = { " ", "LspKindModule" }, + Namespace = { "󰌗 ", "LspKindNamespace" }, + Package = { "󰏖 ", "LspKindPackage" }, + Class = { "󰌗 ", "LspKindClass" }, + Method = { " ", "LspKindMethod" }, + Property = { "󰆧 ", "LspKindProperty" }, + Field = { " ", "LspKindField" }, + Constructor = { " ", "LspKindConstructor" }, + Enum = { "󰒻", "LspKindEnum" }, + Interface = { " ", "LspKindInterface" }, + Function = { "󰊕 ", "LspKindFunction" }, + Variable = { " ", "LspKindVariable" }, + Constant = { " ", "LspKindConstant" }, + String = { "󰀬 ", "LspKindString" }, + Number = { "󰎠 ", "LspKindNumber" }, + Boolean = { " ", "LspKindBoolean" }, + Array = { "󰅪 ", "LspKindArray" }, + Object = { "󰅩 ", "LspKindObject" }, + Key = { "󰌋 ", "LspKindKey" }, + Null = { " ", "LspKindNull" }, + EnumMember = { " ", "LspKindEnumMember" }, + Struct = { "󰌗 ", "LspKindStruct" }, + Event = { " ", "LspKindEvent" }, + Operator = { "󰆕 ", "LspKindOperator" }, + TypeParameter = { "󰊄 ", "LspKindTypeParameter" }, + TypeAlias = { " ", "LspKindTypeAlias" }, + Parameter = { " ", "LspKindParameter" }, + StaticMethod = { "󰠄 ", "LspKindStaticMethod" }, + Macro = { " ", "LspKindMacro" }, + Text = { "󰉿 ", "LspKindText" }, + Snippet = { " ", "LspKindSnippet" }, + Folder = { " ", "LspKindFolder" }, + Unit = { "󰉻 ", "LspKindUnit" }, + Value = { " ", "LspKindValue" }, + } +end + +-- Backwards compatibility +function M.custom_colors() + local C = require("catppuccin.palettes").get_palette() + return { + normal_bg = C.base, + title_bg = C.green, + red = C.red, + magenta = C.maroon, + orange = C.peach, + yellow = C.yellow, + green = C.green, + cyan = C.sky, + blue = C.blue, + purple = C.mauve, + white = C.text, + black = C.crust, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/lsp_trouble.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/lsp_trouble.lua new file mode 100644 index 0000000..08a1c66 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/lsp_trouble.lua @@ -0,0 +1,14 @@ +local M = {} + +M.url = "https://github.com/folke/trouble.nvim" + +function M.get() + return { + TroubleText = { fg = C.green }, + TroubleCount = { fg = C.pink, bg = O.transparent_background and C.none or C.surface1 }, + TroubleNormal = { fg = C.text, bg = O.transparent_background and C.none or C.crust }, + TroubleNormalNC = { link = "TroubleNormal" }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/markview.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/markview.lua new file mode 100644 index 0000000..fada4f6 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/markview.lua @@ -0,0 +1,50 @@ +local M = {} + +M.url = "https://github.com/OXY2DEV/markview.nvim" + +-- markview.nvim highlight groups: +-- https://github.com/OXY2DEV/markview.nvim#-highlight-groups + +function M.get() + local darkening_percentage = O.transparent_background and U.vary_color({ latte = 0.15 }, 0.28) or 0.095 + + local blockquote_bg = not O.transparent_background and C.mantle or nil + + local groups = { + MarkviewBlockQuoteDefault = { fg = C.overlay2, bg = C.mantle }, + MarkviewBlockQuoteError = { fg = C.red, bg = U.darken(C.red, darkening_percentage, blockquote_bg) }, + MarkviewBlockQuoteNote = { fg = C.blue, bg = U.darken(C.blue, darkening_percentage, blockquote_bg) }, + MarkviewBlockQuoteOk = { fg = C.green, bg = U.darken(C.green, darkening_percentage, blockquote_bg) }, + MarkviewBlockQuoteSpecial = { fg = C.mauve, bg = U.darken(C.pink, darkening_percentage, blockquote_bg) }, + MarkviewBlockQuoteWarn = { fg = C.yellow, bg = U.darken(C.yellow, darkening_percentage, blockquote_bg) }, + + MarkviewHyperlink = { link = "@markup.link.url" }, + + MarkviewCode = { bg = C.mantle }, + MarkviewCodeFg = { fg = C.mantle }, + MarkviewCodeInfo = { fg = C.overlay2, bg = C.mantle }, + MarkviewInlineCode = { bg = C.surface0 }, + + MarkviewTableHeader = { fg = C.blue }, + } + + local rainbow = { + [0] = C.overlay2, + [7] = C.mauve, + } + + local syntax = require("catppuccin.groups.syntax").get() + + for i = 0, 7 do + local color = rainbow[i] or syntax["rainbow" .. i].fg + local bg = U.darken(color, darkening_percentage, C.base) + groups["MarkviewPalette" .. i] = { fg = color, bg = bg } + groups["MarkviewPalette" .. i .. "Fg"] = { fg = color } + groups["MarkviewPalette" .. i .. "Bg"] = { bg = bg } + groups["MarkviewIcon" .. i] = { fg = color, bg = C.mantle } + end + + return groups +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/mason.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/mason.lua new file mode 100644 index 0000000..810ec1c --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/mason.lua @@ -0,0 +1,40 @@ +local M = {} + +M.url = "https://github.com/mason-org/mason.nvim" + +function M.get() + local bg = O.transparent_background and C.none or C.lavender + local fg = O.transparent_background and C.lavender or C.base + + local secondary_bg = O.transparent_background and C.none or C.blue + local secondary_fg = O.transparent_background and C.blue or C.base + + local muted_bg = O.transparent_background and C.none or C.overlay0 + local muted_fg = O.transparent_background and C.overlay0 or C.base + + return { + MasonHeader = { fg = fg, bg = bg, style = { "bold" } }, + MasonHeaderSecondary = { fg = secondary_fg, bg = secondary_bg, style = { "bold" } }, + + MasonHighlight = { fg = C.green }, + MasonHighlightBlock = { + bg = O.transparent_background and C.none or C.green, + fg = O.transparent_background and C.green or C.base, + }, + MasonHighlightBlockBold = { bg = secondary_bg, fg = secondary_fg, bold = true }, + + MasonHighlightSecondary = { fg = C.mauve }, + MasonHighlightBlockSecondary = { fg = secondary_fg, bg = secondary_bg }, + MasonHighlightBlockBoldSecondary = { fg = fg, bg = bg, bold = true }, + + MasonMuted = { fg = C.overlay0 }, + MasonMutedBlock = { bg = muted_bg, fg = muted_fg }, + MasonMutedBlockBold = { bg = C.yellow, fg = C.base, bold = true }, + + MasonError = { fg = C.red }, + + MasonHeading = { fg = C.lavender, bold = true }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/mini.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/mini.lua new file mode 100644 index 0000000..f5888dc --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/mini.lua @@ -0,0 +1,168 @@ +local M = {} + +M.url = "https://github.com/echasnovski/mini.nvim" + +function M.get() + local transparent_background = O.transparent_background + local bg_highlight = transparent_background and "NONE" or C.base + + local inactive_bg = transparent_background and "NONE" or C.mantle + + local indentscope_color = U.select_color(O.integrations.mini.indentscope_color, "overlay2") + return { + MiniAnimateCursor = { style = { "reverse", "nocombine" } }, + MiniAnimateNormalFloat = { link = "NormalFloat" }, + + MiniClueBorder = { link = "FloatBorder" }, + MiniClueDescGroup = { link = "DiagnosticFloatingWarn" }, + MiniClueDescSingle = { link = "NormalFloat" }, + MiniClueNextKey = { link = "DiagnosticFloatingHint" }, + MiniClueNextKeyWithPostkeys = { link = "DiagnosticFloatingError" }, + MiniClueSeparator = { link = "DiagnosticFloatingInfo" }, + MiniClueTitle = { link = "FloatTitle" }, + + MiniCompletionActiveParameter = { style = { "underline" } }, + + MiniCursorword = { style = { "underline" } }, + MiniCursorwordCurrent = { style = { "underline" } }, + + MiniDepsChangeAdded = { link = "diffAdded" }, + MiniDepsChangeRemoved = { link = "diffRemoved" }, + MiniDepsHint = { link = "DiagnosticHint" }, + MiniDepsInfo = { link = "DiagnosticInfo" }, + MiniDepsMsgBreaking = { link = "DiagnosticWarn" }, + MiniDepsPlaceholder = { link = "Comment" }, + MiniDepsTitle = { link = "Title" }, + MiniDepsTitleError = { bg = C.red, fg = C.base }, + MiniDepsTitleSame = { link = "DiffText" }, + MiniDepsTitleUpdate = { bg = C.green, fg = C.base }, + + MiniDiffSignAdd = { fg = C.green }, + MiniDiffSignChange = { fg = C.yellow }, + MiniDiffSignDelete = { fg = C.red }, + MiniDiffOverAdd = { link = "DiffAdd" }, + MiniDiffOverChange = { link = "DiffText" }, + MiniDiffOverContext = { link = "DiffChange" }, + MiniDiffOverDelete = { link = "DiffDelete" }, + + MiniFilesBorder = { link = "FloatBorder" }, + MiniFilesBorderModified = { link = "DiagnosticFloatingWarn" }, + MiniFilesCursorLine = { link = "CursorLine" }, + MiniFilesDirectory = { link = "Directory" }, + MiniFilesFile = { fg = C.text }, + MiniFilesNormal = { link = "NormalFloat" }, + MiniFilesTitle = { link = "FloatTitle" }, + MiniFilesTitleFocused = O.float.solid and { + fg = C.crust, + bg = C.mauve, + } or { + fg = C.subtext0, + bg = (O.float.transparent and vim.o.winblend == 0) and C.none or C.mantle, + style = { "bold" }, + }, + + MiniHipatternsFixme = { fg = C.base, bg = C.red, style = { "bold" } }, + MiniHipatternsHack = { fg = C.base, bg = C.yellow, style = { "bold" } }, + MiniHipatternsNote = { fg = C.base, bg = C.sky, style = { "bold" } }, + MiniHipatternsTodo = { fg = C.base, bg = C.teal, style = { "bold" } }, + + MiniIconsAzure = { fg = C.sapphire }, + MiniIconsBlue = { fg = C.blue }, + MiniIconsCyan = { fg = C.teal }, + MiniIconsGreen = { fg = C.green }, + MiniIconsGrey = { fg = C.text }, + MiniIconsOrange = { fg = C.peach }, + MiniIconsPurple = { fg = C.mauve }, + MiniIconsRed = { fg = C.red }, + MiniIconsYellow = { fg = C.yellow }, + + MiniIndentscopeSymbol = { fg = indentscope_color }, + + MiniJump = { fg = C.overlay2, bg = C.pink }, + + MiniJump2dDim = { fg = C.overlay0 }, + MiniJump2dSpot = { bg = C.base, fg = C.peach, style = { "bold", "underline" } }, + MiniJump2dSpotAhead = { bg = C.dim, fg = C.teal }, + MiniJump2dSpotUnique = { bg = C.base, fg = C.sky, style = { "bold" } }, + + MiniMapNormal = { link = "NormalFloat" }, + MiniMapSymbolCount = { link = "Special" }, + MiniMapSymbolLine = { link = "Title" }, + MiniMapSymbolView = { link = "Delimiter" }, + + MiniNotifyBorder = { link = "FloatBorder" }, + MiniNotifyNormal = { link = "NormalFloat" }, + MiniNotifyTitle = { link = "FloatTitle" }, + + MiniOperatorsExchangeFrom = { link = "IncSearch" }, + + MiniPickBorder = { link = "FloatBorder" }, + MiniPickBorderBusy = { link = "DiagnosticFloatingWarn" }, + MiniPickBorderText = O.float.solid and { + fg = C.crust, + bg = C.mauve, + } or { fg = C.mauve, bg = (O.float.transparent and vim.o.winblend == 0) and C.none or C.mantle }, + MiniPickIconDirectory = { link = "Directory" }, + MiniPickIconFile = { link = "MiniPickNormal" }, + MiniPickHeader = { link = "DiagnosticFloatingHint" }, + MiniPickMatchCurrent = { + fg = C.flamingo, + bg = C.surface0, + style = { "bold" }, + }, + MiniPickMatchMarked = { link = "Visual" }, + MiniPickMatchRanges = { link = "DiagnosticFloatingHint" }, + MiniPickNormal = { link = "NormalFloat" }, + MiniPickPreviewLine = { link = "CursorLine" }, + MiniPickPreviewRegion = { link = "IncSearch" }, + MiniPickPrompt = { fg = C.text, bg = O.float.transparent and C.none or C.mantle }, + MiniPickPromptCaret = { + fg = C.flamingo, + bg = O.float.transparent and C.none or C.mantle, + }, + MiniPickPromptPrefix = { + fg = C.flamingo, + bg = O.float.transparent and C.none or C.mantle, + }, + + MiniStarterCurrent = {}, + MiniStarterFooter = { fg = C.yellow, style = { "italic" } }, + MiniStarterHeader = { fg = C.blue }, + MiniStarterInactive = { fg = C.surface2, style = O.styles.comments }, + MiniStarterItem = { fg = C.text }, + MiniStarterItemBullet = { fg = C.blue }, + MiniStarterItemPrefix = { fg = C.pink }, + MiniStarterSection = { fg = C.flamingo }, + MiniStarterQuery = { fg = C.green }, + + MiniStatuslineDevinfo = { fg = C.subtext1, bg = C.surface1 }, + MiniStatuslineFileinfo = { fg = C.subtext1, bg = C.surface1 }, + MiniStatuslineFilename = { fg = C.text, bg = C.mantle }, + MiniStatuslineInactive = { fg = C.blue, bg = C.mantle }, + MiniStatuslineModeCommand = { fg = C.base, bg = C.peach, style = { "bold" } }, + MiniStatuslineModeInsert = { fg = C.base, bg = C.green, style = { "bold" } }, + MiniStatuslineModeNormal = { fg = C.mantle, bg = C.blue, style = { "bold" } }, + MiniStatuslineModeOther = { fg = C.base, bg = C.teal, style = { "bold" } }, + MiniStatuslineModeReplace = { fg = C.base, bg = C.red, style = { "bold" } }, + MiniStatuslineModeVisual = { fg = C.base, bg = C.mauve, style = { "bold" } }, + + MiniSurround = { bg = C.pink, fg = C.surface1 }, + + MiniTablineCurrent = { fg = C.text, bg = C.base, sp = C.red, style = { "bold", "italic", "underline" } }, + MiniTablineFill = { bg = bg_highlight }, + MiniTablineHidden = { fg = C.text, bg = inactive_bg }, + MiniTablineModifiedCurrent = { fg = C.red, bg = C.none, style = { "bold", "italic" } }, + MiniTablineModifiedHidden = { fg = C.red, bg = C.none }, + MiniTablineModifiedVisible = { fg = C.red, bg = C.none }, + MiniTablineTabpagesection = { fg = C.surface1, bg = C.base }, + MiniTablineVisible = { bg = C.none }, + + MiniTestEmphasis = { style = { "bold" } }, + MiniTestFail = { fg = C.red, style = { "bold" } }, + MiniTestPass = { fg = C.green, style = { "bold" } }, + + MiniTrailspace = { bg = C.red }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/navic.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/navic.lua new file mode 100644 index 0000000..5554e0f --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/navic.lua @@ -0,0 +1,44 @@ +local M = {} + +M.url = "https://github.com/SmiteshP/nvim-navic" + +function M.get() + local background = O.integrations.navic.custom_bg or C.none + if O.integrations.navic.custom_bg == "lualine" then background = C.mantle end + if background ~= C.none and string.sub(background, 0, 1) ~= "#" then + background = U.select_color(background, "none") + end + + return { + NavicIconsFile = { fg = C.blue, bg = background }, + NavicIconsModule = { fg = C.blue, bg = background }, + NavicIconsNamespace = { fg = C.blue, bg = background }, + NavicIconsPackage = { fg = C.blue, bg = background }, + NavicIconsClass = { fg = C.yellow, bg = background }, + NavicIconsMethod = { fg = C.blue, bg = background }, + NavicIconsProperty = { fg = C.green, bg = background }, + NavicIconsField = { fg = C.green, bg = background }, + NavicIconsConstructor = { fg = C.blue, bg = background }, + NavicIconsEnum = { fg = C.green, bg = background }, + NavicIconsInterface = { fg = C.yellow, bg = background }, + NavicIconsFunction = { fg = C.blue, bg = background }, + NavicIconsVariable = { fg = C.flamingo, bg = background }, + NavicIconsConstant = { fg = C.peach, bg = background }, + NavicIconsString = { fg = C.green, style = O.styles.strings, bg = background }, + NavicIconsNumber = { fg = C.peach, bg = background }, + NavicIconsBoolean = { fg = C.peach, bg = background }, + NavicIconsArray = { fg = C.peach, bg = background }, + NavicIconsObject = { fg = C.peach, bg = background }, + NavicIconsKey = { fg = C.pink, style = O.styles.keywords, bg = background }, + NavicIconsNull = { fg = C.peach, bg = background }, + NavicIconsEnumMember = { fg = C.red, bg = background }, + NavicIconsStruct = { fg = C.blue, bg = background }, + NavicIconsEvent = { fg = C.blue, bg = background }, + NavicIconsOperator = { fg = C.sky, bg = background }, + NavicIconsTypeParameter = { fg = C.blue, bg = background }, + NavicText = { fg = C.sapphire, bg = background }, + NavicSeparator = { fg = C.text, bg = background }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/neogit.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/neogit.lua new file mode 100644 index 0000000..7ba427a --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/neogit.lua @@ -0,0 +1,257 @@ +local M = {} + +M.url = "https://github.com/NeogitOrg/neogit" + +function M.get() + return { + NeogitBranch = { + fg = C.peach, + style = { "bold" }, + }, + NeogitRemote = { + fg = C.green, + style = { "bold" }, + }, + NeogitUnmergedInto = { + link = "Function", + }, + NeogitUnpulledFrom = { + link = "Function", + }, + NeogitObjectId = { + link = "Comment", + }, + NeogitStash = { + link = "Comment", + }, + NeogitRebaseDone = { + link = "Comment", + }, + NeogitHunkHeader = { + bg = U.darken(C.blue, 0.095, C.base), + fg = U.darken(C.blue, 0.5, C.base), + }, + NeogitHunkHeaderHighlight = { + bg = U.darken(C.blue, 0.215, C.base), + fg = C.blue, + }, + NeogitDiffContextHighlight = { + bg = C.surface0, + }, + NeogitDiffDeleteHighlight = { + bg = U.darken(C.red, 0.345, C.base), + fg = U.lighten(C.red, 0.850, C.text), + }, + NeogitDiffAddHighlight = { + bg = U.darken(C.green, 0.345, C.base), + fg = U.lighten(C.green, 0.850, C.text), + }, + NeogitDiffDelete = { + bg = U.darken(C.red, 0.095, C.base), + fg = U.darken(C.red, 0.800, C.base), + }, + NeogitDiffDeleteInline = { + bg = U.darken(C.red, 0.500, C.base), + style = { "bold" }, + }, + NeogitDiffAdd = { + bg = U.darken(C.green, 0.095, C.base), + fg = U.darken(C.green, 0.800, C.base), + }, + NeogitDiffAddInline = { + bg = U.darken(C.green, 0.500, C.base), + style = { "bold" }, + }, + NeogitCommitViewHeader = { + bg = U.darken(C.blue, 0.300, C.base), + fg = U.lighten(C.blue, 0.800, C.text), + }, + NeogitChangeModified = { + fg = C.blue, + style = { "bold" }, + }, + NeogitChangeDeleted = { + fg = C.red, + style = { "bold" }, + }, + NeogitChangeAdded = { + fg = C.green, + style = { "bold" }, + }, + NeogitChangeRenamed = { + fg = C.mauve, + style = { "bold" }, + }, + NeogitChangeUpdated = { + fg = C.peach, + style = { "bold" }, + }, + NeogitChangeCopied = { + fg = C.pink, + style = { "bold" }, + }, + NeogitChangeBothModified = { + fg = C.yellow, + style = { "bold" }, + }, + NeogitChangeNewFile = { + fg = C.green, + style = { "bold" }, + }, + NeogitUntrackedfiles = { + fg = C.mauve, + style = { "bold" }, + }, + NeogitUnstagedchanges = { + fg = C.mauve, + style = { "bold" }, + }, + NeogitUnmergedchanges = { + fg = C.mauve, + style = { "bold" }, + }, + NeogitUnpulledchanges = { + fg = C.mauve, + style = { "bold" }, + }, + NeogitRecentcommits = { + fg = C.mauve, + style = { "bold" }, + }, + NeogitStagedchanges = { + fg = C.mauve, + style = { "bold" }, + }, + NeogitStashes = { + fg = C.mauve, + style = { "bold" }, + }, + NeogitRebasing = { + fg = C.mauve, + style = { "bold" }, + }, + NeogitNotificationInfo = { + fg = C.blue, + }, + NeogitNotificationWarning = { + fg = C.yellow, + }, + NeogitNotificationError = { + fg = C.red, + }, + NeogitGraphRed = { + fg = C.red, + }, + NeogitGraphWhite = { + fg = C.base, + }, + NeogitGraphYellow = { + fg = C.yellow, + }, + NeogitGraphGreen = { + fg = C.green, + }, + NeogitGraphCyan = { + fg = C.blue, + }, + NeogitGraphBlue = { + fg = C.blue, + }, + NeogitGraphPurple = { + fg = C.lavender, + }, + NeogitGraphGray = { + fg = C.subtext1, + }, + NeogitGraphOrange = { + fg = C.peach, + }, + NeogitGraphBoldRed = { + fg = C.red, + style = { "bold" }, + }, + NeogitGraphBoldWhite = { + fg = C.white, + style = { "bold" }, + }, + NeogitGraphBoldYellow = { + fg = C.yellow, + style = { "bold" }, + }, + NeogitGraphBoldGreen = { + fg = C.green, + style = { "bold" }, + }, + NeogitGraphBoldCyan = { + fg = C.blue, + style = { "bold" }, + }, + NeogitGraphBoldBlue = { + fg = C.blue, + style = { "bold" }, + }, + NeogitGraphBoldPurple = { + fg = C.lavender, + style = { "bold" }, + }, + NeogitGraphBoldGray = { + fg = C.subtext1, + style = { "bold" }, + }, + NeogitDiffContext = { + bg = C.base, + }, + NeogitPopupBold = { + style = { "bold" }, + }, + NeogitPopupSwitchKey = { + fg = C.lavender, + }, + NeogitPopupOptionKey = { + fg = C.lavender, + }, + NeogitPopupConfigKey = { + fg = C.lavender, + }, + NeogitPopupActionKey = { + fg = C.lavender, + }, + NeogitFilePath = { + fg = C.blue, + style = { "italic" }, + }, + NeogitDiffHeader = { + bg = C.base, + fg = C.blue, + style = { "bold" }, + }, + NeogitDiffHeaderHighlight = { + bg = C.base, + fg = C.peach, + style = { "bold" }, + }, + NeogitUnpushedTo = { + fg = C.lavender, + style = { "bold" }, + }, + NeogitFold = { + fg = C.none, + bg = C.none, + }, + NeogitSectionHeader = { + fg = C.mauve, + style = { "bold" }, + }, + NeogitTagName = { + fg = C.yellow, + }, + NeogitTagDistance = { + fg = C.blue, + }, + NeogitWinSeparator = { + link = "WinSeparator", + }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/neotest.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/neotest.lua new file mode 100644 index 0000000..d502010 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/neotest.lua @@ -0,0 +1,26 @@ +local M = {} + +M.url = "https://github.com/nvim-neotest/neotest" + +function M.get() + return { + NeotestPassed = { fg = C.green }, + NeotestFailed = { fg = C.red }, + NeotestRunning = { fg = C.yellow }, + NeotestSkipped = { fg = C.blue }, + NeotestTest = { fg = C.text }, + NeotestNamespace = { fg = C.mauve }, + NeotestFocused = { style = { "bold", "underline" } }, + NeotestFile = { fg = C.blue }, + NeotestDir = { fg = C.blue }, + NeotestIndent = { fg = C.overlay1 }, + NeotestExpandMarker = { fg = C.overlay1 }, + NeotestAdapterName = { fg = C.maroon }, + NeotestWinSelect = { fg = C.blue, style = { "bold" } }, + NeotestMarked = { fg = C.peach, style = { "bold" } }, + NeotestTarget = { fg = C.red }, + NeotestUnknown = { fg = C.text }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/neotree.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/neotree.lua new file mode 100644 index 0000000..f170d8f --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/neotree.lua @@ -0,0 +1,48 @@ +local M = {} + +M.url = "https://github.com/nvim-neo-tree/neo-tree.nvim" + +function M.get() + local active_bg = O.transparent_background and C.none or C.mantle + local inactive_bg = O.transparent_background and C.none or C.base + return { + NeoTreeDirectoryName = { fg = C.blue }, + NeoTreeDirectoryIcon = { fg = C.blue }, + NeoTreeNormal = { fg = C.text, bg = active_bg }, + NeoTreeNormalNC = { fg = C.text, bg = active_bg }, + NeoTreeExpander = { fg = C.overlay0 }, + NeoTreeIndentMarker = { fg = C.overlay0 }, + NeoTreeRootName = { fg = C.blue, style = { "bold" } }, + NeoTreeSymbolicLinkTarget = { fg = C.pink }, + NeoTreeModified = { fg = C.peach }, + + NeoTreeGitAdded = { fg = C.green }, + NeoTreeGitConflict = { fg = C.red }, + NeoTreeGitDeleted = { fg = C.red }, + NeoTreeGitIgnored = { fg = C.overlay0 }, + NeoTreeGitModified = { fg = C.yellow }, + NeoTreeGitUnstaged = { fg = C.red }, + NeoTreeGitUntracked = { fg = C.mauve }, + NeoTreeGitStaged = { fg = C.green }, + + NeoTreeFloatBorder = { link = "FloatBorder" }, + NeoTreeFloatTitle = { link = "FloatTitle" }, + NeoTreeTitleBar = { fg = C.mantle, bg = C.blue }, + + NeoTreeFileNameOpened = { fg = C.pink }, + NeoTreeDimText = { fg = C.overlay1 }, + NeoTreeFilterTerm = { fg = C.green, style = { "bold" } }, + NeoTreeTabActive = { bg = active_bg, fg = C.lavender, style = { "bold" } }, + NeoTreeTabInactive = { bg = inactive_bg, fg = C.overlay0 }, + NeoTreeTabSeparatorActive = { fg = active_bg, bg = active_bg }, + NeoTreeTabSeparatorInactive = { fg = inactive_bg, bg = inactive_bg }, + NeoTreeVertSplit = { fg = C.base, bg = inactive_bg }, + NeoTreeWinSeparator = { + fg = O.transparent_background and C.surface1 or C.base, + bg = O.transparent_background and C.none or C.base, + }, + NeoTreeStatusLineNC = { fg = C.mantle, bg = C.mantle }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/noice.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/noice.lua new file mode 100644 index 0000000..a169500 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/noice.lua @@ -0,0 +1,28 @@ +local M = {} + +M.url = "https://github.com/folke/noice.nvim" + +local virtual_text = O.lsp_styles.virtual_text + +function M.get() + return { -- Personally the default integration is already pretty good + NoiceCmdline = { fg = C.text }, + NoiceCmdlineIcon = { fg = C.sky, style = virtual_text.information }, + NoiceCmdlineIconSearch = { fg = C.yellow }, + NoiceCmdlinePopupBorder = { fg = C.lavender }, + NoiceCmdlinePopupBorderSearch = { fg = C.yellow }, + NoiceConfirmBorder = { fg = C.blue }, + NoiceMini = { fg = C.subtext0, blend = 0 }, + NoiceFormatProgressDone = { + bg = O.transparent_background and C.none or U.darken(C.sky, 0.30, C.base), + fg = C.subtext0, + }, + NoiceFormatProgressTodo = { + bg = O.transparent_background and C.none + or U.vary_color({ latte = U.lighten(C.mantle, 0.70, C.base) }, U.darken(C.surface0, 0.64, C.base)), + fg = C.subtext0, + }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/notifier.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/notifier.lua new file mode 100644 index 0000000..8853a6e --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/notifier.lua @@ -0,0 +1,13 @@ +local M = {} + +M.url = "https://github.com/vigoux/notifier.nvim" + +function M.get() + return { + NotifierIcon = { fg = C.mauve }, + NotifierContent = { fg = C.overlay2, blend = 0, style = { "italic" } }, + NotifierContentDim = { fg = C.overlay1, blend = 0, style = { "italic" } }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/notify.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/notify.lua new file mode 100644 index 0000000..7d0ccfb --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/notify.lua @@ -0,0 +1,27 @@ +local M = {} + +M.url = "https://github.com/rcarriga/nvim-notify" + +function M.get() + return { + NotifyBackground = { bg = (O.transparent_background and vim.o.winblend == 0) and "#000000" or C.mantle }, + + NotifyERRORBorder = { fg = C.red }, + NotifyERRORIcon = { fg = C.red }, + NotifyERRORTitle = { fg = C.red, style = { "italic" } }, + NotifyWARNBorder = { fg = C.yellow }, + NotifyWARNIcon = { fg = C.yellow }, + NotifyWARNTitle = { fg = C.yellow, style = { "italic" } }, + NotifyINFOBorder = { fg = C.blue }, + NotifyINFOIcon = { fg = C.blue }, + NotifyINFOTitle = { fg = C.blue, style = { "italic" } }, + NotifyDEBUGBorder = { fg = C.peach }, + NotifyDEBUGIcon = { fg = C.peach }, + NotifyDEBUGTitle = { fg = C.peach, style = { "italic" } }, + NotifyTRACEBorder = { fg = C.rosewater }, + NotifyTRACEIcon = { fg = C.rosewater }, + NotifyTRACETitle = { fg = C.rosewater, style = { "italic" } }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/nvim_surround.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/nvim_surround.lua new file mode 100644 index 0000000..1869a3c --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/nvim_surround.lua @@ -0,0 +1,11 @@ +local M = {} + +M.url = "https://github.com/kylechui/nvim-surround" + +function M.get() + return { + NvimSurroundHighlight = { sp = C.peach, style = { "underline" } }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/nvimtree.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/nvimtree.lua new file mode 100644 index 0000000..552b9f4 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/nvimtree.lua @@ -0,0 +1,29 @@ +local M = {} + +M.url = "https://github.com/nvim-tree/nvim-tree.lua" + +function M.get() + return { + NvimTreeFolderName = { fg = C.blue }, + NvimTreeFolderIcon = { fg = C.blue }, + NvimTreeNormal = { fg = C.text, bg = O.transparent_background and C.none or C.mantle }, + NvimTreeOpenedFolderName = { fg = C.blue }, + NvimTreeEmptyFolderName = { fg = C.blue }, + NvimTreeIndentMarker = { fg = C.overlay0 }, + NvimTreeWinSeparator = { + fg = O.transparent_background and C.surface1 or C.base, + bg = O.transparent_background and C.none or C.base, + }, + NvimTreeRootFolder = { fg = C.lavender, style = { "bold" } }, + NvimTreeSymlink = { fg = C.pink }, + NvimTreeStatuslineNc = { fg = C.mantle, bg = C.mantle }, + NvimTreeGitDirty = { fg = C.yellow }, + NvimTreeGitNew = { fg = C.blue }, + NvimTreeGitDeleted = { fg = C.red }, + NvimTreeSpecialFile = { fg = C.flamingo }, + NvimTreeImageFile = { fg = C.text }, + NvimTreeOpenedFile = { fg = C.pink }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/octo.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/octo.lua new file mode 100644 index 0000000..7fbfa72 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/octo.lua @@ -0,0 +1,83 @@ +local M = {} + +M.url = "https://github.com/pwntester/octo.nvim" + +function M.get() + return { + -- colors + OctoGrey = { fg = C.base }, + OctoBlue = { fg = C.blue }, + OctoGreen = { fg = C.green }, + OctoRed = { fg = C.red }, + OctoPurple = { fg = C.mauve }, + OctoYellow = { fg = C.yellow }, + -- highlight groups + OctoDirty = { link = "ErrorMsg" }, + OctoIssueTitle = { link = "PreProc" }, + OctoIssueId = { link = "Question" }, + OctoEmpty = { link = "Comment" }, + OctoFloat = { link = "NormalNC" }, + OctoDate = { link = "Comment" }, + OctoSymbol = { link = "Comment" }, + OctoTimelineItemHeading = { link = "Comment" }, + OctoDetailsLabel = { link = "Title" }, + OctoMissingDetails = { link = "Comment" }, + OctoDetailsValue = { link = "Identifier" }, + OctoDiffHunkPosition = { link = "NormalFloat" }, + OctoCommentLine = { link = "TabLineSel" }, + OctoViewer = { fg = C.base, bg = C.blue }, + OctoBubble = { fg = C.text, bg = C.base }, + OctoBubbleGrey = { fg = C.text, bg = C.base }, + OctoBubbleDelimiterGrey = { fg = C.base }, + OctoBubbleGreen = { fg = C.base, bg = C.green }, + OctoBubbleDelimiterGreen = { fg = C.green }, + OctoBubbleBlue = { fg = C.base, bg = C.sky }, + OctoBubbleDelimiterBlue = { fg = C.sky }, + OctoBubbleYellow = { fg = C.base, bg = C.yellow }, + OctoBubbleDelimiterYellow = { fg = C.yellow }, + OctoBubbleRed = { fg = C.base, bg = C.red }, + OctoBubbleDelimiterRed = { fg = C.red }, + OctoBubblePurple = { fg = C.base, bg = C.mauve }, + OctoBubbleDelimiterPurple = { fg = C.mauve }, + OctoUser = { link = "OctoBubble" }, + OctoUserViewer = { link = "OctoViewer" }, + OctoReaction = { link = "OctoBubble" }, + OctoReactionViewer = { link = "OctoViewer" }, + OctoPassingTest = { link = "OctoGreen" }, + OctoFailingTest = { link = "OctoRed" }, + OctoPullAdditions = { link = "OctoGreen" }, + OctoPullDeletions = { link = "OctoRed" }, + OctoPullModifications = { fg = C.peach }, + OctoStateOpen = { fg = C.green, bg = C.base }, + OctoStateOpenFloat = { fg = C.green, bg = C.base }, + OctoStateClosed = { fg = C.red, bg = C.base }, + OctoStateClosedFloat = { fg = C.red, bg = C.base }, + OctoStateMerged = { fg = C.mauve, bg = C.base }, + OctoStateMergedFloat = { fg = C.mauve, bg = C.base }, + OctoStatePending = { fg = C.peach, bg = C.base }, + OctoStatePendingFloat = { fg = C.peach, bg = C.base }, + OctoStateApproved = { link = "OctoStateOpen" }, + OctoStateApprovedFloat = { link = "OctoStateOpen" }, + OctoStateChangesRequested = { fg = C.maroon, bg = C.base }, + OctoStateChangesRequestedFloat = { fg = C.maroon, bg = C.base }, + OctoStateCommented = { link = "Normal" }, + OctoStateCommentedFloat = { link = "Normal" }, + OctoStateDismissed = { link = "OctoStateClosed" }, + OctoStateDismissedFloat = { link = "OctoStateClosed" }, + OctoStateSubmittedBubble = { link = "OctoBubbleGreen" }, + OctoFilePanelCounter = { fg = C.blue, style = { "bold" } }, + OctoFilePanelTitle = { fg = C.blue, style = { "bold" } }, + OctoFilePanelFileName = {}, + OctoNormalFront = { fg = C.text }, + OctoYellowFloat = { fg = C.yellow, bg = C.base }, + OctoPurpleFloat = { fg = C.mauve, bg = C.base }, + OctoRedFloat = { fg = C.red, bg = C.base }, + OctoGreenFloat = { fg = C.green, bg = C.base }, + OctoGreyFloat = { fg = C.text, bg = C.base }, + OctoBlueFloat = { fg = C.blue, bg = C.base }, + OctoReviewDiffAddText = { bg = U.darken(C.green, 0.30, C.base) }, + OctoReviewDiffDeleteText = { bg = U.darken(C.red, 0.30, C.base) }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/overseer.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/overseer.lua new file mode 100644 index 0000000..cfe6cde --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/overseer.lua @@ -0,0 +1,20 @@ +local M = {} + +M.url = "https://github.com/stevearc/overseer.nvim" + +function M.get() + return { + OverseerPENDING = { fg = C.grey }, + OverseerRUNNING = { fg = C.yellow }, + OverseerSUCCESS = { fg = C.green }, + OverseerCANCELED = { fg = C.overlay2 }, + OverseerFAILURE = { fg = C.red }, + OverseerTask = { fg = C.blue }, + OverseerTaskBorder = { fg = C.sky }, + OverseerOutput = { fg = C.text }, + OverseerComponent = { fg = C.yellow }, + OverseerField = { fg = C.green }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/pounce.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/pounce.lua new file mode 100644 index 0000000..ed9a65f --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/pounce.lua @@ -0,0 +1,14 @@ +local M = {} + +M.url = "https://github.com/rlane/pounce.nvim" + +function M.get() + return { + PounceMatch = { bg = U.lighten(C.green, 0.7), fg = C.base, style = { "bold" } }, + PounceGap = { bg = U.darken(C.green, 0.7), fg = C.base, style = { "bold" } }, + PounceAccept = { bg = C.peach, fg = C.base, style = { "bold" } }, + PounceAcceptBest = { bg = C.teal, fg = C.base, style = { "bold" } }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/rainbow_delimiters.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/rainbow_delimiters.lua new file mode 100644 index 0000000..b2cab1f --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/rainbow_delimiters.lua @@ -0,0 +1,17 @@ +local M = {} + +M.url = "https://github.com/HiPhish/rainbow-delimiters.nvim" + +function M.get() + return { + RainbowDelimiterRed = { fg = C.red }, + RainbowDelimiterYellow = { fg = C.yellow }, + RainbowDelimiterBlue = { fg = C.blue }, + RainbowDelimiterOrange = { fg = C.peach }, + RainbowDelimiterGreen = { fg = C.green }, + RainbowDelimiterViolet = { fg = C.mauve }, + RainbowDelimiterCyan = { fg = C.teal }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/render_markdown.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/render_markdown.lua new file mode 100644 index 0000000..567e56f --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/render_markdown.lua @@ -0,0 +1,34 @@ +local M = {} + +M.url = "https://github.com/MeanderingProgrammer/render-markdown.nvim" + +-- render-markdown.nvim highlight groups: +-- https://github.com/MeanderingProgrammer/render-markdown.nvim?tab=readme-ov-file#colors + +function M.get() + local groups = { + RenderMarkdownCode = { bg = C.mantle }, + RenderMarkdownCodeInline = { bg = C.surface0 }, + RenderMarkdownBullet = { fg = C.sky }, + RenderMarkdownTableHead = { fg = C.blue }, + RenderMarkdownTableRow = { fg = C.lavender }, + RenderMarkdownSuccess = { fg = C.green }, + RenderMarkdownInfo = { fg = C.sky }, + RenderMarkdownHint = { fg = C.teal }, + RenderMarkdownWarn = { fg = C.yellow }, + RenderMarkdownError = { fg = C.red }, + } + + local syntax = require("catppuccin.groups.syntax").get() + local darkening_percentage = O.transparent_background and U.vary_color({ latte = 0.15 }, 0.28) or 0.095 + + for i = 1, 6 do + local color = syntax["rainbow" .. i].fg + groups["RenderMarkdownH" .. i] = { fg = color } + groups["RenderMarkdownH" .. i .. "Bg"] = { bg = U.darken(color, darkening_percentage, C.base) } + end + + return groups +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/sandwich.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/sandwich.lua new file mode 100644 index 0000000..b18e4e7 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/sandwich.lua @@ -0,0 +1,14 @@ +local M = {} + +M.url = "https://github.com/machakann/vim-sandwich" + +function M.get() + return { + OperatorSandwichAdd = { bg = C.blue, fg = C.base }, + OperatorSandwichBuns = { bg = C.blue, fg = C.base }, + OperatorSandwichChange = { bg = C.blue, fg = C.base }, + OperatorSandwichDelete = { bg = C.blue, fg = C.base }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/signify.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/signify.lua new file mode 100644 index 0000000..e373603 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/signify.lua @@ -0,0 +1,13 @@ +local M = {} + +M.url = "https://github.com/mhinz/vim-signify" + +function M.get() + return { + SignifySignAdd = { fg = C.green }, + SignifySignChange = { fg = C.yellow }, + SignifySignDelete = { fg = C.red }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/snacks.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/snacks.lua new file mode 100644 index 0000000..5f8c71a --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/snacks.lua @@ -0,0 +1,92 @@ +local M = {} + +M.url = "https://github.com/folke/snacks.nvim" + +function M.get() + local indent_scope_color = U.select_color(O.integrations.snacks.indent_scope_color, "overlay2") + + local hlgroups = { + SnacksNormal = { link = "Normal" }, + SnacksWinBar = { link = "Title" }, + SnacksBackdrop = { link = "FloatShadow" }, + SnacksNormalNC = { link = "NormalFloat" }, + SnacksWinBarNC = { link = "SnacksWinBar" }, + + SnacksNotifierInfo = { fg = C.blue }, + SnacksNotifierIconInfo = { fg = C.blue }, + SnacksNotifierTitleInfo = { fg = C.blue, style = { "italic" } }, + SnacksNotifierFooterInfo = { link = "DiagnosticInfo" }, + SnacksNotifierBorderInfo = { fg = C.blue }, + SnacksNotifierWarn = { fg = C.yellow }, + SnacksNotifierIconWarn = { fg = C.yellow }, + SnacksNotifierTitleWarn = { fg = C.yellow, style = { "italic" } }, + SnacksNotifierBorderWarn = { fg = C.yellow }, + SnacksNotifierFooterWarn = { link = "DiagnosticWarn" }, + SnacksNotifierDebug = { fg = C.peach }, + SnacksNotifierIconDebug = { fg = C.peach }, + SnacksNotifierTitleDebug = { fg = C.peach, style = { "italic" } }, + SnacksNotifierBorderDebug = { fg = C.peach }, + SnacksNotifierFooterDebug = { link = "DiagnosticHint" }, + SnacksNotifierError = { fg = C.red }, + SnacksNotifierIconError = { fg = C.red }, + SnacksNotifierTitleError = { fg = C.red, style = { "italic" } }, + SnacksNotifierBorderError = { fg = C.red }, + SnacksNotifierFooterError = { link = "DiagnosticError" }, + SnacksNotifierTrace = { fg = C.rosewater }, + SnacksNotifierIconTrace = { fg = C.rosewater }, + SnacksNotifierTitleTrace = { fg = C.rosewater, style = { "italic" } }, + SnacksNotifierBorderTrace = { fg = C.rosewater }, + SnacksNotifierFooterTrace = { link = "DiagnosticHint" }, + + SnacksDashboardNormal = { link = "Normal" }, + SnacksDashboardDesc = { fg = C.blue }, + SnacksDashboardFile = { fg = C.lavender }, + SnacksDashboardDir = { link = "NonText" }, + SnacksDashboardFooter = { fg = C.yellow, style = { "italic" } }, + SnacksDashboardHeader = { fg = C.blue }, + SnacksDashboardIcon = { fg = C.pink, bold = true }, + SnacksDashboardKey = { fg = C.peach }, + SnacksDashboardTerminal = { link = "SnacksDashboardNormal" }, + SnacksDashboardSpecial = { link = "Special" }, + SnacksDashboardTitle = { link = "Title" }, + + SnacksIndent = { fg = C.surface0 }, + SnacksIndentScope = { fg = indent_scope_color }, + + SnacksPickerSelected = { + fg = O.float.transparent and C.flamingo or C.text, + bg = O.float.transparent and C.none or C.surface0, + style = { "bold" }, + }, + SnacksPickerMatch = { fg = C.blue }, + + SnacksPicker = { link = "NormalFloat" }, + SnacksPickerBorder = { link = "FloatBorder" }, + SnacksPickerInputBorder = { link = "SnacksPickerBorder" }, + SnacksPickerInput = { link = "NormalFloat" }, + SnacksPickerPrompt = { fg = C.flamingo }, + } + + if O.float.solid then + hlgroups["SnacksPickerTitle"] = { + fg = C.crust, + bg = C.mauve, + } + hlgroups["SnacksPickerPreviewTitle"] = { + fg = C.crust, + bg = C.green, + } + hlgroups["SnacksPickerInputTitle"] = { + fg = C.crust, + bg = C.red, + } + hlgroups["SnacksPickerListTitle"] = { + fg = C.crust, + bg = C.lavender, + } + end + + return hlgroups +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/symbols_outline.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/symbols_outline.lua new file mode 100644 index 0000000..f8b1c87 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/symbols_outline.lua @@ -0,0 +1,15 @@ +local M = {} + +M.url = "https://github.com/simrat39/symbols-outline.nvim" + +function M.get() + return { + -- https://github.com/simrat39/symbols-outline.nvim + FocusedSymbol = { fg = C.yellow, bg = C.none }, + + -- https://github.com/hedyhli/outline.nvim + OutlineCurrent = { link = "FocusedSymbol" }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/telekasten.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/telekasten.lua new file mode 100644 index 0000000..08f6760 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/telekasten.lua @@ -0,0 +1,13 @@ +local M = {} + +M.url = "https://github.com/nvim-telekasten/telekasten.nvim" + +function M.get() + return { + tkLink = { fg = C.blue }, + tkBrackets = { fg = C.pink }, + tkTag = { fg = C.sky }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/telescope.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/telescope.lua new file mode 100644 index 0000000..633d016 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/telescope.lua @@ -0,0 +1,41 @@ +local M = {} + +M.url = "https://github.com/nvim-telescope/telescope.nvim" + +function M.get() + local hlgroups = { + TelescopeBorder = { link = "FloatBorder" }, + TelescopeNormal = { link = "NormalFloat" }, + TelescopePreviewNormal = { link = "TelescopeNormal" }, + TelescopePromptNormal = { link = "TelescopeNormal" }, + TelescopeResultsNormal = { link = "TelescopeNormal" }, + TelescopeTitle = { link = "FloatTitle" }, + TelescopeSelectionCaret = { fg = C.flamingo, bg = C.surface0 }, + TelescopeSelection = { + fg = C.flamingo, + bg = C.surface0, + style = { "bold" }, + }, + TelescopeMatching = { fg = C.blue }, + TelescopePromptPrefix = { fg = C.flamingo }, + } + + if O.float.solid then + hlgroups["TelescopePreviewTitle"] = { + fg = C.crust, + bg = C.green, + } + hlgroups["TelescopePromptTitle"] = { + fg = C.crust, + bg = C.red, + } + hlgroups["TelescopeResultsTitle"] = { + fg = C.crust, + bg = C.lavender, + } + end + + return hlgroups +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/treesitter_context.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/treesitter_context.lua new file mode 100644 index 0000000..cf60a2f --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/treesitter_context.lua @@ -0,0 +1,24 @@ +local M = {} + +M.url = "https://github.com/nvim-treesitter/nvim-treesitter-context" + +function M.get() + return { + TreesitterContext = { + fg = C.text, + bg = O.transparent_background and C.none or C.mantle, + }, + TreesitterContextBottom = { + sp = O.transparent_background and C.dim or C.surface0, + style = { "underline" }, + }, + TreesitterContextLineNumber = O.transparent_background and { + fg = C.rosewater, + } or { + fg = C.surface1, + bg = C.mantle, + }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/ts_rainbow.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/ts_rainbow.lua new file mode 100644 index 0000000..2db2b34 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/ts_rainbow.lua @@ -0,0 +1,17 @@ +local M = {} + +M.url = "https://github.com/HiPhish/nvim-ts-rainbow" + +function M.get() + return { + rainbowcol1 = { fg = C.red }, + rainbowcol2 = { fg = C.teal }, + rainbowcol3 = { fg = C.yellow }, + rainbowcol4 = { fg = C.blue }, + rainbowcol5 = { fg = C.pink }, + rainbowcol6 = { fg = C.flamingo }, + rainbowcol7 = { fg = C.green }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/ts_rainbow2.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/ts_rainbow2.lua new file mode 100644 index 0000000..4545f56 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/ts_rainbow2.lua @@ -0,0 +1,17 @@ +local M = {} + +M.url = "https://github.com/HiPhish/nvim-ts-rainbow2" + +function M.get() + return { + TSRainbowRed = { fg = C.red }, + TSRainbowYellow = { fg = C.yellow }, + TSRainbowBlue = { fg = C.blue }, + TSRainbowOrange = { fg = C.peach }, + TSRainbowGreen = { fg = C.green }, + TSRainbowViolet = { fg = C.mauve }, + TSRainbowCyan = { fg = C.teal }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/ufo.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/ufo.lua new file mode 100644 index 0000000..598135b --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/ufo.lua @@ -0,0 +1,12 @@ +local M = {} + +M.url = "https://github.com/kevinhwang91/nvim-ufo" + +M.get = function() + return { + UfoFoldedFg = { fg = C.lavender }, + UfoFoldedEllipsis = { fg = C.crust, bg = C.blue }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/vim_sneak.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/vim_sneak.lua new file mode 100644 index 0000000..5e20770 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/vim_sneak.lua @@ -0,0 +1,12 @@ +local M = {} + +M.url = "https://github.com/justinmk/vim-sneak" + +function M.get() + return { + Sneak = { fg = C.overlay2, bg = C.pink }, + SneakScope = { bg = C.text }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/vimwiki.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/vimwiki.lua new file mode 100644 index 0000000..02ac533 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/vimwiki.lua @@ -0,0 +1,22 @@ +local M = {} + +M.url = "https://github.com/vimwiki/vimwiki" + +function M.get() + return { + VimwikiLink = { fg = C.sky, bg = C.none }, + VimwikiHeaderChar = { fg = C.grey, bg = C.none }, + VimwikiHR = { fg = C.yellow, bg = C.none }, + VimwikiList = { fg = C.peach, bg = C.none }, + VimwikiTag = { fg = C.peach, bg = C.none }, + VimwikiMarkers = { fg = C.subtext0, bg = C.none }, + VimwikiHeader1 = { fg = C.peach, bg = C.none, style = { "bold" } }, + VimwikiHeader2 = { fg = C.green, bg = C.none, style = { "bold" } }, + VimwikiHeader3 = { fg = C.blue, bg = C.none, style = { "bold" } }, + VimwikiHeader4 = { fg = C.sky, bg = C.none, style = { "bold" } }, + VimwikiHeader5 = { fg = C.yellow, bg = C.none, style = { "bold" } }, + VimwikiHeader6 = { fg = C.mauve, bg = C.none, style = { "bold" } }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/which_key.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/which_key.lua new file mode 100644 index 0000000..9b5efa6 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/which_key.lua @@ -0,0 +1,17 @@ +local M = {} + +M.url = "https://github.com/folke/which-key.nvim" + +function M.get() + return { + WhichKey = { link = "NormalFloat" }, + WhichKeyBorder = { link = "FloatBorder" }, + + WhichKeyGroup = { fg = C.blue }, + WhichKeySeparator = { fg = C.overlay0 }, + WhichKeyDesc = { fg = C.pink }, + WhichKeyValue = { fg = C.overlay0 }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/window_picker.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/window_picker.lua new file mode 100644 index 0000000..4adce34 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/integrations/window_picker.lua @@ -0,0 +1,14 @@ +local M = {} + +M.url = "https://github.com/s1n7ax/nvim-window-picker" + +function M.get() + return { + WindowPickerStatusLine = { fg = C.red, style = { "bold" } }, + WindowPickerStatusLineNC = { fg = C.red, style = { "bold" } }, + WindowPickerWinBar = { fg = C.red, style = { "bold" } }, + WindowPickerWinBarNC = { fg = C.red, style = { "bold" } }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/lsp.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/lsp.lua new file mode 100644 index 0000000..9294859 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/lsp.lua @@ -0,0 +1,109 @@ +local M = {} + +function M.get() + local virtual_text = O.lsp_styles.virtual_text + local underlines = O.lsp_styles.underlines + local inlay_hints = O.lsp_styles.inlay_hints + + local error = C.red + local warning = C.yellow + local info = C.sky + local hint = C.teal + local ok = C.green + local darkening_percentage = 0.095 + + return { + -- These groups are for the native LSP client. Some other LSP clients may + -- use these groups, or use their own. Consult your LSP client's + -- documentation. + LspReferenceText = { bg = C.surface1 }, -- used for highlighting "text" references + LspReferenceRead = { bg = C.surface1 }, -- used for highlighting "read" references + LspReferenceWrite = { bg = C.surface1 }, -- used for highlighting "write" references + -- highlight diagnostics in numberline + + DiagnosticVirtualTextError = { + bg = O.transparent_background and C.none or U.darken(error, darkening_percentage, C.base), + fg = error, + style = virtual_text.errors, + }, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default + DiagnosticVirtualTextWarn = { + bg = O.transparent_background and C.none or U.darken(warning, darkening_percentage, C.base), + fg = warning, + style = virtual_text.warnings, + }, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default + DiagnosticVirtualTextInfo = { + bg = O.transparent_background and C.none or U.darken(info, darkening_percentage, C.base), + fg = info, + style = virtual_text.information, + }, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default + DiagnosticVirtualTextHint = { + bg = O.transparent_background and C.none or U.darken(hint, darkening_percentage, C.base), + fg = hint, + style = virtual_text.hints, + }, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default + DiagnosticVirtualTextOk = { + bg = O.transparent_background and C.none or U.darken(hint, darkening_percentage, C.base), + fg = ok, + style = virtual_text.ok, + }, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default + + DiagnosticError = { bg = C.none, fg = error, style = virtual_text.errors }, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default + DiagnosticWarn = { bg = C.none, fg = warning, style = virtual_text.warnings }, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default + DiagnosticInfo = { bg = C.none, fg = info, style = virtual_text.information }, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default + DiagnosticHint = { bg = C.none, fg = hint, style = virtual_text.hints }, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default + DiagnosticOk = { bg = C.none, fg = ok, style = virtual_text.ok }, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default + + DiagnosticUnderlineError = { style = underlines.errors, sp = error }, -- Used to underline "Error" diagnostics + DiagnosticUnderlineWarn = { style = underlines.warnings, sp = warning }, -- Used to underline "Warn" diagnostics + DiagnosticUnderlineInfo = { style = underlines.information, sp = info }, -- Used to underline "Info" diagnostics + DiagnosticUnderlineHint = { style = underlines.hints, sp = hint }, -- Used to underline "Hint" diagnostics + DiagnosticUnderlineOk = { style = underlines.ok, sp = ok }, -- Used to underline "Ok" diagnostics + + DiagnosticFloatingError = { fg = error }, -- Used to color "Error" diagnostic messages in diagnostics float + DiagnosticFloatingWarn = { fg = warning }, -- Used to color "Warn" diagnostic messages in diagnostics float + DiagnosticFloatingInfo = { fg = info }, -- Used to color "Info" diagnostic messages in diagnostics float + DiagnosticFloatingHint = { fg = hint }, -- Used to color "Hint" diagnostic messages in diagnostics float + DiagnosticFloatingOk = { fg = ok }, -- Used to color "Ok" diagnostic messages in diagnostics float + + DiagnosticSignError = { fg = error }, -- Used for "Error" signs in sign column + DiagnosticSignWarn = { fg = warning }, -- Used for "Warn" signs in sign column + DiagnosticSignInfo = { fg = info }, -- Used for "Info" signs in sign column + DiagnosticSignHint = { fg = hint }, -- Used for "Hint" signs in sign column + DiagnosticSignOk = { fg = ok }, -- Used for "Ok" signs in sign column + + LspDiagnosticsDefaultError = { fg = error }, -- Used as the mantle highlight group. Other LspDiagnostic highlights link to this by default (except Underline) + LspDiagnosticsDefaultWarning = { fg = warning }, -- Used as the mantle highlight group. Other LspDiagnostic highlights link to this by default (except Underline) + LspDiagnosticsDefaultInformation = { fg = info }, -- Used as the mantle highlight group. Other LspDiagnostic highlights link to this by default (except Underline) + LspDiagnosticsDefaultHint = { fg = hint }, -- Used as the mantle highlight group. Other LspDiagnostic highlights link to this by default (except Underline) + LspSignatureActiveParameter = { bg = C.surface0, style = { "bold" } }, + -- LspDiagnosticsFloatingError = { }, -- Used to color "Error" diagnostic messages in diagnostics float + -- LspDiagnosticsFloatingWarning = { }, -- Used to color "Warning" diagnostic messages in diagnostics float + -- LspDiagnosticsFloatingInformation = { }, -- Used to color "Information" diagnostic messages in diagnostics float + -- LspDiagnosticsFloatingHint = { }, -- Used to color "Hint" diagnostic messages in diagnostics float + + LspDiagnosticsError = { fg = error }, + LspDiagnosticsWarning = { fg = warning }, + LspDiagnosticsInformation = { fg = info }, + LspDiagnosticsHint = { fg = hint }, + LspDiagnosticsVirtualTextError = { fg = error, style = virtual_text.errors }, -- Used for "Error" diagnostic virtual text + LspDiagnosticsVirtualTextWarning = { fg = warning, style = virtual_text.warnings }, -- Used for "Warning" diagnostic virtual text + LspDiagnosticsVirtualTextInformation = { fg = info, style = virtual_text.warnings }, -- Used for "Information" diagnostic virtual text + LspDiagnosticsVirtualTextHint = { fg = hint, style = virtual_text.hints }, -- Used for "Hint" diagnostic virtual text + LspDiagnosticsUnderlineError = { style = underlines.errors, sp = error }, -- Used to underline "Error" diagnostics + LspDiagnosticsUnderlineWarning = { style = underlines.warnings, sp = warning }, -- Used to underline "Warning" diagnostics + LspDiagnosticsUnderlineInformation = { style = underlines.information, sp = info }, -- Used to underline "Information" diagnostics + LspDiagnosticsUnderlineHint = { style = underlines.hints, sp = hint }, -- Used to underline "Hint" diagnostics + LspCodeLens = { fg = C.overlay0 }, -- virtual text of the codelens + LspCodeLensSeparator = { link = "LspCodeLens" }, -- virtual text of the codelens separators + LspInlayHint = { + -- fg of `Comment` + fg = C.overlay0, + -- bg of `CursorLine` + bg = (O.transparent_background or not inlay_hints.background) and C.none + or U.vary_color({ latte = U.lighten(C.mantle, 0.70, C.base) }, U.darken(C.surface0, 0.64, C.base)), + }, -- virtual text of the inlay hints + LspInfoBorder = { link = "FloatBorder" }, -- LspInfo border + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/semantic_tokens.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/semantic_tokens.lua new file mode 100644 index 0000000..a053e1e --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/semantic_tokens.lua @@ -0,0 +1,33 @@ +local M = {} + +function M.get() + if vim.treesitter.highlighter.hl_map then + vim.notify_once( + [[Catppuccin (info): +semantic_tokens integration requires neovim 0.8 +If you want to stay on nvim 0.7, pin catppuccin tag to v0.2.4 and nvim-treesitter commit to 4cccb6f494eb255b32a290d37c35ca12584c74d0. +]], + vim.log.levels.INFO + ) + return {} + end + return { + -- https://neovim.io/doc/user/lsp.html#lsp-semantic-highlight + -- Most semantic tokens (@lsp.type.<...>) are no longer defined in this file, as Neovim links to already themed Tree-sitter captures by default. + + -- lsp's are able to detect enum members where treesitter often cannot + ["@lsp.type.enumMember"] = { fg = C.teal }, + -- we assume treesitter can already handle this + -- - treesitter can detect variables in buffers + -- - lsp does not need responsibility for this, in fact it can be less + -- accurate in cases + ["@lsp.type.variable"] = {}, + + -- in cases where the lsp can be more specific than treesitter, we should + -- allow lsp to override treesitter + ["@lsp.typemod.function.defaultLibrary"] = { link = "@function.builtin" }, + ["@lsp.typemod.function.builtin"] = { link = "@function.builtin" }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/syntax.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/syntax.lua new file mode 100644 index 0000000..bb375b8 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/syntax.lua @@ -0,0 +1,128 @@ +local M = {} + +function M.get() + return { + Comment = { fg = C.overlay2, style = O.styles.comments }, -- just comments + SpecialComment = { link = "Special" }, -- special things inside a comment + Constant = { fg = C.peach }, -- (preferred) any constant + String = { fg = C.green, style = O.styles.strings or {} }, -- a string constant: "this is a string" + Character = { fg = C.teal }, -- a character constant: 'c', '\n' + Number = { fg = C.peach, style = O.styles.numbers or {} }, -- a number constant: 234, 0xff + Float = { link = "Number" }, -- a floating point constant: 2.3e10 + Boolean = { fg = C.peach, style = O.styles.booleans or {} }, -- a boolean constant: TRUE, false + Identifier = { fg = C.flamingo, style = O.styles.variables or {} }, -- (preferred) any variable name + Function = { fg = C.blue, style = O.styles.functions or {} }, -- function name (also: methods for classes) + Statement = { fg = C.mauve }, -- (preferred) any statement + Conditional = { fg = C.mauve, style = O.styles.conditionals or {} }, -- if, then, else, endif, switch, etc. + Repeat = { fg = C.mauve, style = O.styles.loops or {} }, -- for, do, while, etc. + Label = { fg = C.sapphire }, -- case, default, etc. + Operator = { fg = C.sky, style = O.styles.operators or {} }, -- "sizeof", "+", "*", etc. + Keyword = { fg = C.mauve, style = O.styles.keywords or {} }, -- any other keyword + Exception = { fg = C.mauve, style = O.styles.keywords or {} }, -- try, catch, throw + + PreProc = { fg = C.pink }, -- (preferred) generic Preprocessor + Include = { fg = C.mauve, style = O.styles.keywords or {} }, -- preprocessor #include + Define = { link = "PreProc" }, -- preprocessor #define + Macro = { fg = C.mauve }, -- same as Define + PreCondit = { link = "PreProc" }, -- preprocessor #if, #else, #endif, etc. + + StorageClass = { fg = C.yellow }, -- static, register, volatile, etc. + Structure = { fg = C.yellow }, -- struct, union, enum, etc. + Special = { fg = C.pink }, -- (preferred) any special symbol + Type = { fg = C.yellow, style = O.styles.types or {} }, -- (preferred) int, long, char, etc. + Typedef = { link = "Type" }, -- A typedef + SpecialChar = { link = "Special" }, -- special character in a constant + Tag = { fg = C.lavender, style = { "bold" } }, -- you can use CTRL-] on this + Delimiter = { fg = C.overlay2 }, -- character that needs attention + Debug = { link = "Special" }, -- debugging statements + + Underlined = { style = { "underline" } }, -- (preferred) text that stands out, HTML links + Bold = { style = { "bold" } }, + Italic = { style = { "italic" } }, + -- ("Ignore", below, may be invisible...) + -- Ignore = { }, -- (preferred) left blank, hidden |hl-Ignore| + + Error = { fg = C.red }, -- (preferred) any erroneous construct + Todo = { bg = C.flamingo, fg = C.base, style = { "bold" } }, -- (preferred) anything that needs extra attention; mostly the keywords TODO FIXME and XXX + qfLineNr = { fg = C.yellow }, + qfFileName = { fg = C.blue }, + htmlH1 = { fg = C.pink, style = { "bold" } }, + htmlH2 = { fg = C.blue, style = { "bold" } }, + -- mkdHeading = { fg = C.peach, style = { "bold" } }, + -- mkdCode = { bg = C.terminal_black, fg = C.text }, + mkdCodeDelimiter = { bg = C.base, fg = C.text }, + mkdCodeStart = { fg = C.flamingo, style = { "bold" } }, + mkdCodeEnd = { fg = C.flamingo, style = { "bold" } }, + -- mkdLink = { fg = C.blue, style = { "underline" } }, + + -- debugging + debugPC = { bg = O.transparent_background and C.none or C.crust }, -- used for highlighting the current line in terminal-debug + debugBreakpoint = { bg = C.base, fg = C.overlay0 }, -- used for breakpoint colors in terminal-debug + -- illuminate + illuminatedWord = { bg = C.surface1 }, + illuminatedCurWord = { bg = C.surface1 }, + -- diff + Added = { fg = C.green }, + Changed = { fg = C.blue }, + diffAdded = { fg = C.green }, + diffRemoved = { fg = C.red }, + diffChanged = { fg = C.blue }, + diffOldFile = { fg = C.yellow }, + diffNewFile = { fg = C.peach }, + diffFile = { fg = C.blue }, + diffLine = { fg = C.overlay0 }, + diffIndexLine = { fg = C.teal }, + DiffAdd = { bg = U.darken(C.green, 0.18, C.base) }, -- diff mode: Added line |diff.txt| + DiffChange = { bg = U.darken(C.blue, 0.07, C.base) }, -- diff mode: Changed line |diff.txt| + DiffDelete = { bg = U.darken(C.red, 0.18, C.base) }, -- diff mode: Deleted line |diff.txt| + DiffText = { bg = U.darken(C.blue, 0.30, C.base) }, -- diff mode: Changed text within a changed line |diff.txt| + -- NeoVim + healthError = { fg = C.red }, + healthSuccess = { fg = C.teal }, + healthWarning = { fg = C.yellow }, + -- misc + + -- glyphs + GlyphPalette1 = { fg = C.red }, + GlyphPalette2 = { fg = C.teal }, + GlyphPalette3 = { fg = C.yellow }, + GlyphPalette4 = { fg = C.blue }, + GlyphPalette6 = { fg = C.teal }, + GlyphPalette7 = { fg = C.text }, + GlyphPalette9 = { fg = C.red }, + + -- rainbow + rainbow1 = { fg = C.red }, + rainbow2 = { fg = C.peach }, + rainbow3 = { fg = C.yellow }, + rainbow4 = { fg = C.green }, + rainbow5 = { fg = C.sapphire }, + rainbow6 = { fg = C.lavender }, + + -- csv + csvCol0 = { fg = C.red }, + csvCol1 = { fg = C.peach }, + csvCol2 = { fg = C.yellow }, + csvCol3 = { fg = C.green }, + csvCol4 = { fg = C.sky }, + csvCol5 = { fg = C.blue }, + csvCol6 = { fg = C.lavender }, + csvCol7 = { fg = C.mauve }, + csvCol8 = { fg = C.pink }, + escCsvCol0 = { link = "csvCol0" }, + + -- markdown + markdownHeadingDelimiter = { fg = C.peach, style = { "bold" } }, + markdownCode = { fg = C.flamingo }, + markdownCodeBlock = { fg = C.flamingo }, + markdownLinkText = { fg = C.blue, style = { "underline" } }, + markdownH1 = { link = "rainbow1" }, + markdownH2 = { link = "rainbow2" }, + markdownH3 = { link = "rainbow3" }, + markdownH4 = { link = "rainbow4" }, + markdownH5 = { link = "rainbow5" }, + markdownH6 = { link = "rainbow6" }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/terminal.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/terminal.lua new file mode 100644 index 0000000..26f4fd3 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/terminal.lua @@ -0,0 +1,31 @@ +local M = {} + +function M.get() + return { + terminal_color_0 = C.overlay0, + terminal_color_8 = C.overlay1, + + terminal_color_1 = C.red, + terminal_color_9 = C.red, + + terminal_color_2 = C.green, + terminal_color_10 = C.green, + + terminal_color_3 = C.yellow, + terminal_color_11 = C.yellow, + + terminal_color_4 = C.blue, + terminal_color_12 = C.blue, + + terminal_color_5 = C.pink, + terminal_color_13 = C.pink, + + terminal_color_6 = C.sky, + terminal_color_14 = C.sky, + + terminal_color_7 = C.text, + terminal_color_15 = C.text, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/treesitter.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/treesitter.lua new file mode 100644 index 0000000..4867511 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/groups/treesitter.lua @@ -0,0 +1,289 @@ +local M = {} + +function M.get() + if vim.treesitter.highlighter.hl_map then + vim.notify_once( + [[Catppuccin (info): +nvim-treesitter integration requires neovim 0.8 +If you want to stay on nvim 0.7, pin catppuccin tag to v0.2.4 and nvim-treesitter commit to 4cccb6f494eb255b32a290d37c35ca12584c74d0. +]], + vim.log.levels.INFO + ) + return {} + end + + local colors = { -- Reference: https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md + -- Identifiers + ["@variable"] = { fg = C.text, style = O.styles.variables or {} }, -- Any variable name that does not have another highlight. + ["@variable.builtin"] = { fg = C.red, style = O.styles.properties or {} }, -- Variable names that are defined by the languages, like this or self. + ["@variable.parameter"] = { fg = C.maroon, style = O.styles.variables or {} }, -- For parameters of a function. + ["@variable.member"] = { fg = C.lavender }, -- For fields. + + ["@constant"] = { link = "Constant" }, -- For constants + ["@constant.builtin"] = { fg = C.peach, style = O.styles.keywords or {} }, -- For constant that are built in the language: nil in Lua. + ["@constant.macro"] = { link = "Macro" }, -- For constants that are defined by macros: NULL in C. + + ["@module"] = { fg = C.yellow, style = O.styles.miscs or { "italic" } }, -- For identifiers referring to modules and namespaces. + ["@label"] = { link = "Label" }, -- For labels: label: in C and :label: in Lua. + + -- Literals + ["@string"] = { link = "String" }, -- For strings. + ["@string.documentation"] = { fg = C.teal, style = O.styles.strings or {} }, -- For strings documenting code (e.g. Python docstrings). + ["@string.regexp"] = { fg = C.pink, style = O.styles.strings or {} }, -- For regexes. + ["@string.escape"] = { fg = C.pink, style = O.styles.strings or {} }, -- For escape characters within a string. + ["@string.special"] = { link = "Special" }, -- other special strings (e.g. dates) + ["@string.special.path"] = { link = "Special" }, -- filenames + ["@string.special.symbol"] = { fg = C.flamingo }, -- symbols or atoms + ["@string.special.url"] = { fg = C.blue, style = { "italic", "underline" } }, -- urls, links and emails + ["@punctuation.delimiter.regex"] = { link = "@string.regexp" }, + + ["@character"] = { link = "Character" }, -- character literals + ["@character.special"] = { link = "SpecialChar" }, -- special characters (e.g. wildcards) + + ["@boolean"] = { link = "Boolean" }, -- For booleans. + ["@number"] = { link = "Number" }, -- For all numbers + ["@number.float"] = { link = "Float" }, -- For floats. + + -- Types + ["@type"] = { link = "Type" }, -- For types. + ["@type.builtin"] = { fg = C.mauve, style = O.styles.types or {} }, -- For builtin types. + ["@type.definition"] = { link = "Type" }, -- type definitions (e.g. `typedef` in C) + + ["@attribute"] = { link = "Constant" }, -- attribute annotations (e.g. Python decorators) + ["@property"] = { fg = C.lavender, style = O.styles.properties or {} }, -- For fields, like accessing `bar` property on `foo.bar`. Overriden later for data languages and CSS. + + -- Functions + ["@function"] = { link = "Function" }, -- For function (calls and definitions). + ["@function.builtin"] = { fg = C.peach, style = O.styles.functions or {} }, -- For builtin functions: table.insert in Lua. + ["@function.call"] = { link = "Function" }, -- function calls + ["@function.macro"] = { fg = C.pink, style = O.styles.functions or {} }, -- For macro defined functions (calls and definitions): each macro_rules in Rust. + + ["@function.method"] = { link = "Function" }, -- For method definitions. + ["@function.method.call"] = { link = "Function" }, -- For method calls. + + ["@constructor"] = { fg = C.yellow }, -- For constructor calls and definitions: = { } in Lua, and Java constructors. + ["@operator"] = { link = "Operator" }, -- For any operator: +, but also -> and * in C. + + -- Keywords + ["@keyword"] = { link = "Keyword" }, -- For keywords that don't fall in previous categories. + ["@keyword.modifier"] = { link = "Keyword" }, -- For keywords modifying other constructs (e.g. `const`, `static`, `public`) + ["@keyword.type"] = { link = "Keyword" }, -- For keywords describing composite types (e.g. `struct`, `enum`) + ["@keyword.coroutine"] = { link = "Keyword" }, -- For keywords related to coroutines (e.g. `go` in Go, `async/await` in Python) + ["@keyword.function"] = { fg = C.mauve, style = O.styles.keywords or {} }, -- For keywords used to define a function. + ["@keyword.operator"] = { fg = C.mauve, style = O.styles.keywords or {} }, -- For new keyword operator + ["@keyword.import"] = { link = "Include" }, -- For includes: #include in C, use or extern crate in Rust, or require in Lua. + ["@keyword.repeat"] = { link = "Repeat" }, -- For keywords related to loops. + ["@keyword.return"] = { fg = C.mauve, style = O.styles.keywords or {} }, + ["@keyword.debug"] = { link = "Exception" }, -- For keywords related to debugging + ["@keyword.exception"] = { link = "Exception" }, -- For exception related keywords. + + ["@keyword.conditional"] = { link = "Conditional" }, -- For keywords related to conditionnals. + ["@keyword.conditional.ternary"] = { link = "Operator" }, -- For ternary operators (e.g. `?` / `:`) + + ["@keyword.directive"] = { link = "PreProc" }, -- various preprocessor directives & shebangs + ["@keyword.directive.define"] = { link = "Define" }, -- preprocessor definition directives + -- JS & derivative + ["@keyword.export"] = { fg = C.mauve, style = O.styles.keywords }, + + -- Punctuation + ["@punctuation.delimiter"] = { link = "Delimiter" }, -- For delimiters (e.g. `;` / `.` / `,`). + ["@punctuation.bracket"] = { fg = C.overlay2 }, -- For brackets and parenthesis. + ["@punctuation.special"] = { link = "Special" }, -- For special punctuation that does not fall in the categories before (e.g. `{}` in string interpolation). + + -- Comment + ["@comment"] = { link = "Comment" }, + ["@comment.documentation"] = { link = "Comment" }, -- For comments documenting code + + ["@comment.error"] = { fg = C.base, bg = C.red }, + ["@comment.warning"] = { fg = C.base, bg = C.yellow }, + ["@comment.hint"] = { fg = C.base, bg = C.blue }, + ["@comment.todo"] = { fg = C.base, bg = C.flamingo }, + ["@comment.note"] = { fg = C.base, bg = C.rosewater }, + + -- Markup + ["@markup"] = { fg = C.text }, -- For strings considerated text in a markup language. + ["@markup.strong"] = { fg = C.red, style = { "bold" } }, -- bold + ["@markup.italic"] = { fg = C.red, style = { "italic" } }, -- italic + ["@markup.strikethrough"] = { fg = C.text, style = { "strikethrough" } }, -- strikethrough text + ["@markup.underline"] = { link = "Underlined" }, -- underlined text + + ["@markup.heading"] = { fg = C.blue }, -- titles like: # Example + ["@markup.heading.markdown"] = { style = { "bold" } }, -- bold headings in markdown, but not in HTML or other markup + + ["@markup.math"] = { fg = C.blue }, -- math environments (e.g. `$ ... $` in LaTeX) + ["@markup.quote"] = { fg = C.pink }, -- block quotes + ["@markup.environment"] = { fg = C.pink }, -- text environments of markup languages + ["@markup.environment.name"] = { fg = C.blue }, -- text indicating the type of an environment + + ["@markup.link"] = { fg = C.lavender }, -- text references, footnotes, citations, etc. + ["@markup.link.label"] = { fg = C.lavender }, -- link, reference descriptions + ["@markup.link.url"] = { fg = C.blue, style = { "italic", "underline" } }, -- urls, links and emails + + ["@markup.raw"] = { fg = C.green }, -- used for inline code in markdown and for doc in python (""") + + ["@markup.list"] = { fg = C.teal }, + ["@markup.list.checked"] = { fg = C.green }, -- todo notes + ["@markup.list.unchecked"] = { fg = C.overlay1 }, -- todo notes + + -- Diff + ["@diff.plus"] = { link = "diffAdded" }, -- added text (for diff files) + ["@diff.minus"] = { link = "diffRemoved" }, -- deleted text (for diff files) + ["@diff.delta"] = { link = "diffChanged" }, -- deleted text (for diff files) + + -- Tags + ["@tag"] = { fg = C.blue }, -- Tags like HTML tag names. + ["@tag.builtin"] = { fg = C.blue }, -- JSX tag names. + ["@tag.attribute"] = { fg = C.yellow, style = O.styles.miscs or { "italic" } }, -- XML/HTML attributes (foo in foo="bar"). + ["@tag.delimiter"] = { fg = C.teal }, -- Tag delimiter like < > / + + -- Misc + ["@error"] = { link = "Error" }, + + -- Language specific: + + -- Bash + ["@function.builtin.bash"] = { fg = C.red, style = O.styles.miscs or { "italic" } }, + ["@variable.parameter.bash"] = { fg = C.green }, + + -- markdown + ["@markup.heading.1.markdown"] = { link = "rainbow1" }, + ["@markup.heading.2.markdown"] = { link = "rainbow2" }, + ["@markup.heading.3.markdown"] = { link = "rainbow3" }, + ["@markup.heading.4.markdown"] = { link = "rainbow4" }, + ["@markup.heading.5.markdown"] = { link = "rainbow5" }, + ["@markup.heading.6.markdown"] = { link = "rainbow6" }, + + -- html + ["@markup.heading.html"] = { link = "@markup" }, + ["@markup.heading.1.html"] = { link = "@markup" }, + ["@markup.heading.2.html"] = { link = "@markup" }, + ["@markup.heading.3.html"] = { link = "@markup" }, + ["@markup.heading.4.html"] = { link = "@markup" }, + ["@markup.heading.5.html"] = { link = "@markup" }, + ["@markup.heading.6.html"] = { link = "@markup" }, + + -- Java + ["@constant.java"] = { fg = C.teal }, + + -- CSS + ["@property.css"] = { fg = C.blue }, + ["@property.scss"] = { fg = C.blue }, + ["@property.id.css"] = { fg = C.yellow }, + ["@property.class.css"] = { fg = C.yellow }, + ["@type.css"] = { fg = C.lavender }, + ["@type.tag.css"] = { fg = C.blue }, + ["@string.plain.css"] = { fg = C.text }, + ["@number.css"] = { fg = C.peach }, + ["@keyword.directive.css"] = { link = "Keyword" }, -- CSS at-rules: https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule. + + -- HTML + ["@string.special.url.html"] = { fg = C.green }, -- Links in href, src attributes. + ["@markup.link.label.html"] = { fg = C.text }, -- Text between tags. + ["@character.special.html"] = { fg = C.red }, -- Symbols such as  . + + -- Lua + ["@constructor.lua"] = { link = "@punctuation.bracket" }, -- For constructor calls and definitions: = { } in Lua. + + -- Python + ["@constructor.python"] = { fg = C.sky }, -- __init__(), __new__(). + + -- YAML + ["@label.yaml"] = { fg = C.yellow }, -- Anchor and alias names. + + -- Ruby + ["@string.special.symbol.ruby"] = { fg = C.flamingo }, + + -- PHP + ["@function.method.php"] = { link = "Function" }, + ["@function.method.call.php"] = { link = "Function" }, + + -- C/CPP + ["@keyword.import.c"] = { fg = C.yellow }, + ["@keyword.import.cpp"] = { fg = C.yellow }, + + -- C# + ["@attribute.c_sharp"] = { fg = C.yellow }, + + -- gitcommit + ["@comment.warning.gitcommit"] = { fg = C.yellow }, + + -- gitignore + ["@string.special.path.gitignore"] = { fg = C.text }, + + -- Misc + gitcommitSummary = { fg = C.rosewater, style = O.styles.miscs or { "italic" } }, + zshKSHFunction = { link = "Function" }, + } + + -- Legacy highlights + colors["@parameter"] = colors["@variable.parameter"] + colors["@field"] = colors["@variable.member"] + colors["@namespace"] = colors["@module"] + colors["@float"] = colors["@number.float"] + colors["@symbol"] = colors["@string.special.symbol"] + colors["@string.regex"] = colors["@string.regexp"] + + colors["@text"] = colors["@markup"] + colors["@text.strong"] = colors["@markup.strong"] + colors["@text.emphasis"] = colors["@markup.italic"] + colors["@text.underline"] = colors["@markup.underline"] + colors["@text.strike"] = colors["@markup.strikethrough"] + colors["@text.uri"] = colors["@markup.link.url"] + colors["@text.math"] = colors["@markup.math"] + colors["@text.environment"] = colors["@markup.environment"] + colors["@text.environment.name"] = colors["@markup.environment.name"] + + colors["@text.title"] = colors["@markup.heading"] + colors["@text.literal"] = colors["@markup.raw"] + colors["@text.reference"] = colors["@markup.link"] + + colors["@text.todo.checked"] = colors["@markup.list.checked"] + colors["@text.todo.unchecked"] = colors["@markup.list.unchecked"] + + colors["@comment.note"] = colors["@comment.hint"] + + -- @text.todo is now for todo comments, not todo notes like in markdown + colors["@text.todo"] = colors["@comment.todo"] + colors["@text.warning"] = colors["@comment.warning"] + colors["@text.note"] = colors["@comment.note"] + colors["@text.danger"] = colors["@comment.error"] + + -- @text.uri is now + -- > @markup.link.url in markup links + -- > @string.special.url outside of markup + colors["@text.uri"] = colors["@markup.link.uri"] + + colors["@method"] = colors["@function.method"] + colors["@method.call"] = colors["@function.method.call"] + + colors["@text.diff.add"] = colors["@diff.plus"] + colors["@text.diff.delete"] = colors["@diff.minus"] + + colors["@type.qualifier"] = colors["@keyword.modifier"] + colors["@keyword.storage"] = colors["@keyword.modifier"] + colors["@define"] = colors["@keyword.directive.define"] + colors["@preproc"] = colors["@keyword.directive"] + colors["@storageclass"] = colors["@keyword.storage"] + colors["@conditional"] = colors["@keyword.conditional"] + colors["@exception"] = colors["@keyword.exception"] + colors["@include"] = colors["@keyword.import"] + colors["@repeat"] = colors["@keyword.repeat"] + + colors["@symbol.ruby"] = colors["@string.special.symbol.ruby"] + + colors["@variable.member.yaml"] = colors["@field.yaml"] + + colors["@text.title.1.markdown"] = colors["@markup.heading.1.markdown"] + colors["@text.title.2.markdown"] = colors["@markup.heading.2.markdown"] + colors["@text.title.3.markdown"] = colors["@markup.heading.3.markdown"] + colors["@text.title.4.markdown"] = colors["@markup.heading.4.markdown"] + colors["@text.title.5.markdown"] = colors["@markup.heading.5.markdown"] + colors["@text.title.6.markdown"] = colors["@markup.heading.6.markdown"] + + colors["@method.php"] = colors["@function.method.php"] + colors["@method.call.php"] = colors["@function.method.call.php"] + + return colors +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/init.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/init.lua new file mode 100644 index 0000000..f585c3c --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/init.lua @@ -0,0 +1,221 @@ +---@type Catppuccin +local M = { + default_options = { + flavour = "auto", + background = { + light = "latte", + dark = "mocha", + }, + compile_path = vim.fn.stdpath "cache" .. "/catppuccin", + transparent_background = false, + float = { + transparent = false, + solid = false, + }, + term_colors = false, + kitty = vim.env.KITTY_WINDOW_ID and true or false, + dim_inactive = { + enabled = false, + shade = "dark", + percentage = 0.15, + }, + no_italic = false, + no_bold = false, + no_underline = false, + styles = { + comments = { "italic" }, + conditionals = { "italic" }, + loops = {}, + functions = {}, + keywords = {}, + strings = {}, + variables = {}, + numbers = {}, + booleans = {}, + properties = {}, + types = {}, + operators = {}, + }, + lsp_styles = { + virtual_text = { + errors = { "italic" }, + hints = { "italic" }, + warnings = { "italic" }, + information = { "italic" }, + ok = { "italic" }, + }, + underlines = { + errors = { "underline" }, + hints = { "underline" }, + warnings = { "underline" }, + information = { "underline" }, + ok = { "underline" }, + }, + inlay_hints = { + background = true, + }, + }, + auto_integrations = true, + integrations = { + blink_cmp = { style = "bordered" }, + barbecue = { + dim_dirname = true, + bold_basename = true, + dim_context = false, + alt_background = false, + }, + illuminate = { + lsp = false, + }, + indent_blankline = { + scope_color = "", + colored_indent_levels = false, + }, + navic = { + custom_bg = "NONE", + }, + dropbar = { + color_mode = false, + }, + colorful_winsep = { + color = "red", + }, + mini = { + indentscope_color = "overlay2", + }, + lir = { + git_status = false, + }, + }, + color_overrides = {}, + highlight_overrides = {}, + }, + flavours = { latte = 1, frappe = 2, macchiato = 3, mocha = 4 }, + path_sep = jit and (jit.os == "Windows" and "\\" or "/") or package.config:sub(1, 1), +} + +M.options = M.default_options + +function M.compile() + local user_flavour = M.flavour + for flavour, _ in pairs(M.flavours) do + M.flavour = flavour + require("catppuccin.lib.compiler").compile(flavour) + end + M.flavour = user_flavour -- Restore user flavour after compile +end + +local function get_flavour(default) + local flavour + if default and default == M.flavour and vim.o.background ~= (M.flavour == "latte" and "light" or "dark") then + flavour = M.options.background[vim.o.background] + else + flavour = default + end + + if flavour and not M.flavours[flavour] then + vim.notify( + string.format( + "Catppuccin (error): Invalid flavour '%s', flavour must be 'latte', 'frappe', 'macchiato', 'mocha' or 'auto'", + flavour + ), + vim.log.levels.ERROR + ) + flavour = nil + end + return flavour or M.options.flavour or vim.g.catppuccin_flavour or M.options.background[vim.o.background] +end + +local did_setup = false + +function M.load(flavour) + if M.options.flavour == "auto" then -- set colorscheme based on o:background + M.options.flavour = nil -- ensure that this will only run once on startup + end + if not did_setup then M.setup() end + M.flavour = get_flavour(flavour) + local compiled_path = M.options.compile_path .. M.path_sep .. M.flavour + local f = loadfile(compiled_path) + if not f then + M.compile() + f = assert(loadfile(compiled_path), "could not load cache") + end + f(flavour or M.options.flavour or vim.g.catppuccin_flavour) +end + +---@type fun(user_conf: CatppuccinOptions?) +function M.setup(user_conf) + did_setup = true + -- Parsing user config + user_conf = user_conf or {} + + M.options = vim.tbl_deep_extend("keep", user_conf, M.default_options) + + if M.options.auto_integrations then + M.options.integrations = vim.tbl_deep_extend( + "force", + require("catppuccin.lib.detect_integrations").create_integrations_table(), + M.options.integrations or {} + ) + end + + M.options.highlight_overrides.all = M.options.custom_highlights or M.options.highlight_overrides.all + + -- Get cached hash + local cached_path = M.options.compile_path .. M.path_sep .. "cached" + local file = io.open(cached_path) + local cached = nil + if file then + cached = file:read() + file:close() + end + + -- Get current hash + local git_path = debug.getinfo(1).source:sub(2, -24) .. ".git" + local git = vim.fn.getftime(git_path) -- 2x faster vim.loop.fs_stat + local hash = require("catppuccin.lib.hashing").hash(user_conf) + .. (git == -1 and git_path or git) -- no .git in /nix/store -> cache path + .. (vim.o.winblend == 0 and 1 or 0) -- :h winblend + .. (vim.o.pumblend == 0 and 1 or 0) -- :h pumblend + + -- Recompile if hash changed + if cached ~= hash then + M.compile() + file = io.open(cached_path, "wb") + if file then + file:write(hash) + file:close() + end + end +end + +vim.api.nvim_create_user_command( + "Catppuccin", + function(inp) vim.api.nvim_command("colorscheme catppuccin-" .. get_flavour(inp.args)) end, + { + nargs = 1, + complete = function(line) + return vim.tbl_filter(function(val) return vim.startswith(val, line) end, vim.tbl_keys(M.flavours)) + end, + } +) + +vim.api.nvim_create_user_command("CatppuccinCompile", function() + for name, _ in pairs(package.loaded) do + if name:match "^catppuccin." then package.loaded[name] = nil end + end + M.compile() + vim.notify("Catppuccin (info): compiled cache!", vim.log.levels.INFO) + vim.cmd.colorscheme "catppuccin-nvim" +end, {}) + +if vim.g.catppuccin_debug then + vim.api.nvim_create_autocmd("BufWritePost", { + pattern = "*/catppuccin/*", + callback = function() + vim.schedule(function() vim.cmd "CatppuccinCompile" end) + end, + }) +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/lib/compiler.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/lib/compiler.lua new file mode 100644 index 0000000..5c84456 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/lib/compiler.lua @@ -0,0 +1,104 @@ +local path_sep = require("catppuccin").path_sep +local O = require("catppuccin").options +local M = {} + +-- Credit: https://github.com/EdenEast/nightfox.nvim +local fmt = string.format + +local function inspect(t) + local list = {} + for k, v in pairs(t) do + local tv = type(v) + if tv == "string" then + table.insert(list, fmt([[%s = "%s"]], k, v)) + elseif tv == "table" then + table.insert(list, fmt([[%s = %s]], k, inspect(v))) + else + table.insert(list, fmt([[%s = %s]], k, tostring(v))) + end + end + return fmt([[{ %s }]], table.concat(list, ", ")) +end + +function M.compile(flavour) + local theme = require("catppuccin.lib.mapper").apply(flavour) + local lines = { + string.format( + [[ +return string.dump(function(flavour) +vim.o.termguicolors = true +if vim.g.colors_name then vim.cmd("hi clear") end +if flavour then vim.o.background = "%s" end +vim.g.colors_name = "catppuccin-%s" +local h = vim.api.nvim_set_hl]], + flavour == "latte" and "light" or "dark", + flavour + ), + } + if path_sep == "\\" then O.compile_path = O.compile_path:gsub("/", "\\") end + + local tbl = vim.tbl_deep_extend("keep", theme.custom_highlights, theme.integrations, theme.syntax, theme.editor) + + if O.term_colors == true then + for k, v in pairs(theme.terminal) do + table.insert(lines, fmt('vim.g.%s = "%s"', k, v)) + end + end + + for group, color in pairs(tbl) do + if color.style then + for _, style in pairs(color.style) do + color[style] = true + if O.no_italic and style == "italic" then color[style] = false end + if O.no_bold and style == "bold" then color[style] = false end + if O.no_underline and style == "underline" then color[style] = false end + end + end + color.style = nil + if color.link and (theme.custom_highlights[group] and not theme.custom_highlights[group].link) then + color.link = nil + end + table.insert(lines, fmt([[h(0, "%s", %s)]], group, inspect(color))) + end + table.insert(lines, "end, true)") + if vim.fn.isdirectory(O.compile_path) == 0 then vim.fn.mkdir(O.compile_path, "p") end + + if vim.g.catppuccin_debug then -- Debugging purpose + local deb = io.open(O.compile_path .. path_sep .. flavour .. ".lua", "wb") + if deb then + deb:write(table.concat(lines, "\n")) + deb:close() + end + end + + local f = loadstring(table.concat(lines, "\n")) + if not f then + local err_path = (path_sep == "/" and "/tmp" or os.getenv "TMP") .. "/catppuccin_error.lua" + print(string.format( + [[Catppuccin (error): Most likely some mistake made in your catppuccin config +You can open %s for debugging + +If you think this is a bug, kindly open an issue and attach %s file +Below is the error message that we captured: +]], + err_path, + err_path + )) + local err = io.open(err_path, "wb") + if err then + err:write(table.concat(lines, "\n")) + err:close() + end + dofile(err_path) + return + end + + local file = assert( + io.open(O.compile_path .. path_sep .. flavour, "wb"), + "Permission denied while writing compiled file to " .. O.compile_path .. path_sep .. flavour + ) + file:write(f()) + file:close() +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/lib/detect_integrations.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/lib/detect_integrations.lua new file mode 100644 index 0000000..fc7900b --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/lib/detect_integrations.lua @@ -0,0 +1,81 @@ +local M = {} + +--- parses url to get the last part of it's path, without the `/`. +---@param url string +---@return any +function M.parse_url(url) return string.match(url, "([^/]+)$") end + +function M.detect_plugins() + local installed_plugins = {} + + if vim.fn.has "nvim-0.12.0" == 1 then + -- NOTE: `info = false` prevents vim.pack from trying to use git to get additional info + local ok, plugins = pcall(vim.pack.get, nil, { info = false }) + if not ok then + vim.notify("unable to detect plugins using vim.pack: " .. (plugins or ""), vim.log.levels.WARN) + else + vim.list_extend( + installed_plugins, + vim.iter(plugins):map(function(plugin) return plugin.spec.name end):totable() + ) + end + end + + if pcall(require, "pckr") then vim.list_extend(installed_plugins, require("pckr.plugin").plugins_by_name) end + + if pcall(require, "lazy") then + vim.list_extend(installed_plugins, vim.tbl_keys(require("lazy.core.config").plugins)) + end + + local seen = {} + + installed_plugins = vim.iter(installed_plugins) + :map(function(plugin_name) + if string.sub(plugin_name, 0, 5) == "mini." then return "mini.nvim" end + + return plugin_name + end) + :filter(function(plugin_name) + if seen[plugin_name] then return false end + seen[plugin_name] = true + return true + end) + :totable() + + return installed_plugins +end + +local installed_plugins = M.detect_plugins() + +function M.create_integrations_table() + local integration_mappings = nil + + do + local ok, result = pcall(require, "catppuccin.utils.integration_mappings") + assert(ok, result) + integration_mappings = result + end + + assert( + integration_mappings ~= nil, + "before using integration_mappings generate it using the script: `./scripts/generate_integration_mappings_table.lua`" + ) + + local integrations = {} + local ctp_defaults = require("catppuccin").default_options.integrations + + for _, plugin in ipairs(installed_plugins) do + if integration_mappings[plugin] ~= nil then + local integration = integration_mappings[plugin] + if type(ctp_defaults[integration]) == "table" then + integrations[integration] = ctp_defaults[integration] + integrations[integration].enabled = true + else + integrations[integration] = true + end + end + end + return integrations +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/lib/hashing.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/lib/hashing.lua new file mode 100644 index 0000000..0a984f8 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/lib/hashing.lua @@ -0,0 +1,26 @@ +local M = {} +local B = bit or bit32 + +local hash_str = function(str) -- djb2, https://theartincode.stanis.me/008-djb2/ + local hash = 5381 + for i = 1, #str do + hash = B.lshift(hash, 5) + hash + string.byte(str, i) + end + return hash +end + +function M.hash(v) -- Xor hashing: https://codeforces.com/blog/entry/85900 + local t = type(v) + if t == "table" then + local hash = 0 + for p, u in next, v do + hash = B.bxor(hash, hash_str(p .. M.hash(u))) + end + return hash + elseif t == "function" then + return M.hash(v(require("catppuccin.palettes").get_palette())) + end + return tostring(v) +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/lib/highlighter.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/lib/highlighter.lua new file mode 100644 index 0000000..d688743 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/lib/highlighter.lua @@ -0,0 +1,20 @@ +-- DEPRECATED MODULE +local M = {} + +function M.highlight(group, color) + if color.style then + for _, style in ipairs(color.style) do + color[style] = true + end + end + color.style = nil + vim.api.nvim_set_hl(0, group, color) +end + +function M.syntax(tbl) + for group, colors in pairs(tbl) do + M.highlight(group, colors) + end +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/lib/hsluv.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/lib/hsluv.lua new file mode 100644 index 0000000..3635416 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/lib/hsluv.lua @@ -0,0 +1,290 @@ +--[[ +Lua implementation of HSLuv and HPLuv color spaces +Homepage: http://www.hsluv.org/ + +Copyright (C) 2019 Alexei Boronine + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +]] +local hsluv = {} + +hsluv.hexChars = "0123456789abcdef" + +local distance_line_from_origin = function(line) return math.abs(line.intercept) / math.sqrt((line.slope ^ 2) + 1) end + +local length_of_ray_until_intersect = function(theta, line) + return line.intercept / (math.sin(theta) - line.slope * math.cos(theta)) +end + +hsluv.get_bounds = function(l) + local result = {} + local sub2 + local sub1 = ((l + 16) ^ 3) / 1560896 + if sub1 > hsluv.epsilon then + sub2 = sub1 + else + sub2 = l / hsluv.kappa + end + + for i = 1, 3 do + local m1 = hsluv.m[i][1] + local m2 = hsluv.m[i][2] + local m3 = hsluv.m[i][3] + + for t = 0, 1 do + local top1 = (284517 * m1 - 94839 * m3) * sub2 + local top2 = (838422 * m3 + 769860 * m2 + 731718 * m1) * l * sub2 - 769860 * t * l + local bottom = (632260 * m3 - 126452 * m2) * sub2 + 126452 * t + table.insert(result, { slope = top1 / bottom, intercept = top2 / bottom }) + end + end + return result +end + +hsluv.max_safe_chroma_for_l = function(l) + local bounds = hsluv.get_bounds(l) + local min = 1.7976931348623157e+308 + + for i = 1, 6 do + local length = distance_line_from_origin(bounds[i]) + if length >= 0 then min = math.min(min, length) end + end + return min +end + +hsluv.max_safe_chroma_for_lh = function(l, h) + local hrad = h / 360 * math.pi * 2 + local bounds = hsluv.get_bounds(l) + local min = 1.7976931348623157e+308 + + for i = 1, 6 do + local bound = bounds[i] + local length = length_of_ray_until_intersect(hrad, bound) + if length >= 0 then min = math.min(min, length) end + end + return min +end + +hsluv.dot_product = function(a, b) + local sum = 0 + for i = 1, 3 do + sum = sum + a[i] * b[i] + end + return sum +end + +hsluv.from_linear = function(c) + if c <= 0.0031308 then + return 12.92 * c + else + return 1.055 * (c ^ 0.416666666666666685) - 0.055 + end +end + +hsluv.to_linear = function(c) + if c > 0.04045 then + return ((c + 0.055) / 1.055) ^ 2.4 + else + return c / 12.92 + end +end + +hsluv.xyz_to_rgb = function(tuple) + return { + hsluv.from_linear(hsluv.dot_product(hsluv.m[1], tuple)), + hsluv.from_linear(hsluv.dot_product(hsluv.m[2], tuple)), + hsluv.from_linear(hsluv.dot_product(hsluv.m[3], tuple)), + } +end + +hsluv.rgb_to_xyz = function(tuple) + local rgbl = { hsluv.to_linear(tuple[1]), hsluv.to_linear(tuple[2]), hsluv.to_linear(tuple[3]) } + return { + hsluv.dot_product(hsluv.minv[1], rgbl), + hsluv.dot_product(hsluv.minv[2], rgbl), + hsluv.dot_product(hsluv.minv[3], rgbl), + } +end + +hsluv.y_to_l = function(Y) + if Y <= hsluv.epsilon then + return Y / hsluv.refY * hsluv.kappa + else + return 116 * ((Y / hsluv.refY) ^ 0.333333333333333315) - 16 + end +end + +hsluv.l_to_y = function(L) + if L <= 8 then + return hsluv.refY * L / hsluv.kappa + else + return hsluv.refY * (((L + 16) / 116) ^ 3) + end +end + +hsluv.xyz_to_luv = function(tuple) + local X = tuple[1] + local Y = tuple[2] + local divider = X + 15 * Y + 3 * tuple[3] + local varU = 4 * X + local varV = 9 * Y + if divider ~= 0 then + varU = varU / divider + varV = varV / divider + else + varU = 0 + varV = 0 + end + local L = hsluv.y_to_l(Y) + if L == 0 then return { 0, 0, 0 } end + return { L, 13 * L * (varU - hsluv.refU), 13 * L * (varV - hsluv.refV) } +end + +hsluv.luv_to_xyz = function(tuple) + local L = tuple[1] + local U = tuple[2] + local V = tuple[3] + if L == 0 then return { 0, 0, 0 } end + local varU = U / (13 * L) + hsluv.refU + local varV = V / (13 * L) + hsluv.refV + local Y = hsluv.l_to_y(L) + local X = 0 - (9 * Y * varU) / (((varU - 4) * varV) - varU * varV) + return { X, Y, (9 * Y - 15 * varV * Y - varV * X) / (3 * varV) } +end + +hsluv.luv_to_lch = function(tuple) + local L = tuple[1] + local U = tuple[2] + local V = tuple[3] + local C = math.sqrt(U * U + V * V) + local H + if C < 0.00000001 then + H = 0 + else + H = math.atan2(V, U) * 180.0 / 3.1415926535897932 + if H < 0 then H = 360 + H end + end + return { L, C, H } +end + +hsluv.lch_to_luv = function(tuple) + local L = tuple[1] + local C = tuple[2] + local Hrad = tuple[3] / 360.0 * 2 * math.pi + return { L, math.cos(Hrad) * C, math.sin(Hrad) * C } +end + +hsluv.hsluv_to_lch = function(tuple) + local H = tuple[1] + local S = tuple[2] + local L = tuple[3] + if L > 99.9999999 then return { 100, 0, H } end + if L < 0.00000001 then return { 0, 0, H } end + return { L, hsluv.max_safe_chroma_for_lh(L, H) / 100 * S, H } +end + +hsluv.lch_to_hsluv = function(tuple) + local L = tuple[1] + local C = tuple[2] + local H = tuple[3] + local max_chroma = hsluv.max_safe_chroma_for_lh(L, H) + if L > 99.9999999 then return { H, 0, 100 } end + if L < 0.00000001 then return { H, 0, 0 } end + + return { H, C / max_chroma * 100, L } +end + +hsluv.hpluv_to_lch = function(tuple) + local H = tuple[1] + local S = tuple[2] + local L = tuple[3] + if L > 99.9999999 then return { 100, 0, H } end + if L < 0.00000001 then return { 0, 0, H } end + return { L, hsluv.max_safe_chroma_for_l(L) / 100 * S, H } +end + +hsluv.lch_to_hpluv = function(tuple) + local L = tuple[1] + local C = tuple[2] + local H = tuple[3] + if L > 99.9999999 then return { H, 0, 100 } end + if L < 0.00000001 then return { H, 0, 0 } end + return { H, C / hsluv.max_safe_chroma_for_l(L) * 100, L } +end + +hsluv.rgb_to_hex = function(tuple) + local h = "#" + for i = 1, 3 do + local c = math.floor(tuple[i] * 255 + 0.5) + local digit2 = math.fmod(c, 16) + local x = (c - digit2) / 16 + local digit1 = math.floor(x) + h = h .. string.sub(hsluv.hexChars, digit1 + 1, digit1 + 1) + h = h .. string.sub(hsluv.hexChars, digit2 + 1, digit2 + 1) + end + return h +end + +hsluv.hex_to_rgb = function(hex) + hex = string.lower(hex) + local ret = {} + for i = 0, 2 do + local char1 = string.sub(hex, i * 2 + 2, i * 2 + 2) + local char2 = string.sub(hex, i * 2 + 3, i * 2 + 3) + local digit1 = string.find(hsluv.hexChars, char1) - 1 + local digit2 = string.find(hsluv.hexChars, char2) - 1 + ret[i + 1] = (digit1 * 16 + digit2) / 255.0 + end + return ret +end + +hsluv.lch_to_rgb = function(tuple) return hsluv.xyz_to_rgb(hsluv.luv_to_xyz(hsluv.lch_to_luv(tuple))) end + +hsluv.rgb_to_lch = function(tuple) return hsluv.luv_to_lch(hsluv.xyz_to_luv(hsluv.rgb_to_xyz(tuple))) end + +hsluv.hsluv_to_rgb = function(tuple) return hsluv.lch_to_rgb(hsluv.hsluv_to_lch(tuple)) end + +hsluv.rgb_to_hsluv = function(tuple) return hsluv.lch_to_hsluv(hsluv.rgb_to_lch(tuple)) end + +hsluv.hpluv_to_rgb = function(tuple) return hsluv.lch_to_rgb(hsluv.hpluv_to_lch(tuple)) end + +hsluv.rgb_to_hpluv = function(tuple) return hsluv.lch_to_hpluv(hsluv.rgb_to_lch(tuple)) end + +hsluv.hsluv_to_hex = function(tuple) return hsluv.rgb_to_hex(hsluv.hsluv_to_rgb(tuple)) end + +hsluv.hpluv_to_hex = function(tuple) return hsluv.rgb_to_hex(hsluv.hpluv_to_rgb(tuple)) end + +hsluv.hex_to_hsluv = function(s) return hsluv.rgb_to_hsluv(hsluv.hex_to_rgb(s)) end + +hsluv.hex_to_hpluv = function(s) return hsluv.rgb_to_hpluv(hsluv.hex_to_rgb(s)) end + +hsluv.m = { + { 3.240969941904521, -1.537383177570093, -0.498610760293 }, + { -0.96924363628087, 1.87596750150772, 0.041555057407175 }, + { 0.055630079696993, -0.20397695888897, 1.056971514242878 }, +} +hsluv.minv = { + { 0.41239079926595, 0.35758433938387, 0.18048078840183 }, + { 0.21263900587151, 0.71516867876775, 0.072192315360733 }, + { 0.019330818715591, 0.11919477979462, 0.95053215224966 }, +} +hsluv.refY = 1.0 +hsluv.refU = 0.19783000664283 +hsluv.refV = 0.46831999493879 +hsluv.kappa = 903.2962962 +hsluv.epsilon = 0.0088564516 + +return hsluv diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/lib/mapper.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/lib/mapper.lua new file mode 100644 index 0000000..d2d1307 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/lib/mapper.lua @@ -0,0 +1,76 @@ +local M = {} + +function M.apply(flavour) + flavour = flavour or require("catppuccin").flavour + + local _O, _C, _U = O, C, U -- Borrowing global var (setfenv doesn't work with require) + O = require("catppuccin").options + C = require("catppuccin.palettes").get_palette(flavour) + U = require "catppuccin.utils.colors" + + C.none = "NONE" + + local dim_percentage = O.dim_inactive.percentage + C.dim = O.dim_inactive.shade == "dark" + and U.vary_color( + { latte = U.darken(C.base, dim_percentage, C.mantle) }, + U.darken(C.base, dim_percentage, C.mantle) + ) + or U.vary_color( + { latte = U.lighten("#FBFCFD", dim_percentage, C.base) }, + U.lighten(C.surface0, dim_percentage, C.base) + ) + + local theme = {} + theme.editor = + vim.tbl_deep_extend("force", require("catppuccin.groups.editor").get(), require("catppuccin.groups.lsp").get()) + + theme.syntax = {} + local syntax_modules = { "syntax", "semantic_tokens", "treesitter" } + for i = 1, #syntax_modules do + theme.syntax = + vim.tbl_deep_extend("force", theme.syntax, require("catppuccin.groups." .. syntax_modules[i]).get()) + end + local final_integrations = {} + + -- https://github.com/catppuccin/nvim/pull/624 + if type(O.integrations.dap) == "table" and O.integrations.dap.enable_ui ~= nil then + O.integrations.dap_ui = O.integrations.dap.enable_ui + O.integrations.dap.enable_ui = nil + end + + for integration in pairs(O.integrations) do + local cot = false + if type(O.integrations[integration]) == "table" then + if O.integrations[integration].enabled == true then cot = true end + else + if O.integrations[integration] == true then + local default = require("catppuccin").default_options.integrations[integration] + O.integrations[integration] = type(default) == "table" and default or {} + O.integrations[integration].enabled = true + cot = true + end + end + + local ok, result = pcall(require, "catppuccin.groups.integrations." .. integration) + if ok and result.get and cot then + final_integrations = vim.tbl_deep_extend("force", final_integrations, result.get()) + end + end + + theme.integrations = final_integrations -- plugins + theme.terminal = require("catppuccin.groups.terminal").get() -- terminal colors + local user_highlights = O.highlight_overrides + if type(user_highlights[flavour]) == "function" then user_highlights[flavour] = user_highlights[flavour](C) end + theme.custom_highlights = vim.tbl_deep_extend( + "keep", + user_highlights[flavour] or {}, + type(user_highlights.all) == "function" and user_highlights.all(C) or user_highlights.all or {} + ) + + O, C, U = _O, _C, _U -- Returning global var + + return theme +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/palettes/frappe.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/palettes/frappe.lua new file mode 100644 index 0000000..911d0af --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/palettes/frappe.lua @@ -0,0 +1,28 @@ +return { + rosewater = "#f2d5cf", + flamingo = "#eebebe", + pink = "#f4b8e4", + mauve = "#ca9ee6", + red = "#e78284", + maroon = "#ea999c", + peach = "#ef9f76", + yellow = "#e5c890", + green = "#a6d189", + teal = "#81c8be", + sky = "#99d1db", + sapphire = "#85c1dc", + blue = "#8caaee", + lavender = "#babbf1", + text = "#c6d0f5", + subtext1 = "#b5bfe2", + subtext0 = "#a5adce", + overlay2 = "#949cbb", + overlay1 = "#838ba7", + overlay0 = "#737994", + surface2 = "#626880", + surface1 = "#51576d", + surface0 = "#414559", + base = "#303446", + mantle = "#292c3c", + crust = "#232634", +} diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/palettes/init.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/palettes/init.lua new file mode 100644 index 0000000..6c199a3 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/palettes/init.lua @@ -0,0 +1,33 @@ +local M = {} + +function M.get_palette(flavour) + local flvr = flavour or require("catppuccin").flavour or vim.g.catppuccin_flavour or "mocha" + local _, palette = pcall(require, "catppuccin.palettes." .. flvr) + local O = require("catppuccin").options + local ans = vim.tbl_deep_extend("keep", O.color_overrides.all or {}, O.color_overrides[flvr] or {}, palette or {}) + + --[[ + Kitty makes Neovim transparent if its own terminal background matches Neovim, + so we need to adjust the color channels to make sure people don't suddenly + have a transparent background if they haven't specified it. + + Unfortunately, this currently means all users on Kitty will have all their + palette colors slightly offset. + + ref: https://github.com/kovidgoyal/kitty/issues/2917 + --]] + if O.kitty then + for accent, hex in pairs(ans) do + local red_green_string = hex:sub(1, 5) + local blue_value = tonumber(hex:sub(6, 7), 16) + + -- Slightly increase or decrease brightness of the blue channel + blue_value = blue_value == 255 and blue_value - 1 or blue_value + 1 + ans[accent] = string.format("%s%.2x", red_green_string, blue_value) + end + end + + return ans +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/palettes/latte.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/palettes/latte.lua new file mode 100644 index 0000000..d03f661 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/palettes/latte.lua @@ -0,0 +1,28 @@ +return { + rosewater = "#dc8a78", + flamingo = "#dd7878", + pink = "#ea76cb", + mauve = "#8839ef", + red = "#d20f39", + maroon = "#e64553", + peach = "#fe640b", + yellow = "#df8e1d", + green = "#40a02b", + teal = "#179299", + sky = "#04a5e5", + sapphire = "#209fb5", + blue = "#1e66f5", + lavender = "#7287fd", + text = "#4c4f69", + subtext1 = "#5c5f77", + subtext0 = "#6c6f85", + overlay2 = "#7c7f93", + overlay1 = "#8c8fa1", + overlay0 = "#9ca0b0", + surface2 = "#acb0be", + surface1 = "#bcc0cc", + surface0 = "#ccd0da", + base = "#eff1f5", + mantle = "#e6e9ef", + crust = "#dce0e8", +} diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/palettes/macchiato.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/palettes/macchiato.lua new file mode 100644 index 0000000..f5d95c0 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/palettes/macchiato.lua @@ -0,0 +1,28 @@ +return { + rosewater = "#f4dbd6", + flamingo = "#f0c6c6", + pink = "#f5bde6", + mauve = "#c6a0f6", + red = "#ed8796", + maroon = "#ee99a0", + peach = "#f5a97f", + yellow = "#eed49f", + green = "#a6da95", + teal = "#8bd5ca", + sky = "#91d7e3", + sapphire = "#7dc4e4", + blue = "#8aadf4", + lavender = "#b7bdf8", + text = "#cad3f5", + subtext1 = "#b8c0e0", + subtext0 = "#a5adcb", + overlay2 = "#939ab7", + overlay1 = "#8087a2", + overlay0 = "#6e738d", + surface2 = "#5b6078", + surface1 = "#494d64", + surface0 = "#363a4f", + base = "#24273a", + mantle = "#1e2030", + crust = "#181926", +} diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/palettes/mocha.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/palettes/mocha.lua new file mode 100644 index 0000000..296c000 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/palettes/mocha.lua @@ -0,0 +1,28 @@ +return { + rosewater = "#f5e0dc", + flamingo = "#f2cdcd", + pink = "#f5c2e7", + mauve = "#cba6f7", + red = "#f38ba8", + maroon = "#eba0ac", + peach = "#fab387", + yellow = "#f9e2af", + green = "#a6e3a1", + teal = "#94e2d5", + sky = "#89dceb", + sapphire = "#74c7ec", + blue = "#89b4fa", + lavender = "#b4befe", + text = "#cdd6f4", + subtext1 = "#bac2de", + subtext0 = "#a6adc8", + overlay2 = "#9399b2", + overlay1 = "#7f849c", + overlay0 = "#6c7086", + surface2 = "#585b70", + surface1 = "#45475a", + surface0 = "#313244", + base = "#1e1e2e", + mantle = "#181825", + crust = "#11111b", +} diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/special/bufferline.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/special/bufferline.lua new file mode 100644 index 0000000..df2f6db --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/special/bufferline.lua @@ -0,0 +1,118 @@ +local M = {} + +local ctp = require "catppuccin" +local O = ctp.options + +function M.get_theme(user_config) + user_config = user_config or {} + return function() + local C = require("catppuccin.palettes").get_palette() + local transparent_background = O.transparent_background + local bg_highlight = (transparent_background and O.dim_inactive.enabled and C.dim) + or (transparent_background and "NONE") + or (O.dim_inactive.enabled and C.dim) + or C.crust + + local active_bg = transparent_background and "NONE" or C.base + local inactive_bg = transparent_background and "NONE" or C.mantle + + local separator_fg = O.transparent_background and C.surface1 or C.crust + + local styles = user_config.styles or { "bold", "italic" } + + local highlights = { + -- buffers + background = { bg = inactive_bg }, + buffer_visible = { fg = C.surface1, bg = inactive_bg }, + buffer_selected = { fg = C.text, bg = active_bg, style = styles }, -- current + -- Duplicate + duplicate_selected = { fg = C.text, bg = active_bg, style = styles }, + duplicate_visible = { fg = C.surface1, bg = inactive_bg, style = styles }, + duplicate = { fg = C.surface1, bg = inactive_bg, style = styles }, + -- tabs + tab = { fg = C.surface1, bg = inactive_bg }, + tab_selected = { fg = C.sky, bg = active_bg, bold = true }, + tab_separator = { fg = separator_fg, bg = inactive_bg }, + tab_separator_selected = { fg = separator_fg, bg = active_bg }, + + tab_close = { fg = C.red, bg = inactive_bg }, + indicator_visible = { fg = C.peach, bg = inactive_bg, style = styles }, + indicator_selected = { fg = C.peach, bg = active_bg, style = styles }, + -- separators + separator = { fg = separator_fg, bg = inactive_bg }, + separator_visible = { fg = separator_fg, bg = inactive_bg }, + separator_selected = { fg = separator_fg, bg = active_bg }, + offset_separator = { fg = separator_fg, bg = active_bg }, + -- close buttons + close_button = { fg = C.surface1, bg = inactive_bg }, + close_button_visible = { fg = C.surface1, bg = inactive_bg }, + close_button_selected = { fg = C.red, bg = active_bg }, + -- Empty fill + fill = { bg = bg_highlight }, + -- Numbers + numbers = { fg = C.subtext0, bg = inactive_bg }, + numbers_visible = { fg = C.subtext0, bg = inactive_bg }, + numbers_selected = { fg = C.subtext0, bg = active_bg, style = styles }, + -- Errors + error = { fg = C.red, bg = inactive_bg }, + error_visible = { fg = C.red, bg = inactive_bg }, + error_selected = { fg = C.red, bg = active_bg, style = styles }, + error_diagnostic = { fg = C.red, bg = inactive_bg }, + error_diagnostic_visible = { fg = C.red, bg = inactive_bg }, + error_diagnostic_selected = { fg = C.red, bg = active_bg }, + -- Warnings + warning = { fg = C.yellow, bg = inactive_bg }, + warning_visible = { fg = C.yellow, bg = inactive_bg }, + warning_selected = { fg = C.yellow, bg = active_bg, style = styles }, + warning_diagnostic = { fg = C.yellow, bg = inactive_bg }, + warning_diagnostic_visible = { fg = C.yellow, bg = inactive_bg }, + warning_diagnostic_selected = { fg = C.yellow, bg = active_bg }, + -- Infos + info = { fg = C.sky, bg = inactive_bg }, + info_visible = { fg = C.sky, bg = inactive_bg }, + info_selected = { fg = C.sky, bg = active_bg, style = styles }, + info_diagnostic = { fg = C.sky, bg = inactive_bg }, + info_diagnostic_visible = { fg = C.sky, bg = inactive_bg }, + info_diagnostic_selected = { fg = C.sky, bg = active_bg }, + -- Hint + hint = { fg = C.teal, bg = inactive_bg }, + hint_visible = { fg = C.teal, bg = inactive_bg }, + hint_selected = { fg = C.teal, bg = active_bg, style = styles }, + hint_diagnostic = { fg = C.teal, bg = inactive_bg }, + hint_diagnostic_visible = { fg = C.teal, bg = inactive_bg }, + hint_diagnostic_selected = { fg = C.teal, bg = active_bg }, + -- Diagnostics + diagnostic = { fg = C.subtext0, bg = inactive_bg }, + diagnostic_visible = { fg = C.subtext0, bg = inactive_bg }, + diagnostic_selected = { fg = C.subtext0, bg = active_bg, style = styles }, + -- Modified + modified = { fg = C.peach, bg = inactive_bg }, + modified_visible = { fg = C.peach, bg = inactive_bg }, + modified_selected = { fg = C.peach, bg = active_bg }, + } + + local user_highlights = user_config.custom or {} + highlights = + vim.tbl_deep_extend("keep", user_highlights[ctp.flavour] or {}, user_highlights.all or {}, highlights) + + for _, color in pairs(highlights) do + -- Because default is gui=bold,italic + color.italic = false + color.bold = false + + if color.style then + for _, style in pairs(color.style) do + color[style] = true + if O.no_italic and style == "italic" then color[style] = false end + if O.no_bold and style == "bold" then color[style] = false end + if O.no_underline and style == "underline" then color[style] = false end + end + end + color.style = nil + end + + return highlights + end +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/special/feline.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/special/feline.lua new file mode 100644 index 0000000..f38d472 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/special/feline.lua @@ -0,0 +1,523 @@ +local M = {} + +local C = require("catppuccin.palettes").get_palette() +local ok, lsp = pcall(require, "feline.providers.lsp") +local assets = nil + +if ok then + assets = { + left_separator = "", + right_separator = "", + mode_icon = "", + dir = "󰉖", + file = "󰈙", + lsp = { + server = "󰅡", + error = "", + warning = "", + info = "", + hint = "", + }, + git = { + branch = "", + added = "", + changed = "", + removed = "", + }, + } + + local sett = { + text = C.mantle, + bkg = C.crust, + diffs = C.mauve, + extras = C.overlay1, + curr_file = C.maroon, + curr_dir = C.flamingo, + show_modified = false, + show_lazy_updates = false, + } + + if require("catppuccin").flavour == "latte" then + local latte = require("catppuccin.palettes").get_palette "latte" + sett.text = latte.base + sett.bkg = latte.crust + end + + if require("catppuccin").options.transparent_background then sett.bkg = "NONE" end + + local mode_colors = { + ["n"] = { "NORMAL", C.lavender }, + ["no"] = { "N-PENDING", C.lavender }, + ["i"] = { "INSERT", C.green }, + ["ic"] = { "INSERT", C.green }, + ["t"] = { "TERMINAL", C.green }, + ["v"] = { "VISUAL", C.flamingo }, + ["V"] = { "V-LINE", C.flamingo }, + [""] = { "V-BLOCK", C.flamingo }, + ["R"] = { "REPLACE", C.maroon }, + ["Rv"] = { "V-REPLACE", C.maroon }, + ["s"] = { "SELECT", C.maroon }, + ["S"] = { "S-LINE", C.maroon }, + [""] = { "S-BLOCK", C.maroon }, + ["c"] = { "COMMAND", C.peach }, + ["cv"] = { "COMMAND", C.peach }, + ["ce"] = { "COMMAND", C.peach }, + ["r"] = { "PROMPT", C.teal }, + ["rm"] = { "MORE", C.teal }, + ["r?"] = { "CONFIRM", C.mauve }, + ["!"] = { "SHELL", C.green }, + } + + local view = { + lsp = { + progress = true, + name = false, + exclude_lsp_names = {}, + separator = "|", + }, + } + + local is_lsp_in_excluded_list = function(lsp_name) + for _, excluded_lsp in ipairs(view.lsp.exclude_lsp_names) do + if lsp_name == excluded_lsp then return true end + end + return false + end + + function M.setup(opts) + if opts then + opts.assets = opts.assets or {} + opts.sett = opts.sett or {} + opts.mode_colors = opts.mode_colors or {} + opts.view = opts.view or {} + else + opts = { + assets = {}, + sett = {}, + mode_colors = {}, + view = {}, + } + end + assets = vim.tbl_deep_extend("force", assets, opts.assets) + sett = vim.tbl_deep_extend("force", sett, opts.sett) + mode_colors = vim.tbl_deep_extend("force", mode_colors, opts.mode_colors) + view = vim.tbl_deep_extend("force", view, opts.view) + end + + function M.get_statusline() + local shortline = false + + local components = { + active = { {}, {}, {} }, -- left, center, right + inactive = { {} }, + } + + local function is_enabled(min_width) + if shortline then return true end + + return vim.api.nvim_win_get_width(0) > min_width + end + + -- global components + local invi_sep = { + str = " ", + hl = { + fg = sett.bkg, + bg = sett.bkg, + }, + } + + -- helpers + local function any_git_changes() + local gst = vim.b.gitsigns_status_dict -- git stats + if gst then + if + gst["added"] and gst["added"] > 0 + or gst["removed"] and gst["removed"] > 0 + or gst["changed"] and gst["changed"] > 0 + then + return true + end + end + return false + end + + -- #################### STATUSLINE -> + + -- ######## Left + + -- Current vi mode ------> + local vi_mode_hl = function() + return { + fg = sett.text, + bg = mode_colors[vim.fn.mode()][2], + style = "bold", + } + end + + components.active[1][1] = { + provider = " " .. assets.mode_icon .. " ", + hl = function() + return { + fg = sett.text, + bg = mode_colors[vim.fn.mode()][2], + } + end, + } + + components.active[1][2] = { + provider = function() return mode_colors[vim.fn.mode()][1] .. " " end, + hl = vi_mode_hl, + } + + -- there is a dilemma: we need to hide Diffs if there is no git info. We can do that, but this will + -- leave the right_separator colored with purple, and since we can't change the color conditonally + -- then the solution is to create two right_separators: one with a mauve sett.bkg and the other one normal + -- sett.bkg; both have the same fg (vi mode). The mauve one appears if there is git info, else the one with + -- the normal sett.bkg appears. Fixed :) + + -- enable if git diffs are not available + components.active[1][3] = { + provider = assets.right_separator, + hl = function() + return { + fg = mode_colors[vim.fn.mode()][2], + bg = sett.bkg, + } + end, + enabled = function() return not any_git_changes() end, + } + + -- enable if git diffs are available + components.active[1][4] = { + provider = assets.right_separator, + hl = function() + return { + fg = mode_colors[vim.fn.mode()][2], + bg = sett.diffs, + } + end, + enabled = function() return any_git_changes() end, + } + -- Current vi mode ------> + + -- Diffs ------> + components.active[1][5] = { + provider = "git_diff_added", + hl = { + fg = sett.text, + bg = sett.diffs, + }, + icon = " " .. assets.git.added .. " ", + } + + components.active[1][6] = { + provider = "git_diff_changed", + hl = { + fg = sett.text, + bg = sett.diffs, + }, + icon = " " .. assets.git.changed .. " ", + } + + components.active[1][7] = { + provider = "git_diff_removed", + hl = { + fg = sett.text, + bg = sett.diffs, + }, + icon = " " .. assets.git.removed .. " ", + } + + components.active[1][8] = { + provider = " ", + hl = { + fg = sett.bkg, + bg = sett.diffs, + }, + enabled = function() return any_git_changes() end, + } + + components.active[1][9] = { + provider = assets.right_separator, + hl = { + fg = sett.diffs, + bg = sett.bkg, + }, + enabled = function() return any_git_changes() end, + } + -- Diffs ------> + + -- Extras ------> + + -- file progress + components.active[1][10] = { + provider = function() + local current_line = vim.fn.line "." + local total_line = vim.fn.line "$" + + if current_line == 1 then + return "Top" + elseif current_line == vim.fn.line "$" then + return "Bot" + end + local result, _ = math.modf((current_line / total_line) * 100) + return result .. "%%" + end, + -- enabled = shortline or function(winid) + -- return vim.api.nvim_win_get_width(winid) > 90 + -- end, + hl = { + fg = sett.extras, + bg = sett.bkg, + }, + left_sep = invi_sep, + } + + -- position + components.active[1][11] = { + provider = "position", + -- enabled = shortline or function(winid) + -- return vim.api.nvim_win_get_width(winid) > 90 + -- end, + hl = { + fg = sett.extras, + bg = sett.bkg, + }, + left_sep = invi_sep, + } + + -- macro + components.active[1][12] = { + provider = "macro", + enabled = function() return vim.api.nvim_get_option_value("cmdheight", { scope = "global" }) == 0 end, + hl = { + fg = sett.extras, + bg = sett.bkg, + }, + left_sep = invi_sep, + } + + -- search count + components.active[1][13] = { + provider = "search_count", + enabled = function() return vim.api.nvim_get_option_value("cmdheight", { scope = "global" }) == 0 end, + hl = { + fg = sett.extras, + bg = sett.bkg, + }, + left_sep = invi_sep, + } + + -- lazy.nvim updates + components.active[1][14] = { + provider = function() return require("lazy.status").updates() end, + enabled = function() + if sett.show_lazy_updates and pcall(require, "lazy") then + return require("lazy.status").has_updates() + else + return false + end + end, + hl = { + fg = sett.extras, + bg = sett.bkg, + }, + left_sep = invi_sep, + } + -- Extras ------> + + -- ######## Left + + -- ######## Center + + -- Diagnostics ------> + -- workspace loader + components.active[2][1] = { + provider = function() + if vim.lsp.status then return "" end + local Lsp = vim.lsp.util.get_progress_messages()[1] + + if Lsp then + local msg = Lsp.message or "" + local percentage = Lsp.percentage + if not percentage then return "" end + local title = Lsp.title or "" + local spinners = { + "", + "󰀚", + "", + } + local success_icon = { + "", + "", + "", + } + local ms = vim.loop.hrtime() / 1000000 + local frame = math.floor(ms / 120) % #spinners + + if percentage >= 70 then + return string.format(" %%<%s %s %s (%s%%%%) ", success_icon[frame + 1], title, msg, percentage) + end + + return string.format(" %%<%s %s %s (%s%%%%) ", spinners[frame + 1], title, msg, percentage) + end + + return "" + end, + enabled = is_enabled(80) and view.lsp.progress == true, + hl = { + fg = C.rosewater, + bg = sett.bkg, + }, + } + + -- general diagnostics (errors, warnings. info and hints) + components.active[2][2] = { + provider = "diagnostic_errors", + enabled = function() return lsp.diagnostics_exist(vim.diagnostic.severity.ERROR) end, + + hl = { + fg = C.red, + bg = sett.bkg, + }, + icon = " " .. assets.lsp.error .. " ", + } + + components.active[2][3] = { + provider = "diagnostic_warnings", + enabled = function() return lsp.diagnostics_exist(vim.diagnostic.severity.WARN) end, + hl = { + fg = C.yellow, + bg = sett.bkg, + }, + icon = " " .. assets.lsp.warning .. " ", + } + + components.active[2][4] = { + provider = "diagnostic_info", + enabled = function() return lsp.diagnostics_exist(vim.diagnostic.severity.INFO) end, + hl = { + fg = C.sky, + bg = sett.bkg, + }, + icon = " " .. assets.lsp.info .. " ", + } + + components.active[2][5] = { + provider = "diagnostic_hints", + enabled = function() return lsp.diagnostics_exist(vim.diagnostic.severity.HINT) end, + hl = { + fg = C.rosewater, + bg = sett.bkg, + }, + icon = " " .. assets.lsp.hint .. " ", + } + -- Diagnostics ------> + + -- ######## Center + + -- ######## Right + + components.active[3][1] = { + provider = "git_branch", + enabled = is_enabled(70), + hl = { + fg = sett.extras, + bg = sett.bkg, + }, + icon = assets.git.branch .. " ", + right_sep = invi_sep, + } + + components.active[3][2] = { + provider = function() + local active_clients = vim.lsp.get_clients { bufnr = 0 } + + -- show an indicator that we have running lsps + if view.lsp.name == false and next(active_clients) ~= nil then + return assets.lsp.server .. " " .. "Lsp" + end + + -- show the actual name of the running lsps + local index = 0 + local lsp_names = "" + for _, lsp_config in ipairs(active_clients) do + if is_lsp_in_excluded_list(lsp_config.name) then goto continue end + + index = index + 1 + if index == 1 then + lsp_names = assets.lsp.server .. " " .. lsp_config.name + else + lsp_names = lsp_names .. view.lsp.separator .. lsp_config.name + end + + ::continue:: + end + + return lsp_names + end, + + hl = { + fg = sett.extras, + bg = sett.bkg, + }, + + right_sep = invi_sep, + } + + components.active[3][3] = { + provider = function() + local filename = vim.fn.expand "%:t" + local extension = vim.fn.expand "%:e" + local present, icons = pcall(require, "nvim-web-devicons") + local icon = present and icons.get_icon(filename, extension) or assets.file + return (sett.show_modified and "%m" or "") .. " " .. icon .. " " .. filename .. " " + end, + enabled = is_enabled(70), + hl = { + fg = sett.text, + bg = sett.curr_file, + }, + left_sep = { + str = assets.left_separator, + hl = { + fg = sett.curr_file, + bg = sett.bkg, + }, + }, + } + + components.active[3][4] = { + provider = function() + local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t") + return " " .. assets.dir .. " " .. dir_name .. " " + end, + enabled = is_enabled(80), + hl = { + fg = sett.text, + bg = sett.curr_dir, + }, + left_sep = { + str = assets.left_separator, + hl = { + fg = sett.curr_dir, + bg = sett.curr_file, + }, + }, + } + -- ######## Right + + -- Inanctive components + components.inactive[1][1] = { + provider = function() return " " .. string.upper(vim.bo.ft) .. " " end, + hl = { + fg = C.overlay2, + bg = C.mantle, + }, + } + + return components + end +end +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/types.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/types.lua new file mode 100644 index 0000000..3bccc4c --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/types.lua @@ -0,0 +1,331 @@ +---@class Catppuccin +---@field options CatppuccinOptions +---@field setup fun(opts: CatppuccinOptions?) + +---@alias CtpFlavor "mocha" | "macchiato" | "frappe" | "latte" | "auto" +---@alias CtpColor "rosewater" | "flamingo" | "pink" | "mauve" | "red" | "maroon" | "peach" | "yellow" | "green" | "teal" | "sky" | "sapphire" | "blue" | "lavender" | "text" | "subtext1" | "subtext0" | "overlay2" | "overlay1" | "overlay0" | "surface2" | "surface1" | "surface0" | "base" | "mantle" | "crust" +---@class CtpFlavors: {all: T, mocha: T, macchiato: T, frappe: T, latte: T } +---@class CtpColors: {rosewater: T, flamingo: T, pink: T, mauve: T, red: T, maroon: T, peach: T, yellow: T, green: T, teal: T, sky: T, sapphire: T, blue: T, lavender: T, text: T, subtext1: T, subtext0: T, overlay2: T, overlay1: T, overlay0: T, surface2: T, surface1: T, surface0: T, base: T, mantle: T, crust: T, none: T } + +---@class CatppuccinOptions +-- Changes the flavor based on the background. See `:h background` for more info. +---@field background CtpBackground? +-- By default catppuccin writes the compiled results into the system's cache directory. +-- You can change the cache dir by changing this value. +---@field compile_path string? +-- Whether to enable transparency. +---@field transparent_background boolean? +---@field float CtpFloatOpts? +-- If true, sets terminal colors (e.g. `g:terminal_color_0`). +---@field term_colors boolean? +-- Workaround for kitty transparency issue: https://github.com/kovidgoyal/kitty/issues/2917 +---@field kitty boolean? +-- Settings for dimming of inactive windows. +---@field dim_inactive CtpDimInactive? +-- Disables all italic styles. +---@field no_italic boolean? +-- Disables all bold styles. +---@field no_bold boolean? +-- Disables all underline styles. +---@field no_underline boolean? +-- Handles the style of general hl groups (see `:h highlight-groups`). +---@field styles CtpStyles? +-- Handles the style of specific lsp hl groups (see `:h lsp-highlight`). +---@field lsp_styles CtpLspStyles? +-- Should detect integrations automatically +---@field auto_integrations boolean? +-- Toggle integrations. Integrations allow Catppuccin to set the theme of various plugins. +---@field integrations CtpIntegrations? +-- Catppuccin colors can be overwritten here. +---@field color_overrides CtpColors | CtpFlavors> | nil +-- Catppuccin highlights can be overwritten here. +---@field highlight_overrides CtpHighlightOverrides? +-- Global highlight overrides. +---@field custom_highlights CtpHighlightOverrideFn | {[string]: CtpHighlight} | nil +-- The default flavor to use on startup. +---@field flavour CtpFlavor? + +---@class CtpBackground +-- Catppuccin flavor to use when `:set background=dark` is set. +---@field dark CtpFlavor? +-- Catppuccin flavor to use when `:set background=light` is set. +---@field light CtpFlavor? + +---@class CtpFloatOpts +---@field transparent boolean enable transparent floating windows +---@field solid boolean use solid style floating windows, see |winborder| + +---@class CtpDimInactive +-- Whether to dim inactive windows. +---@field enabled boolean +-- Whether to darken or lighten inactive windows. +---@field shade "dark" | "light" | nil +-- Percentage of the shade to apply to the inactive window +---@field percentage number? + +---@class CtpStyles +-- Change the style of comments. +---@field comments CtpHighlightArgs[]? +-- Change the style of conditionals. +---@field conditionals CtpHighlightArgs[]? +-- Change the style of loops. +---@field loops CtpHighlightArgs[]? +-- Change the style of functions. +---@field functions CtpHighlightArgs[]? +-- Change the style of keywords. +---@field keywords CtpHighlightArgs[]? +-- Change the style of strings. +---@field strings CtpHighlightArgs[]? +-- Change the style of variables. +---@field variables CtpHighlightArgs[]? +-- Change the style of numbers. +---@field numbers CtpHighlightArgs[]? +-- Change the style of booleans. +---@field booleans CtpHighlightArgs[]? +-- Change the style of properties. +---@field properties CtpHighlightArgs[]? +-- Change the style of types. +---@field types CtpHighlightArgs[]? +-- Change the style of operators. +---@field operators CtpHighlightArgs[]? +-- Change the style of miscs. +---@field miscs CtpHighlightArgs[]? + +---@class CtpLspStyles +-- Styles to apply to virtual text. +---@field virtual_text CtpLspDiagnosticStyles? +-- Styles to apply to underlines. +---@field underlines CtpLspDiagnosticStyles? +-- Inlay hints options. +---@field inlay_hints CtpLspStylesInlayHints? + +---@class CtpLspDiagnosticStyles +-- Change the style of LSP error diagnostics. +---@field errors CtpHighlightArgs[]? +-- Change the style of LSP hint diagnostics. +---@field hints CtpHighlightArgs[]? +-- Change the style of LSP warning diagnostics. +---@field warnings CtpHighlightArgs[]? +-- Change the style of LSP information diagnostics. +---@field information CtpHighlightArgs[]? +-- Change the style of LSP ok diagnostics. +---@field ok CtpHighlightArgs[]? + +---@class CtpLspStylesInlayHints +-- Toggle the background of inlay hints. +---@field background boolean? + +---@class CtpIntegrations +---@field aerial boolean? +---@field alpha boolean? +---@field artio boolean? +---@field avante CtpIntegratinAvant | boolean? +---@field barbar boolean? +-- Use this to set it up: +-- +-- ```lua +-- require("barbecue").setup { +-- -- valid options: +-- -- "catppuccin-latte" +-- -- "catppuccin-frappe" +-- -- "catppuccin-macchiato" +-- -- "catppuccin-mocha" +-- theme = "catppuccin", +-- } +---``` +---@field barbecue CtpIntegrationBarbecue | boolean? +---@field beacon boolean? +---@field blink_cmp CtpIntegrationsBlinkCmp | boolean? +---@field blink_indent boolean? +---@field blink_pairs boolean? +---@field cmp boolean? +---@field buffon boolean? +-- `coc.nvim` links to `lsp_styles` highlight groups, so you can use +-- `lsp_styles.virtual_text` and `lsp_styles.underlines` to style diagnostics. +---@field coc_nvim boolean? +---@field colorful_winsep CtpIntegrationColorfulWinsep | boolean? +---@field copilot_vim boolean? +-- ```lua +-- local sign = vim.fn.sign_define +-- +-- sign("DapBreakpoint", { text = "●", texthl = "DapBreakpoint", linehl = "", numhl = ""}) +-- sign("DapBreakpointCondition", { text = "●", texthl = "DapBreakpointCondition", linehl = "", numhl = ""}) +-- sign("DapLogPoint", { text = "◆", texthl = "DapLogPoint", linehl = "", numhl = ""}) +-- ``` +---@field dadbod_ui boolean? +---@field dap boolean? +---@field dap_ui boolean? +---@field dashboard boolean? +---@field diffview boolean? +---@field dropbar CtpIntegrationDropbar | boolean? +---@field fern boolean? +-- Set `notification.window.winblend` to `0` in your `fidget` config: +-- +-- ```lua +-- require("fidget").setup { +-- notification = { +-- window = { winblend = 0 }, +-- } +-- } +-- ``` +---@field fidget boolean? +---@field flash boolean? +---@field fzf boolean? +---@field gitgutter boolean? +---@field gitgraph boolean? +---@field gitsigns CtpIntegrationGitsigns | boolean? +---@field grug_far boolean? +---@field harpoon boolean? +---@field headlines boolean? +---@field hop boolean? +---@field illuminate CtpIntegrationIlluminate | boolean? +---@field indent_blankline CtpIntegrationIndentBlankline | boolean? +---@field leap boolean? +---@field lightspeed boolean? +---@field lir CtpIntegrationLir | boolean? +-- For custom Lsp kind icon and colors, adjust your `lspsaga` config: +-- +-- ```lua +-- require("lspsaga").setup { +-- ui = { +-- kind = require("catppuccin.groups.integrations.lsp_saga").custom_kind(), +-- }, +-- } +-- ``` +---@field lsp_saga boolean? +---@field lsp_trouble boolean? +---@field lualine CtpIntegrationLualine? +---@field markview boolean? +---@field mason boolean? +-- You **NEED** to enable highlight in your `nvim-navic` config or it won't work: +-- +-- ```lua +-- require("nvim-navic").setup { +-- highlight = true +-- } +-- ``` +---@field navic CtpIntegrationNavic | boolean? +---@field neogit boolean? +---@field neotest boolean? +---@field neotree boolean? +---@field noice boolean? +---@field notify boolean? +---@field nvim_surround boolean? +---@field nvimtree boolean? +---@field octo boolean? +---@field overseer boolean? +---@field pounce boolean? +---@field rainbow_delimiters boolean? +---@field render_markdown boolean? +---@field sandwich boolean? +---@field snacks CtpIntegrationSnacks | boolean? +---@field signify boolean? +---@field symbols_outline boolean? +---@field telekasten boolean? +---@field telescope boolean? +---@field treesitter_context boolean? +---@field ts_rainbow boolean? +---@field ts_rainbow2 boolean? +---@field vim_sneak boolean? +---@field vimwiki boolean? +---@field which_key boolean? +---@field window_picker boolean? + +---@class CtpIntegratinAvant +-- Whether the opts.windows.sidebar_header.rounded option is set on Avante +---@field enabled boolean +---@field windows_sidebar_header_rounded boolean? + +---@class CtpIntegrationBarbecue +-- Whether to use the alternative background. +---@field alt_background boolean? +-- Whether the basename should be bold. +---@field bold_basename boolean? +-- Whether the context should be dimmed. +---@field dim_context boolean? +-- Whether the directory name should be dimmed. +---@field dim_dirname boolean? + +---@class CtpIntegrationsBlinkCmp +--- The border style for the completion menu +---@field style 'solid'|'bordered' + +---@class CtpIntegrationColorfulWinsep +-- Whether to enable the colorful-winsep integration. +---@field enabled boolean +-- Set to a Catppuccin color name to use for the split separator. +---@field color CtpColor? + +---@class CtpIntegrationDropbar +-- Whether to enable the dropbar integration. +---@field enabled boolean +-- Set to true to apply color to the text in dropbar, false to only apply it to the icons. +---@field color_mode boolean? + +---@class CtpIntegrationGitsigns +--- Whether to enable the gitsigns integration +---@field enabled boolean +--- Whether to enabled transparent background option +---@field transparent boolean? + +---@class CtpIntegrationIndentBlankline +-- Whether to enable the integration. +---@field enabled boolean +-- Sets the color of the scope line +---@field scope_color CtpColor? +-- Enables char highlights per indent level. +-- Follow the instructions on the plugins GitHub repo to set it up. +---@field colored_indent_levels boolean? + +---@class CtpIntegrationLir +-- Whether to enable the integration. +---@field enabled boolean +-- Sets lir-git-status.nvim highlight groups +---@field git_status boolean + +---@class CtpIntegrationMini +-- Whether to enable the integration. +---@field enabled boolean +-- Sets the color of the scope line +---@field indentscope_color CtpColor? + +---@alias CtpIntegrationLualine CtpFlavors +---@alias CtpIntegrationLualineOverride CtpIntegrationLualineModes +---@alias CtpIntegrationLualineOverrideFn fun(colors: CtpColors): CtpIntegrationLualineOverride +---@alias CtpIntegrationLualineMode "normal" | "insert" | "visual" | "replace" | "command" | "terminal" | "inactive" +---@class CtpIntegrationLualineModes: { all: T, normal: T, insert: T, visual: T, replace: T, command: T, terminal: T, inactive: T } +---@alias CtpIntegrationLualineSectionOverrides CtpIntegrationLualineSections +---@alias CtpIntegrationLualineSection "a" | "b" | "c" +---@class CtpIntegrationLualineSections: { a: T, b: T, c: T } +---@class CtpIntegrationLualineSectionOverride +---@field fg string? +---@field bg string? +---@field gui string? `gui` argument such as "italic,bold", see |highlight-gui| + +---@class CtpIntegrationNavic +-- Whether to enable the navic integration. +---@field enabled boolean +-- Override the background color for navic. +---@field custom_bg CtpColor | "NONE" | "lualine" | nil + +---@class CtpIntegrationSnacks +-- Whether to enable the snacks integration. +---@field enabled boolean +-- Sets the color of the indent scope line +---@field indent_scope_color CtpColor? + +---@class CtpIntegrationIlluminate +-- Whether to enable the vim-illuminate integration +---@field enabled boolean? +-- Whether to standout IlluminatedWordWrite hl group +---@field lsp boolean? + +---@alias CtpHighlightArgs "bold" | "underline" | "undercurl" | "underdouble" | "underdotted" | "underdashed" | "strikethrough" | "reverse" | "inverse" | "italic" | "standout" | "altfont" | "nocombine" | "NONE" +---@alias CtpHighlightOverrideFn fun(colors: CtpColors): { [string]: CtpHighlight} +---@alias CtpHighlightOverrides CtpFlavors + +---@class CtpHighlight +---@field fg string? +---@field bg string? +---@field style CtpHighlightArgs[]? +---@field link string? diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/utils/barbecue.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/utils/barbecue.lua new file mode 100644 index 0000000..cfef00b --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/utils/barbecue.lua @@ -0,0 +1,53 @@ +return function(flavour) + local C = require("catppuccin.palettes").get_palette(flavour) + local O = require("catppuccin").options + + local transparent_bg = O.transparent_background and C.none or C.mantle + + local dirname_color = O.integrations.barbecue.dim_dirname and C.overlay1 or C.text + local basename_bold = O.integrations.barbecue.bold_basename + local context_color = O.integrations.barbecue.dim_context and C.overlay1 or C.text + local background_color = O.integrations.barbecue.alt_background and transparent_bg or C.none + + local M = { + normal = { fg = C.text, bg = background_color }, + + ellipsis = { fg = C.overlay1 }, + separator = { fg = C.overlay1 }, + modified = { fg = C.peach }, + + dirname = { fg = dirname_color }, + basename = { fg = C.text, bold = basename_bold }, + context = { fg = context_color }, + + -- Same keys as navic + context_file = { fg = C.blue }, + context_module = { fg = C.blue }, + context_namespace = { fg = C.blue }, + context_package = { fg = C.blue }, + context_class = { fg = C.yellow }, + context_method = { fg = C.blue }, + context_property = { fg = C.green }, + context_field = { fg = C.green }, + context_constructor = { fg = C.blue }, + context_enum = { fg = C.green }, + context_interface = { fg = C.yellow }, + context_function = { fg = C.blue }, + context_variable = { fg = C.flamingo }, + context_constant = { fg = C.peach }, + context_string = { fg = C.green }, + context_number = { fg = C.peach }, + context_boolean = { fg = C.peach }, + context_array = { fg = C.blue }, + context_object = { fg = C.blue }, + context_key = { fg = C.flamingo }, + context_null = { fg = C.peach }, + context_enum_member = { fg = C.red }, + context_struct = { fg = C.blue }, + context_event = { fg = C.blue }, + context_operator = { fg = C.blue }, + context_type_parameter = { fg = C.blue }, + } + + return M +end diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/utils/colors.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/utils/colors.lua new file mode 100644 index 0000000..7d88742 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/utils/colors.lua @@ -0,0 +1,186 @@ +local M = {} + +local hsluv = require "catppuccin.lib.hsluv" + +M.bg = "#000000" +M.fg = "#ffffff" +M.day_brightness = 0.3 + +---@param hex_str string hexadecimal value of a color +local hex_to_rgb = function(hex_str) + local hex = "[abcdef0-9][abcdef0-9]" + local pat = "^#(" .. hex .. ")(" .. hex .. ")(" .. hex .. ")$" + hex_str = string.lower(hex_str) + + assert(string.find(hex_str, pat) ~= nil, "hex_to_rgb: invalid hex_str: " .. tostring(hex_str)) + + local red, green, blue = string.match(hex_str, pat) + return { tonumber(red, 16), tonumber(green, 16), tonumber(blue, 16) } +end + +---@param fg string forecrust color +---@param bg string background color +---@param alpha number number between 0 and 1. 0 results in bg, 1 results in fg +function M.blend(fg, bg, alpha) + bg = hex_to_rgb(bg) + fg = hex_to_rgb(fg) + + local blendChannel = function(i) + local ret = (alpha * fg[i] + ((1 - alpha) * bg[i])) + return math.floor(math.min(math.max(0, ret), 255) + 0.5) + end + + return string.format("#%02X%02X%02X", blendChannel(1), blendChannel(2), blendChannel(3)) +end + +function M.darken(hex, amount, bg) return M.blend(hex, bg or M.bg, math.abs(amount)) end + +function M.lighten(hex, amount, fg) return M.blend(hex, fg or M.fg, math.abs(amount)) end + +function M.brighten(color, percentage) + local hsl = hsluv.hex_to_hsluv(color) + local larpSpace = 100 - hsl[3] + if percentage < 0 then larpSpace = hsl[3] end + hsl[3] = hsl[3] + larpSpace * percentage + return hsluv.hsluv_to_hex(hsl) +end + +function M.invertColor(color) + if color ~= "NONE" then + local hsl = hsluv.hex_to_hsluv(color) + hsl[3] = 100 - hsl[3] + if hsl[3] < 40 then hsl[3] = hsl[3] + (100 - hsl[3]) * M.day_brightness end + return hsluv.hsluv_to_hex(hsl) + end + return color +end + +function M.string_to_color(colors, value, default) + if not value or value == "" then return default end + + -- If the value is a hex color code then return it + local hex = "[abcdef0-9][abcdef0-9]" + local pat = "^#" .. hex .. hex .. hex .. "$" + if string.match(value, pat) then return value end + + local acceptable_colors = { "black", "red", "green", "blue", "magenta", "cyan", "text", "orange", "pink" } + for _, ac in ipairs(acceptable_colors) do + if string.match(value, ac) then return colors[value] end + end + + -- Did not match anything to return default + return default +end + +function M.color_is_bright(r, g, b) + -- Counting the perceptive luminance - human eye favors green color + local luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255 + if luminance > 0.5 then + return true -- Bright colors, black font + else + return false -- Dark colors, text font + end +end + +function M.hex2rgb(hex) + return tonumber("0x" .. hex:sub(1, 2)), tonumber("0x" .. hex:sub(3, 4)), tonumber("0x" .. hex:sub(5, 6)) +end + +function M.assert_brightness(color) + local hex = color:gsub("#", "") + local r = M.hex2rgb(string.sub(hex, 1, 2)) + local g = M.hex2rgb(string.sub(hex, 3, 4)) + local b = M.hex2rgb(string.sub(hex, 5, 6)) + + if M.color_is_bright(tonumber(r), tonumber(g), tonumber(b)) == true then + return true -- bright + end + + return false -- dull +end + +function M.vary_color(palettes, default) + local flvr = require("catppuccin").flavour + + if palettes[flvr] ~= nil then return palettes[flvr] end + return default +end + +M.nonnil = vim.nonnil + or vim.F.if_nil + or function(...) + local nargs = select("#", ...) + for i = 1, nargs do + local v = select(i, ...) + if v ~= nil then return v end + end + return nil + end + +---@param color (Color|string)? +---@param default Color +---@return string +function M.select_color(color, default) return C[M.nonnil(color, default)] or C[default] end + +local function rgb2Hex(rgb) + local hexadecimal = "#" + + for _, value in pairs(rgb) do + local hex = "" + + while value > 0 do + local index = math.fmod(value, 16) + 1 + value = math.floor(value / 16) + hex = string.sub(hsluv.hexChars, index, index) .. hex + end + + if string.len(hex) == 0 then + hex = "00" + elseif string.len(hex) == 1 then + hex = "0" .. hex + end + + hexadecimal = hexadecimal .. hex + end + + return hexadecimal +end + +function M.increase_saturation(hex, percentage) + local rgb = hex_to_rgb(hex) + + local saturation_float = percentage + + table.sort(rgb) + local rgb_intensity = { + min = rgb[1] / 255, + mid = rgb[2] / 255, + max = rgb[3] / 255, + } + + if rgb_intensity.max == rgb_intensity.min then + -- all colors have same intensity, which means + -- the original color is gray, so we can't change saturation. + return hex + end + + local new_intensities = {} + new_intensities.max = rgb_intensity.max + new_intensities.min = rgb_intensity.max * (1 - saturation_float) + + if rgb_intensity.mid == rgb_intensity.min then + new_intensities.mid = new_intensities.min + else + local intensity_proportion = (rgb_intensity.max - rgb_intensity.mid) / (rgb_intensity.mid - rgb_intensity.min) + new_intensities.mid = (intensity_proportion * new_intensities.min + rgb_intensity.max) + / (intensity_proportion + 1) + end + + for i, v in pairs(new_intensities) do + new_intensities[i] = math.floor(v * 255) + end + table.sort(new_intensities) + return (rgb2Hex { new_intensities.max, new_intensities.min, new_intensities.mid }) +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/utils/integration_mappings.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/utils/integration_mappings.lua new file mode 100644 index 0000000..fcc1e1c --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/utils/integration_mappings.lua @@ -0,0 +1,72 @@ +local M = { + ["aerial.nvim"] = "aerial", + ["alpha-nvim"] = "alpha", + ["artio.nvim"] = "artio", + ["avante.nvim"] = "avante", + ["barbar.nvim"] = "barbar", + ["beacon.nvim"] = "beacon", + ["blink.cmp"] = "blink_cmp", + ["blink.indent"] = "blink_indent", + ["blink.pairs"] = "blink_pairs", + ["buffon.nvim"] = "buffon", + ["coc.nvim"] = "coc_nvim", + ["colorful-winsep.nvim"] = "colorful_winsep", + ["copilot.vim"] = "copilot_vim", + ["dashboard-nvim"] = "dashboard", + ["diffview.nvim"] = "diffview", + ["dropbar.nvim"] = "dropbar", + ["fidget.nvim"] = "fidget", + ["flash.nvim"] = "flash", + ["fzf-lua"] = "fzf", + ["gitgraph.nvim"] = "gitgraph", + ["gitsigns.nvim"] = "gitsigns", + ["grug-far.nvim"] = "grug_far", + ["harpoon"] = "harpoon", + ["headlines.nvim"] = "headlines", + ["hop.nvim"] = "hop", + ["indent-blankline.nvim"] = "indent_blankline", + ["leap.nvim"] = "leap", + ["lightspeed.nvim"] = "lightspeed", + ["lir.nvim"] = "lir", + ["lspsaga.nvim"] = "lsp_saga", + ["markview.nvim"] = "markview", + ["mason.nvim"] = "mason", + ["mini.nvim"] = "mini", + ["neo-tree.nvim"] = "neotree", + ["neogit"] = "neogit", + ["neotest"] = "neotest", + ["notifier.nvim"] = "notifier", + ["nvim-cmp"] = "cmp", + ["nvim-dap"] = "dap", + ["nvim-dap-ui"] = "dap_ui", + ["nvim-navic"] = "navic", + ["nvim-notify"] = "notify", + ["nvim-surround"] = "nvim_surround", + ["nvim-tree.lua"] = "nvimtree", + ["nvim-treesitter-context"] = "treesitter_context", + ["nvim-ts-rainbow"] = "ts_rainbow", + ["nvim-ts-rainbow2"] = "ts_rainbow2", + ["nvim-ufo"] = "ufo", + ["nvim-window-picker"] = "window_picker", + ["octo.nvim"] = "octo", + ["overseer.nvim"] = "overseer", + ["pounce.nvim"] = "pounce", + ["rainbow-delimiters.nvim"] = "rainbow_delimiters", + ["render-markdown.nvim"] = "render_markdown", + ["snacks.nvim"] = "snacks", + ["symbols-outline.nvim"] = "symbols_outline", + ["telekasten.nvim"] = "telekasten", + ["telescope.nvim"] = "telescope", + ["trouble.nvim"] = "lsp_trouble", + ["vim-dadbod-ui"] = "dadbod_ui", + ["vim-fern"] = "fern", + ["vim-gitgutter"] = "gitgutter", + ["vim-illuminate"] = "illuminate", + ["vim-sandwich"] = "sandwich", + ["vim-signify"] = "signify", + ["vim-sneak"] = "vim_sneak", + ["vimwiki"] = "vimwiki", + ["which-key.nvim"] = "which_key", +} + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/utils/lualine.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/utils/lualine.lua new file mode 100644 index 0000000..a19802e --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/utils/lualine.lua @@ -0,0 +1,60 @@ +---@param colors_override (CtpIntegrationLualineOverride | CtpIntegrationLualineOverrideFn)? +---@param colors CtpColors +local function get_colors(colors_override, colors) + if colors_override == nil then + return {} + elseif type(colors_override) == "function" then + return colors_override(colors) + else + return colors_override + end +end +return function(flavour) + flavour = flavour or require("catppuccin").flavour or vim.g.catppuccin_flavour or "mocha" + local C = require("catppuccin.palettes").get_palette(flavour) + local O = require("catppuccin").options + + local transparent_bg = O.transparent_background and "NONE" or C.mantle + local default_colors = { + normal = { + a = { bg = C.blue, fg = C.mantle, gui = "bold" }, + b = { bg = C.surface0, fg = C.blue }, + c = { bg = transparent_bg, fg = C.text }, + }, + + insert = { + a = { bg = C.green, fg = C.base, gui = "bold" }, + b = { bg = C.surface0, fg = C.green }, + }, + + terminal = { + a = { bg = C.green, fg = C.base, gui = "bold" }, + b = { bg = C.surface0, fg = C.green }, + }, + + command = { + a = { bg = C.peach, fg = C.base, gui = "bold" }, + b = { bg = C.surface0, fg = C.peach }, + }, + visual = { + a = { bg = C.mauve, fg = C.base, gui = "bold" }, + b = { bg = C.surface0, fg = C.mauve }, + }, + replace = { + a = { bg = C.red, fg = C.base, gui = "bold" }, + b = { bg = C.surface0, fg = C.red }, + }, + inactive = { + a = { bg = transparent_bg, fg = C.blue }, + b = { bg = transparent_bg, fg = C.surface1, gui = "bold" }, + c = { bg = transparent_bg, fg = C.overlay0 }, + }, + } + local overrides = O.integrations.lualine + if overrides then + local default_override = get_colors(overrides.all, C) + local flavor_override = get_colors(overrides[flavour], C) + return vim.tbl_deep_extend("force", default_colors, default_override, flavor_override) + end + return default_colors +end diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/utils/reactive.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/utils/reactive.lua new file mode 100644 index 0000000..c214a11 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/catppuccin/utils/reactive.lua @@ -0,0 +1,140 @@ +local M = {} + +function M.cursor(name, palette) + return { + name = name, + init = function() vim.opt.guicursor:append "a:ReactiveCursor" end, + modes = { + n = { + hl = { + ReactiveCursor = { bg = palette.yellow }, + }, + }, + i = { + hl = { + ReactiveCursor = { bg = palette.teal }, + }, + }, + no = { + operators = { + d = { + hl = { + ReactiveCursor = { bg = palette.red }, + }, + }, + y = { + hl = { + ReactiveCursor = { bg = palette.peach }, + }, + }, + c = { + hl = { + ReactiveCursor = { bg = palette.blue }, + }, + }, + }, + }, + R = { + hl = { + ReactiveCursor = { bg = palette.sapphire }, + }, + }, + -- visual + [{ "v", "V", "\x16" }] = { + hl = { + ReactiveCursor = { bg = palette.mauve }, + }, + }, + -- select + [{ "s", "S", "\x13" }] = { + hl = { + ReactiveCursor = { bg = palette.pink }, + }, + }, + }, + } +end + +function M.cursorline(name, palette) + local darken = require("catppuccin.utils.colors").darken + + return { + name = name, + static = { + winhl = { + inactive = { + CursorLine = { bg = darken(palette.surface0, 0.75) }, + CursorLineNr = { bg = darken(palette.surface0, 0.75) }, + }, + }, + }, + modes = { + -- insert mode + i = { + winhl = { + CursorLine = { bg = darken(palette.sky, 0.3) }, + CursorLineNr = { bg = darken(palette.sky, 0.3) }, + }, + }, + -- normal mode + n = { + winhl = { + CursorLine = { bg = palette.surface0 }, + CursorLineNr = { bg = palette.surface0 }, + }, + }, + -- operator-pending mode + no = { + operators = { + [{ "gu", "gU", "g~", "~" }] = { + winhl = { + CursorLine = { bg = palette.surface2 }, + CursorLineNr = { bg = palette.surface2 }, + }, + }, + -- delete operator + d = { + winhl = { + CursorLine = { bg = darken(palette.red, 0.4) }, + CursorLineNr = { bg = darken(palette.red, 0.4) }, + }, + }, + -- yank operator + y = { + winhl = { + CursorLine = { bg = darken(palette.peach, 0.3) }, + CursorLineNr = { bg = darken(palette.peach, 0.3) }, + }, + }, + -- change operator + c = { + winhl = { + CursorLine = { bg = darken(palette.blue, 0.4) }, + CursorLineNr = { bg = darken(palette.blue, 0.4) }, + }, + }, + }, + }, + R = { + winhl = { + CursorLine = { bg = darken(palette.sapphire, 0.4) }, + CursorLineNr = { bg = darken(palette.sapphire, 0.4) }, + }, + }, + -- visual mode + [{ "v", "V", "\x16" }] = { + winhl = { + Visual = { bg = darken(palette.mauve, 0.4) }, + }, + }, + -- select mode + [{ "s", "S", "\x13" }] = { + winhl = { + Visual = { bg = darken(palette.pink, 0.4) }, + }, + }, + }, + } +end + +return M diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/lualine/themes/catppuccin-frappe.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/lualine/themes/catppuccin-frappe.lua new file mode 100644 index 0000000..aafd00c --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/lualine/themes/catppuccin-frappe.lua @@ -0,0 +1 @@ +return require "catppuccin.utils.lualine" "frappe" diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/lualine/themes/catppuccin-latte.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/lualine/themes/catppuccin-latte.lua new file mode 100644 index 0000000..2b11e17 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/lualine/themes/catppuccin-latte.lua @@ -0,0 +1 @@ +return require "catppuccin.utils.lualine" "latte" diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/lualine/themes/catppuccin-macchiato.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/lualine/themes/catppuccin-macchiato.lua new file mode 100644 index 0000000..c8102ca --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/lualine/themes/catppuccin-macchiato.lua @@ -0,0 +1 @@ +return require "catppuccin.utils.lualine" "macchiato" diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/lualine/themes/catppuccin-mocha.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/lualine/themes/catppuccin-mocha.lua new file mode 100644 index 0000000..d5b190c --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/lualine/themes/catppuccin-mocha.lua @@ -0,0 +1 @@ +return require "catppuccin.utils.lualine" "mocha" diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/lualine/themes/catppuccin-nvim.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/lualine/themes/catppuccin-nvim.lua new file mode 100644 index 0000000..4e18b44 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/lualine/themes/catppuccin-nvim.lua @@ -0,0 +1 @@ +return require "catppuccin.utils.lualine"() diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/reactive/presets/catppuccin-frappe-cursor.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/reactive/presets/catppuccin-frappe-cursor.lua new file mode 100644 index 0000000..3cbc8c6 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/reactive/presets/catppuccin-frappe-cursor.lua @@ -0,0 +1,4 @@ +local palette = require("catppuccin.palettes").get_palette "frappe" +local presets = require "catppuccin.utils.reactive" + +return presets.cursor("catppuccin-frappe-cursor", palette) diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/reactive/presets/catppuccin-frappe-cursorline.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/reactive/presets/catppuccin-frappe-cursorline.lua new file mode 100644 index 0000000..4e8a1b4 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/reactive/presets/catppuccin-frappe-cursorline.lua @@ -0,0 +1,78 @@ +local darken = require("catppuccin.utils.colors").darken +local palette = require("catppuccin.palettes").get_palette "frappe" + +return { + name = "catppuccin-frappe-cursorline", + static = { + winhl = { + inactive = { + CursorLine = { bg = darken(palette.surface0, 0.85) }, + CursorLineNr = { bg = darken(palette.surface0, 0.85) }, + }, + }, + }, + modes = { + i = { + winhl = { + CursorLine = { bg = darken(palette.sky, 0.4) }, + CursorLineNr = { bg = darken(palette.sky, 0.4) }, + }, + }, + n = { + winhl = { + CursorLine = { bg = palette.surface0 }, + CursorLineNr = { bg = palette.surface0 }, + }, + }, + no = { + operators = { + [{ "gu", "gU", "g~", "~" }] = { + winhl = { + CursorLine = { bg = palette.surface2 }, + CursorLineNr = { bg = palette.surface2 }, + }, + }, + -- delete operator + d = { + winhl = { + CursorLine = { bg = darken(palette.red, 0.4) }, + CursorLineNr = { bg = darken(palette.red, 0.4) }, + }, + }, + -- yank operator + y = { + winhl = { + CursorLine = { bg = darken(palette.peach, 0.4) }, + CursorLineNr = { bg = darken(palette.peach, 0.4) }, + }, + }, + -- change operator + c = { + winhl = { + CursorLine = { bg = darken(palette.blue, 0.5) }, + CursorLineNr = { bg = darken(palette.blue, 0.5) }, + }, + }, + }, + }, + -- replace mode + R = { + winhl = { + CursorLine = { bg = darken(palette.sapphire, 0.5) }, + CursorLineNr = { bg = darken(palette.sapphire, 0.5) }, + }, + }, + -- visual mode + [{ "v", "V", "\x16" }] = { + winhl = { + Visual = { bg = darken(palette.mauve, 0.4) }, + }, + }, + -- select mode + [{ "s", "S", "\x13" }] = { + winhl = { + Visual = { bg = darken(palette.pink, 0.4) }, + }, + }, + }, +} diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/reactive/presets/catppuccin-latte-cursor.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/reactive/presets/catppuccin-latte-cursor.lua new file mode 100644 index 0000000..3c9a660 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/reactive/presets/catppuccin-latte-cursor.lua @@ -0,0 +1,8 @@ +local palette = require("catppuccin.palettes").get_palette "latte" +local presets = require "catppuccin.utils.reactive" + +local preset = presets.cursor("catppuccin-latte-cursor", palette) + +preset.modes.R.hl.ReactiveCursor = { bg = palette.flamingo } + +return preset diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/reactive/presets/catppuccin-latte-cursorline.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/reactive/presets/catppuccin-latte-cursorline.lua new file mode 100644 index 0000000..77e647b --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/reactive/presets/catppuccin-latte-cursorline.lua @@ -0,0 +1,77 @@ +local lighten = require("catppuccin.utils.colors").lighten +local palette = require("catppuccin.palettes").get_palette "latte" + +return { + name = "catppuccin-latte-cursorline", + static = { + winhl = { + inactive = { + CursorLine = { bg = lighten(palette.surface0, 0.5) }, + CursorLineNr = { bg = lighten(palette.surface0, 0.5) }, + }, + }, + }, + modes = { + i = { + winhl = { + CursorLine = { bg = lighten(palette.teal, 0.4) }, + CursorLineNr = { bg = lighten(palette.teal, 0.4) }, + }, + }, + n = { + winhl = { + CursorLine = { bg = palette.surface0 }, + CursorLineNr = { bg = palette.surface0 }, + }, + }, + no = { + operators = { + [{ "gu", "gU", "g~", "~" }] = { + winhl = { + CursorLine = { bg = palette.surface2 }, + CursorLineNr = { bg = palette.surface2 }, + }, + }, + -- delete operator + d = { + winhl = { + CursorLine = { bg = lighten(palette.red, 0.3) }, + CursorLineNr = { bg = lighten(palette.red, 0.3) }, + }, + }, + -- yank operator + y = { + winhl = { + CursorLine = { bg = lighten(palette.peach, 0.3) }, + CursorLineNr = { bg = lighten(palette.peach, 0.3) }, + }, + }, + -- change operator + c = { + winhl = { + CursorLine = { bg = lighten(palette.blue, 0.3) }, + CursorLineNr = { bg = lighten(palette.blue, 0.3) }, + }, + }, + }, + }, + -- visual + [{ "v", "V", "\x16" }] = { + winhl = { + Visual = { bg = lighten(palette.mauve, 0.3) }, + }, + }, + -- select + [{ "s", "S", "\x13" }] = { + winhl = { + Visual = { bg = lighten(palette.pink, 0.3) }, + }, + }, + R = { + winhl = { + CursorLine = { bg = lighten(palette.flamingo, 0.2) }, + CursorLineNr = { bg = lighten(palette.flamingo, 0.2) }, + }, + }, + }, +} diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/reactive/presets/catppuccin-macchiato-cursor.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/reactive/presets/catppuccin-macchiato-cursor.lua new file mode 100644 index 0000000..73d3b3a --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/reactive/presets/catppuccin-macchiato-cursor.lua @@ -0,0 +1,4 @@ +local palette = require("catppuccin.palettes").get_palette "macchiato" +local presets = require "catppuccin.utils.reactive" + +return presets.cursor("catppuccin-macchiato-cursor", palette) diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/reactive/presets/catppuccin-macchiato-cursorline.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/reactive/presets/catppuccin-macchiato-cursorline.lua new file mode 100644 index 0000000..a38c3fd --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/reactive/presets/catppuccin-macchiato-cursorline.lua @@ -0,0 +1,10 @@ +local palette = require("catppuccin.palettes").get_palette "macchiato" +local presets = require "catppuccin.utils.reactive" +local darken = require("catppuccin.utils.colors").darken + +local preset = presets.cursorline("catppuccin-macchiato-cursorline", palette) + +preset.static.winhl.inactive.CursorLine = { bg = darken(palette.surface0, 0.8) } +preset.static.winhl.inactive.CursorLineNr = { bg = darken(palette.surface0, 0.8) } + +return preset diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/reactive/presets/catppuccin-mocha-cursor.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/reactive/presets/catppuccin-mocha-cursor.lua new file mode 100644 index 0000000..c4e4793 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/reactive/presets/catppuccin-mocha-cursor.lua @@ -0,0 +1,4 @@ +local palette = require("catppuccin.palettes").get_palette "mocha" +local presets = require "catppuccin.utils.reactive" + +return presets.cursor("catppuccin-mocha-cursor", palette) diff --git a/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/reactive/presets/catppuccin-mocha-cursorline.lua b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/reactive/presets/catppuccin-mocha-cursorline.lua new file mode 100644 index 0000000..d511dc9 --- /dev/null +++ b/configs/neovim/files/.config/nvim/pack/themes/start/catppuccin/lua/reactive/presets/catppuccin-mocha-cursorline.lua @@ -0,0 +1,4 @@ +local palette = require("catppuccin.palettes").get_palette "mocha" +local presets = require "catppuccin.utils.reactive" + +return presets.cursorline("catppuccin-mocha-cursorline", palette) diff --git a/configs/vscode/files/.config/Code/User/settings.json b/configs/vscode/files/.config/Code/User/settings.json deleted file mode 100644 index e279ede..0000000 --- a/configs/vscode/files/.config/Code/User/settings.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "workbench.colorTheme": "ayu MiDas", - "claudeCode.preferredLocation": "panel", - "redhat.telemetry.enabled": true, - "claudeCode.selectedModel": "default", - "explorer.confirmDelete": false, - "java.configuration.runtimes": [], - "python.languageServer": "Default", - "git.autofetch": true, - "explorer.confirmDragAndDrop": false, - "docker.extension.dockerEngineAvailabilityPrompt": false -} \ No newline at end of file diff --git a/configs/vscode/files/.vscode/extensions/qyurila.ayu-midas-1.1.0/LICENSE b/configs/vscode/files/.vscode/extensions/qyurila.ayu-midas-1.1.0/LICENSE new file mode 100644 index 0000000..97c6154 --- /dev/null +++ b/configs/vscode/files/.vscode/extensions/qyurila.ayu-midas-1.1.0/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Ike Ku + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/configs/vscode/files/.vscode/extensions/qyurila.ayu-midas-1.1.0/ayu-midas.json b/configs/vscode/files/.vscode/extensions/qyurila.ayu-midas-1.1.0/ayu-midas.json new file mode 100644 index 0000000..a40c615 --- /dev/null +++ b/configs/vscode/files/.vscode/extensions/qyurila.ayu-midas-1.1.0/ayu-midas.json @@ -0,0 +1,913 @@ +{ + "type": "dark", + "colors": { + "focusBorder": "#e6b45099", + "foreground": "#8a9199", + "disabledForeground": "#707a8c", + "widget.shadow": "#12151cb3", + "selection.background": "#409fff40", + "descriptionForeground": "#707a8c", + "errorForeground": "#d95757", + "icon.foreground": "#8a9199", + "textBlockQuote.background": "#14171f", + "textBlockQuote.border": "#364159", + "textCodeBlock.background": "#14171f", + "textLink.foreground": "#e6b450", + "textLink.activeForeground": "#ffcc66", + "textPreformat.foreground": "#8a9199", + "textSeparator.foreground": "#707a8c", + "button.background": "#e6b450", + "button.foreground": "#11151c", + "button.hoverBackground": "#d0a13d", + "button.secondaryBackground": "#565b6666", + "button.secondaryForeground": "#cccac2", + "button.secondaryHoverBackground": "#707a8c80", + "checkbox.background": "#11151c", + "checkbox.foreground": "#707a8c", + "checkbox.border": "#1f2430", + "checkbox.selectBackground": "#e6b4504d", + "checkbox.selectBorder": "#e6b45033", + "dropdown.background": "#1f2430", + "dropdown.listBackground": "#1c212b", + "dropdown.foreground": "#8a9199", + "dropdown.border": "#a2a9b12e", + "input.background": "#11151c", + "input.foreground": "#bfbdb6", + "input.border": "#1f2430", + "input.placeholderForeground": "#707a8c80", + "inputOption.activeBackground": "#e6b45033", + "inputOption.activeForeground": "#e6b450", + "inputOption.activeBorder": "#e6b4504d", + "inputOption.hoverBackground": "#1f2430", + "inputValidation.errorBackground": "#1f2430", + "inputValidation.errorBorder": "#d95757", + "inputValidation.infoBackground": "#1f2430", + "inputValidation.infoBorder": "#5ccfe6", + "inputValidation.warningBackground": "#1f2430", + "inputValidation.warningBorder": "#ffb454", + "scrollbar.shadow": "#000000", + "scrollbarSlider.background": "#565b664d", + "scrollbarSlider.hoverBackground": "#565b6652", + "scrollbarSlider.activeBackground": "#565b6666", + "badge.background": "#e6b450", + "badge.foreground": "#000000", + "progressBar.background": "#e6b450", + "list.activeSelectionBackground": "#409fff40", + "list.activeSelectionForeground": "#cccac2", + "list.dropBackground": "#409fff21", + "list.focusBackground": "#63759926", + "list.focusForeground": "#cccac2", + "list.focusHighlightForeground": "#ffcc66", + "list.focusOutline": "#e6b4504d", + "list.highlightForeground": "#ffcc66", + "list.deemphasizedForeground": "#d95757", + "list.hoverBackground": "#1f2430", + "list.hoverForeground": "#cccac2", + "list.inactiveSelectionBackground": "#409fff21", + "list.inactiveSelectionForeground": "#8a9199", + "list.invalidItemForeground": "#707a8c4d", + "list.errorForeground": "#d95757", + "list.warningForeground": "#ffb454", + "listFilterWidget.background": "#1c212b", + "listFilterWidget.outline": "#ffcc66", + "listFilterWidget.noMatchesOutline": "#ff6666", + "list.filterMatchBackground": "#5c467266", + "list.filterMatchBorder": "#69538066", + "tree.indentGuidesStroke": "#a2a9b12e", + "tree.inactiveIndentGuidesStroke": "#6c73802e", + "activityBar.background": "#1f2430", + "activityBar.foreground": "#ffcc66b3", + "activityBar.dropBorder": "#8a919959", + "activityBar.inactiveForeground": "#707a8c", + "activityBarBadge.background": "#e6b450", + "activityBarBadge.foreground": "#000000", + "activityBar.activeBackground": "#1c212b", + "activityBar.activeBorder": "#ffcc66cc", + "activityBar.activeFocusBorder": "#ffcc66", + "sideBar.background": "#14171f", + "sideBar.border": "#0d1017", + "sideBarTitle.foreground": "#8a9199", + "sideBarSectionHeader.background": "#1c212b", + "sideBarSectionHeader.foreground": "#8a9199", + "sideBarSectionHeader.border": "#171b24", + "minimap.findMatchHighlight": "#6c5980", + "minimap.selectionHighlight": "#409fff40", + "minimap.errorHighlight": "#d95757", + "minimap.warningHighlight": "#ffb454", + "minimap.background": "#14171fbf", + "minimap.selectionOccurrenceHighlight": "#6c5980", + "minimapSlider.background": "#565b6633", + "minimapSlider.hoverBackground": "#565b664d", + "minimapSlider.activeBackground": "#565b6666", + "minimapGutter.addedBackground": "#87d96c", + "minimapGutter.modifiedBackground": "#80bfff", + "minimapGutter.deletedBackground": "#f27983", + "editorGroup.border": "#a2a9b12e", + "editorGroup.dropBackground": "#409fff21", + "editorGroupHeader.noTabsBackground": "#171b24", + "editorGroupHeader.tabsBackground": "#171b24", + "editorGroup.focusedEmptyBorder": "#e6b45080", + "tab.activeBackground": "#11151c", + "tab.activeForeground": "#cccac2", + "tab.activeBorderTop": "#d0a13d", + "tab.unfocusedActiveBackground": "#11151c", + "tab.unfocusedActiveForeground": "#8a9199", + "tab.unfocusedActiveBorderTop": "#707a8c", + "tab.inactiveBackground": "#171b24", + "tab.inactiveForeground": "#8a9199", + "tab.unfocusedInactiveForeground": "#707a8c", + "tab.border": "#14171f", + "tab.lastPinnedBorder": "#d0a13d", + "tab.activeModifiedBorder": "#80bfffcc", + "editorPane.background": "#14171f", + "editor.background": "#0d1017", + "editor.foreground": "#bfbdb6", + "editorLineNumber.foreground": "#6c7380cc", + "editorLineNumber.activeForeground": "#bfbdb6", + "editorLineNumber.dimmedForeground": "#6c738066", + "editorCursor.background": "#000000", + "editorCursor.foreground": "#e6b450", + "editor.selectionBackground": "#409fff40", + "editor.inactiveSelectionBackground": "#409fff21", + "editor.selectionHighlightBackground": "#87d96c26", + "editor.wordHighlightBackground": "#80bfff1a", + "editor.wordHighlightBorder": "#80bfff80", + "editor.wordHighlightStrongBackground": "#87d96c1a", + "editor.wordHighlightStrongBorder": "#87d96c80", + "editor.wordHighlightTextBackground": "#87d96c1a", + "editor.wordHighlightTextBorder": "#87d96c80", + "editor.findMatchBackground": "#695380", + "editor.findMatchHighlightBackground": "#69538066", + "editor.findRangeHighlightBackground": "#69538026", + "search.resultsInfoForeground": "#707a8c", + "searchEditor.findMatchBackground": "#69538066", + "editor.hoverHighlightBackground": "#409fff21", + "editor.lineHighlightBackground": "#6c738026", + "editorUnicodeHighlight.background": "#ffb45426", + "editorUnicodeHighlight.border": "#ffb454bf", + "editorLink.activeForeground": "#ffcc66", + "editor.rangeHighlightBackground": "#69538033", + "editor.symbolHighlightBackground": "#69538066", + "editorWhitespace.foreground": "#6c738040", + "editorIndentGuide.background": "#6c738040", + "editorIndentGuide.activeBackground": "#6c738080", + "editorRuler.foreground": "#6c738040", + "editor.linkedEditingBackground": "#f279834d", + "editorCodeLens.foreground": "#acb6bf73", + "editorLightBulb.foreground": "#ffcc66", + "editorLightBulbAutoFix.foreground": "#ffcc66", + "editorBracketMatch.background": "#6c73804d", + "editorBracketMatch.border": "#6c7380bf", + "editorBracketHighlight.foreground1": "#f4c76a", + "editorBracketHighlight.foreground2": "#dc7467", + "editorBracketHighlight.foreground3": "#36b1c8", + "editor.foldBackground": "#95e6cb1a", + "editorOverviewRuler.border": "#ffffff00", + "editorOverviewRuler.findMatchForeground": "#6c5980", + "editorOverviewRuler.rangeHighlightForeground": "#6c5980", + "editorOverviewRuler.selectionHighlightForeground": "#6c5980", + "editorOverviewRuler.wordHighlightForeground": "#80bfff4d", + "editorOverviewRuler.wordHighlightStrongForeground": "#87d96c4d", + "editorOverviewRuler.wordHighlightTextForeground": "#87d96c4d", + "editorOverviewRuler.modifiedForeground": "#80bfff99", + "editorOverviewRuler.addedForeground": "#87d96c99", + "editorOverviewRuler.deletedForeground": "#f2798399", + "editorOverviewRuler.errorForeground": "#d95757e6", + "editorOverviewRuler.warningForeground": "#ffb454e6", + "editorOverviewRuler.infoForeground": "#5ccfe6e6", + "editorOverviewRuler.bracketMatchForeground": "#acb6bf4d", + "editorError.foreground": "#d95757", + "editorWarning.foreground": "#ffb454", + "editorInfo.foreground": "#5ccfe6", + "editorGutter.modifiedBackground": "#80bfffcc", + "editorGutter.addedBackground": "#87d96ccc", + "editorGutter.deletedBackground": "#f27983cc", + "diffEditor.insertedTextBackground": "#87d96c1f", + "diffEditor.removedTextBackground": "#f279831f", + "diffEditor.border": "#a2a9b12e", + "diffEditor.diagonalFill": "#171b24", + "editorWidget.foreground": "#707a8c", + "editorWidget.background": "#1f2430", + "editorWidget.border": "#ffffff00", + "editorWidget.resizeBorder": "#a2a9b12e", + "editorSuggestWidget.background": "#1c212b", + "editorSuggestWidget.border": "#6c73802e", + "editorSuggestWidget.foreground": "#bfbdb6", + "editorSuggestWidget.focusHighlightForeground": "#ffcc66", + "editorSuggestWidget.highlightForeground": "#e6b450", + "editorSuggestWidget.selectedBackground": "#69758c1f", + "editorSuggestWidget.selectedForeground": "#cccac2", + "editorSuggestWidget.selectedIconBackground": "#ffcc66", + "editorHoverWidget.background": "#1c212b", + "editorHoverWidget.border": "#6c73802e", + "editorHoverWidget.highlightForeground": "#a2a9b12e", + "editorHoverWidget.statusBasBackground": "#a2a9b12e", + "editorStickyScroll.background": "#11151c", + "editorStickyScrollHover.background": "#171b24", + "debugExceptionWidget.background": "#1c212b", + "debugExceptionWidget.border": "#11151c", + "editorMarkerNavigation.background": "#1c212b", + "editorMarkerNavigationError.headerBackground": "#d9575726", + "editorMarkerNavigationWarning.headerBackground": "#ffb45426", + "editorMarkerNavigationInfo.headerBackground": "#5ccfe626", + "peekView.border": "#d0a13d", + "peekViewEditor.background": "#0d1017", + "peekViewEditor.matchHighlightBackground": "#6c598066", + "peekViewEditor.matchHighlightBorder": "#6c598080", + "peekViewResult.background": "#171b24", + "peekViewResult.fileForeground": "#8a9199", + "peekViewResult.lineForeground": "#707a8c", + "peekViewResult.matchHighlightBackground": "#6c598066", + "peekViewResult.selectionForeground": "#cccac2", + "peekViewTitle.background": "#1c212b", + "peekViewTitleDescription.foreground": "#707a8c", + "peekViewTitleLabel.foreground": "#cccac2", + "peekViewEditorStickyScroll.background": "#11151c", + "panel.background": "#14171f", + "panel.border": "#171b24", + "panelTitle.activeBorder": "#e6b450", + "panelTitle.activeForeground": "#cccac2", + "panelTitle.inactiveForeground": "#707a8c", + "statusBar.background": "#1f2430", + "statusBar.foreground": "#707a8c", + "statusBar.debuggingBackground": "#b98ee5", + "statusBar.debuggingForeground": "#000000", + "statusBar.noFolderBackground": "#1f2430", + "statusBarItem.activeBackground": "#707a8c33", + "statusBarItem.hoverBackground": "#707a8c33", + "statusBarItem.prominentBackground": "#171b24", + "statusBarItem.prominentForeground": "#8a9199", + "statusBarItem.prominentHoverBackground": "#00000030", + "statusBarItem.remoteBackground": "#e6b450", + "statusBarItem.remoteForeground": "#0d1017", + "statusBar.focusBorder": "#e6b45099", + "titleBar.activeBackground": "#171b24", + "titleBar.activeForeground": "#8a9199", + "titleBar.inactiveBackground": "#171b24", + "titleBar.inactiveForeground": "#707a8c", + "extensionButton.prominentForeground": "#1f2430", + "extensionButton.prominentBackground": "#ffcc66", + "extensionButton.prominentHoverBackground": "#dbaa47", + "pickerGroup.border": "#171b24", + "pickerGroup.foreground": "#707a8c80", + "terminal.background": "#11151c", + "terminal.foreground": "#bfbdb6", + "terminal.ansiBlack": "#11151c", + "terminal.ansiRed": "#ea6c73", + "terminal.ansiGreen": "#87d96c", + "terminal.ansiYellow": "#f9af4f", + "terminal.ansiBlue": "#53bdfa", + "terminal.ansiMagenta": "#cda1fa", + "terminal.ansiCyan": "#90e1c6", + "terminal.ansiWhite": "#cccac2", + "terminal.ansiBrightBlack": "#707a8c", + "terminal.ansiBrightRed": "#f07178", + "terminal.ansiBrightGreen": "#aad94c", + "terminal.ansiBrightYellow": "#ffb454", + "terminal.ansiBrightBlue": "#59c2ff", + "terminal.ansiBrightMagenta": "#d2a6ff", + "terminal.ansiBrightCyan": "#95e6cb", + "terminal.ansiBrightWhite": "#ffffff", + "debugToolBar.background": "#1c212b", + "debugIcon.breakpointForeground": "#d95757", + "debugIcon.breakpointDisabledForeground": "#d9575780", + "debugConsoleInputIcon.foreground": "#ffcc66", + "welcomePage.progress.background": "#14171f", + "welcomePage.tileBackground": "#1c212b", + "welcomePage.tileHoverBackground": "#1f2430", + "welcomePage.tileBorder": "#a2a9b12e", + "walkthrough.embeddedEditorBackground": "#1c212b", + "walkthrough.stepTitle.foreground": "#cccac2", + "gitDecoration.modifiedResourceForeground": "#80bfffcc", + "gitDecoration.deletedResourceForeground": "#f27983cc", + "gitDecoration.untrackedResourceForeground": "#87d96ccc", + "gitDecoration.ignoredResourceForeground": "#707a8c99", + "gitDecoration.submoduleResourceForeground": "#d2a6ffcc", + "settings.headerForeground": "#bfbdb6", + "settings.modifiedItemIndicator": "#80bfff", + "breadcrumb.foreground": "#707a8c", + "breadcrumb.background": "#11151c", + "breadcrumb.focusForeground": "#8a9199", + "breadcrumb.activeSelectionForeground": "#cccac2", + "breadcrumbPicker.background": "#171b24", + "editor.snippetTabstopHighlightBackground": "#87d96c33", + "keybindingLabel.background": "#707a8c1a", + "keybindingLabel.foreground": "#cccac2", + "keybindingLabel.border": "#cccac21a", + "keybindingLabel.bottomBorder": "#cccac21a" + }, + "tokenColors": [ + { + "settings": { + "background": "#0d1017", + "foreground": "#bfbdb6" + } + }, + { + "name": "Comment", + "scope": [ + "comment" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#acb6bf8c" + } + }, + { + "name": "String", + "scope": [ + "string", + "constant.other.symbol" + ], + "settings": { + "foreground": "#aad94c" + } + }, + { + "name": "Regular Expressions and Escape Characters", + "scope": [ + "string.regexp", + "constant.character", + "constant.other" + ], + "settings": { + "foreground": "#95e6cb" + } + }, + { + "name": "Number", + "scope": [ + "constant.numeric" + ], + "settings": { + "foreground": "#d2a6ff" + } + }, + { + "name": "Built-in constants", + "scope": [ + "constant.language" + ], + "settings": { + "foreground": "#d2a6ff" + } + }, + { + "name": "Variable", + "scope": [ + "variable", + "variable.parameter.function-call" + ], + "settings": { + "foreground": "#bfbdb6" + } + }, + { + "name": "Member Variable", + "scope": [ + "variable.member" + ], + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Language variable", + "scope": [ + "variable.language" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#39bae6" + } + }, + { + "name": "Storage", + "scope": [ + "storage" + ], + "settings": { + "foreground": "#ff8f40" + } + }, + { + "name": "Keyword", + "scope": [ + "keyword" + ], + "settings": { + "foreground": "#ff8f40" + } + }, + { + "name": "Operators", + "scope": [ + "keyword.operator" + ], + "settings": { + "foreground": "#f29668" + } + }, + { + "name": "Separators like ; or ,", + "scope": [ + "punctuation.separator", + "punctuation.terminator" + ], + "settings": { + "foreground": "#bfbdb6b3" + } + }, + { + "name": "Punctuation", + "scope": [ + "punctuation.section" + ], + "settings": { + "foreground": "#bfbdb6" + } + }, + { + "name": "Accessor", + "scope": [ + "punctuation.accessor" + ], + "settings": { + "foreground": "#f29668" + } + }, + { + "name": "JavaScript/TypeScript interpolation punctuation", + "scope": [ + "punctuation.definition.template-expression" + ], + "settings": { + "foreground": "#ff8f40" + } + }, + { + "name": "Ruby interpolation punctuation", + "scope": [ + "punctuation.section.embedded" + ], + "settings": { + "foreground": "#ff8f40" + } + }, + { + "name": "Interpolation text", + "scope": [ + "meta.embedded" + ], + "settings": { + "foreground": "#bfbdb6" + } + }, + { + "name": "Types fixes", + "scope": [ + "source.java storage.type", + "source.haskell storage.type", + "source.c storage.type" + ], + "settings": { + "foreground": "#59c2ff" + } + }, + { + "name": "Inherited class type", + "scope": [ + "entity.other.inherited-class" + ], + "settings": { + "foreground": "#39bae6" + } + }, + { + "name": "Lambda arrow", + "scope": [ + "storage.type.function" + ], + "settings": { + "foreground": "#ff8f40" + } + }, + { + "name": "Java primitive variable types", + "scope": [ + "source.java storage.type.primitive" + ], + "settings": { + "foreground": "#39bae6" + } + }, + { + "name": "Function name", + "scope": [ + "entity.name.function" + ], + "settings": { + "foreground": "#ffb454" + } + }, + { + "name": "Function arguments", + "scope": [ + "variable.parameter", + "meta.parameter" + ], + "settings": { + "foreground": "#d2a6ff" + } + }, + { + "name": "Function call", + "scope": [ + "variable.function", + "variable.annotation", + "meta.function-call.generic", + "support.function.go" + ], + "settings": { + "foreground": "#ffb454" + } + }, + { + "name": "Library function", + "scope": [ + "support.function", + "support.macro" + ], + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Imports and packages", + "scope": [ + "entity.name.import", + "entity.name.package" + ], + "settings": { + "foreground": "#aad94c" + } + }, + { + "name": "Entity name", + "scope": [ + "entity.name" + ], + "settings": { + "foreground": "#59c2ff" + } + }, + { + "name": "Tag", + "scope": [ + "entity.name.tag", + "meta.tag.sgml" + ], + "settings": { + "foreground": "#39bae6" + } + }, + { + "name": "JSX Component", + "scope": [ + "support.class.component" + ], + "settings": { + "foreground": "#59c2ff" + } + }, + { + "name": "Tag start/end", + "scope": [ + "punctuation.definition.tag.end", + "punctuation.definition.tag.begin", + "punctuation.definition.tag" + ], + "settings": { + "foreground": "#39bae680" + } + }, + { + "name": "Tag attribute", + "scope": [ + "entity.other.attribute-name" + ], + "settings": { + "foreground": "#ffb454" + } + }, + { + "name": "Library constant", + "scope": [ + "support.constant" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#f29668" + } + }, + { + "name": "Library class/type", + "scope": [ + "support.type", + "support.class", + "source.go storage.type" + ], + "settings": { + "foreground": "#39bae6" + } + }, + { + "name": "Decorators/annotation", + "scope": [ + "meta.decorator variable.other", + "meta.decorator punctuation.decorator", + "storage.type.annotation" + ], + "settings": { + "foreground": "#e6b673" + } + }, + { + "name": "Invalid", + "scope": [ + "invalid" + ], + "settings": { + "foreground": "#d95757" + } + }, + { + "name": "diff.header", + "scope": [ + "meta.diff", + "meta.diff.header" + ], + "settings": { + "foreground": "#c594c5" + } + }, + { + "name": "Ruby class methods", + "scope": [ + "source.ruby variable.other.readwrite" + ], + "settings": { + "foreground": "#ffb454" + } + }, + { + "name": "CSS tag names", + "scope": [ + "source.css entity.name.tag", + "source.sass entity.name.tag", + "source.scss entity.name.tag", + "source.less entity.name.tag", + "source.stylus entity.name.tag" + ], + "settings": { + "foreground": "#59c2ff" + } + }, + { + "name": "CSS browser prefix", + "scope": [ + "source.css support.type", + "source.sass support.type", + "source.scss support.type", + "source.less support.type", + "source.stylus support.type" + ], + "settings": { + "foreground": "#acb6bf8c" + } + }, + { + "name": "CSS Properties", + "scope": [ + "support.type.property-name" + ], + "settings": { + "fontStyle": "normal", + "foreground": "#39bae6" + } + }, + { + "name": "Search Results Numbers", + "scope": [ + "constant.numeric.line-number.find-in-files - match" + ], + "settings": { + "foreground": "#acb6bf8c" + } + }, + { + "name": "Search Results Match Numbers", + "scope": [ + "constant.numeric.line-number.match" + ], + "settings": { + "foreground": "#ff8f40" + } + }, + { + "name": "Search Results Lines", + "scope": [ + "entity.name.filename.find-in-files" + ], + "settings": { + "foreground": "#aad94c" + } + }, + { + "scope": [ + "message.error" + ], + "settings": { + "foreground": "#d95757" + } + }, + { + "name": "Markup heading", + "scope": [ + "markup.heading", + "markup.heading entity.name" + ], + "settings": { + "fontStyle": "bold", + "foreground": "#aad94c" + } + }, + { + "name": "Markup links", + "scope": [ + "markup.underline.link", + "string.other.link" + ], + "settings": { + "foreground": "#39bae6" + } + }, + { + "name": "Markup Italic", + "scope": [ + "markup.italic" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#f07178" + } + }, + { + "name": "Markup Bold", + "scope": [ + "markup.bold" + ], + "settings": { + "fontStyle": "bold", + "foreground": "#f07178" + } + }, + { + "name": "Markup Bold/italic", + "scope": [ + "markup.italic markup.bold", + "markup.bold markup.italic" + ], + "settings": { + "fontStyle": "bold italic" + } + }, + { + "name": "Markup Code", + "scope": [ + "markup.raw" + ], + "settings": { + "background": "#bfbdb605" + } + }, + { + "name": "Markup Code Inline", + "scope": [ + "markup.raw.inline" + ], + "settings": { + "background": "#bfbdb60f" + } + }, + { + "name": "Markdown Separator", + "scope": [ + "meta.separator" + ], + "settings": { + "fontStyle": "bold", + "background": "#bfbdb60f", + "foreground": "#acb6bf8c" + } + }, + { + "name": "Markup Blockquote", + "scope": [ + "markup.quote" + ], + "settings": { + "foreground": "#95e6cb", + "fontStyle": "italic" + } + }, + { + "name": "Markup List Bullet", + "scope": [ + "markup.list punctuation.definition.list.begin" + ], + "settings": { + "foreground": "#ffb454" + } + }, + { + "name": "Markup added", + "scope": [ + "markup.inserted" + ], + "settings": { + "foreground": "#87d96c" + } + }, + { + "name": "Markup modified", + "scope": [ + "markup.changed" + ], + "settings": { + "foreground": "#80bfff" + } + }, + { + "name": "Markup removed", + "scope": [ + "markup.deleted" + ], + "settings": { + "foreground": "#f27983" + } + }, + { + "name": "Markup Strike", + "scope": [ + "markup.strike" + ], + "settings": { + "foreground": "#e6b673" + } + }, + { + "name": "Markup Table", + "scope": [ + "markup.table" + ], + "settings": { + "background": "#bfbdb60f", + "foreground": "#39bae6" + } + }, + { + "name": "Markup Raw Inline", + "scope": [ + "text.html.markdown markup.inline.raw" + ], + "settings": { + "foreground": "#f29668" + } + }, + { + "name": "Markdown - Line Break", + "scope": [ + "text.html.markdown meta.dummy.line-break" + ], + "settings": { + "background": "#acb6bf8c", + "foreground": "#acb6bf8c" + } + }, + { + "name": "Markdown - Raw Block Fenced", + "scope": [ + "punctuation.definition.markdown" + ], + "settings": { + "background": "#bfbdb6", + "foreground": "#acb6bf8c" + } + } + ], + "semanticHighlighting": true, + "semanticTokenColors": { + "parameter.label": "#bfbdb6" + } +} \ No newline at end of file diff --git a/configs/vscode/files/.vscode/extensions/qyurila.ayu-midas-1.1.0/package.json b/configs/vscode/files/.vscode/extensions/qyurila.ayu-midas-1.1.0/package.json new file mode 100644 index 0000000..41ed901 --- /dev/null +++ b/configs/vscode/files/.vscode/extensions/qyurila.ayu-midas-1.1.0/package.json @@ -0,0 +1,27 @@ +{ + "name": "ayu-midas", + "publisher": "qyurila", + "displayName": "ayu MiDas", + "description": "ayu Dark + ayu Mirage + extra tweaks", + "version": "1.1.0", + "engines": { + "vscode": "^1.63.0" + }, + "categories": [ + "Themes" + ], + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/QyuriLa/vscode-ayu-midas" + }, + "contributes": { + "themes": [ + { + "label": "ayu MiDas", + "uiTheme": "vs-dark", + "path": "./ayu-midas.json" + } + ] + } +} diff --git a/configs/vscode/json/.config/Code/User/settings.json b/configs/vscode/json/.config/Code/User/settings.json new file mode 100644 index 0000000..3b98a72 --- /dev/null +++ b/configs/vscode/json/.config/Code/User/settings.json @@ -0,0 +1,11 @@ +{ + "workbench.colorTheme": "ayu MiDas", + "claudeCode.preferredLocation": "panel", + "redhat.telemetry.enabled": true, + "claudeCode.selectedModel": "default", + "explorer.confirmDelete": false, + "python.languageServer": "Default", + "git.autofetch": true, + "explorer.confirmDragAndDrop": false, + "docker.extension.dockerEngineAvailabilityPrompt": false +} diff --git a/docs/app-configs.md b/docs/app-configs.md index 530b693..4df0d53 100644 --- a/docs/app-configs.md +++ b/docs/app-configs.md @@ -43,7 +43,24 @@ packages again, including requirements of apps whose installation was skipped. Fish, Kitty, Neovim and Fastfetch have no Plasma or KWin requirements. Fonts have their own checkbox; Kitty can use its fallback font if those are omitted. -The original Neovim config uses a built-in fallback when Catppuccin is absent. +Neovim's config includes a pinned Catppuccin runtime in its native package +directory and loads it before the captured purple highlights. It needs no +plugin manager or runtime download. A built-in fallback remains available if +the theme files are omitted manually. + +VS Code's optional config includes ayu MiDas 1.1.0 as a user colour-theme +extension. Its original theme JSON is bundled with a minimal theme manifest; +it has no JavaScript entry point or development dependencies. This uses the +native VS Code default user and extension locations. Custom extension +directories, named VS Code profiles and other Code variants need their own +locations. Existing theme files use the normal conflict/backup/update flow. + +Both editors' theme versions and asset fingerprints are recorded in +`assets/editor-themes.json`; [asset credits](assets.md) retain upstream licences. +VS Code preferences merge selected keys and keep existing unrelated settings, +including Java runtime choices. JSON comments and trailing commas are accepted +when reading existing settings; an accepted merge writes ordinary formatted +JSON. Backups retain the original file, including its comments. ## r2modman diff --git a/docs/assets.md b/docs/assets.md index 5ae2de8..283d293 100644 --- a/docs/assets.md +++ b/docs/assets.md @@ -20,6 +20,17 @@ The captured styling uses a small subset of the original installed assets: refact0r/midnight-discord at commit 85dd67148cbbbfa027cb091e41a479a16ab16a65. Its MIT licence is included alongside the theme. Public image/font URLs within that upstream theme remain upstream references. +- Neovim includes the runtime files from + [Catppuccin](https://github.com/catppuccin/nvim) at commit + `edefef779ab08ce1a4a404713e3012b0d202bd35`, matching the installed theme + captured from this device. Its original MIT licence is retained as + `LICENSE.md`; development files, docs, tests and Git history are omitted. +- VS Code includes the original `ayu-midas.json` and MIT `LICENSE` from + [ayu MiDas](https://github.com/qyurila/ayu-midas-vscode/tree/8ce96d6002e7327be1aaf41a01f6106041517c8e), + version 1.1.0, with a manifest containing only the extension's runtime + metadata and theme contribution. No build dependencies or executable + extension entry points are included. Editor asset hashes and pins are in + `assets/editor-themes.json`. The privacy scanner permits email attribution only in fingerprinted original theme metadata and colour-scheme notices. It still scans those files for diff --git a/docs/capture.md b/docs/capture.md new file mode 100644 index 0000000..0b249da --- /dev/null +++ b/docs/capture.md @@ -0,0 +1,47 @@ +# Refresh selected preferences + +Run capture from the repository to update its saved preferences from your +current home. Select only the part you changed: + +```sh +python3 tools/capture.py --list +python3 tools/capture.py --config kde-shortcuts +python3 tools/capture.py --config kde-style +python3 tools/capture.py --config fish kitty neovim +python3 tools/capture.py --config ark gwenview prism +``` + +Each selection reads only its own source files and updates only its config +folder. Missing source files leave the existing capture intact. Shortcuts and +styling remain separate, including their patches for shared KDE files. +`--apps-only` remains a shortcut for Ark, Gwenview and Prism. Running without +a selection refreshes the whole supported preference allowlist. + +Fastfetch retains its layout with the built-in Gentoo logo. Kitty keeps +automatic display selection. Neovim capture retains loading of the bundled +theme. VS Code captures explicit preference keys, excluding machine-specific +Java runtimes and unrelated settings. VS Code and Fastfetch sources may use +JSON comments and trailing commas; the saved captures use ordinary JSON. +KDE's device IDs and personal paths are filtered as before. + +Fonts and editor theme snapshots are maintained as pinned assets, rather than +recaptured from local plugin directories. Their licences and fingerprints +are documented in [asset credits](assets.md). A preferences-only capture +does not require rebuilding the TUI. + +Capture changes the repository files. It does not apply anything to your +desktop. Review before committing: + +```sh +git diff -- configs +python3 tools/check-private.py +``` + +After changing shortcuts, also regenerate their readable reference: + +```sh +python3 tools/shortcuts.py +``` + +Use `--home PATH` to capture from another explicit home directory. Accounts, +sessions and complete application profiles are outside the capture scope. diff --git a/docs/devices.md b/docs/devices.md new file mode 100644 index 0000000..3006689 --- /dev/null +++ b/docs/devices.md @@ -0,0 +1,33 @@ +# Named device selections + +Choose Stock or Fiw's Ryzen, then adjust packages, app configs, kernel, +bootloader, extras, Flatpaks and services. At the final preview, press **n** +and enter a name such as `desktop` or `portable`. Enter saves the selection. +An existing name asks before replacement, with keeping it as the default. +Saving a preset does not install packages or apply configs. + +Launch the TUI again and press Esc to reach the preset screen. Your named +devices appear alongside the two shipped presets. Choosing a saved device +loads its own choices; its underlying Stock/Ryzen build profile is retained. +The most recent selection is still reused on normal startup. + +CLI equivalents: + +```sh +./install --selection local/selection.json --save-device desktop +./install --profile stock --save-device portable +./install --list-devices +./install --device desktop --plan +./install --device portable --apply-configs +``` + +Names use 1–48 lowercase letters, digits, hyphens or underscores, beginning +with a letter or digit. Each selection is stored in `local/devices/NAME.json` +with user-only permissions. The folder is ignored by Git. No hostname, +hardware identifiers or filesystem UUIDs are collected. Invalid local files +are omitted from the chooser; explicit CLI loading reports their error. + +To reuse a selection on another device, copy the wanted JSON file into that +checkout's `local/devices` folder. Use Stock for portable build settings; +Fiw's Ryzen keeps the existing machine-specific CPU/kernel tuning described +in the main README. Review kernel, NVIDIA and boot choices for each device. diff --git a/docs/kde-style.md b/docs/kde-style.md index 7ffd4af..8574082 100644 --- a/docs/kde-style.md +++ b/docs/kde-style.md @@ -78,8 +78,8 @@ Fish, Kitty, Neovim and Fastfetch stay separate from KDE settings: - **Kitty:** lavender palette, padding, 50% opacity in the main profile and 62% in the brighter profile. Display selection is automatic for Wayland/X11; blur is used where the compositor supports it. -- **Neovim:** transparent backgrounds and purple highlights; uses an existing - Catppuccin Mocha plugin when available, otherwise the built-in dark theme. +- **Neovim:** transparent backgrounds and purple highlights over the bundled, + pinned Catppuccin Mocha theme, with a built-in fallback if omitted manually. - **Fastfetch:** the current tree layout and colours, with its built-in Gentoo logo. ## Applying the capture diff --git a/docs/releases.md b/docs/releases.md index f9fdede..b20c7fe 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -1,5 +1,26 @@ # Release snapshots +## v0.1.2 — Editor themes and device selections + +Neovim's optional config now includes the pinned Catppuccin runtime, and +VS Code includes the ayu MiDas 1.1.0 colour-theme extension. Both retain +upstream licences and work without fetching their themes during installation. +Neovim keeps the captured transparent purple highlights and its fallback. + +The final TUI preview adds **n** to save a named device selection. Saved +devices appear on the preset screen, retaining their build profile and +package/config choices. Files stay under ignored `local/devices`. +CLI `--device`, `--save-device` and `--list-devices` support the same workflow. +Selective capture now accepts `--config` for one or several presets, with +`--list` showing supported selections. VS Code capture uses explicit +preference keys and omits machine-specific Java runtimes. + +The matching prebuilt TUI is included in the +[tag](https://git.fiwlabs.dev/fiwdev/Fiw-Gentoo-Dots/src/tag/v0.1.2) and +[source archive](https://git.fiwlabs.dev/fiwdev/Fiw-Gentoo-Dots/archive/v0.1.2.tar.gz). +See [device presets](devices.md), [recapture](capture.md) and +[app config scope](app-configs.md). + ## v0.1.1 — Config update review Adds **e** for config updates and **p** for pending changes in the final TUI diff --git a/docs/scripts.md b/docs/scripts.md index c1f994e..28c3294 100644 --- a/docs/scripts.md +++ b/docs/scripts.md @@ -5,13 +5,14 @@ | `install` | Opens the verified prebuilt chooser with a Go source fallback, or forwards CLI options to the Python backend | Main entry point | | `lib/launcher.py` | Verifies frontend/binary fingerprints and extracts/caches the bundled TUI | Called by the entry point | | `lib/rice.py` | Validates selections, previews plans, restores configs and installs Portage packages | Called by the entry point/TUI | +| `lib/device_presets.py` | Saves and lists named local device selections with overwrite prompts | TUI named preset action or backend commands | | `lib/setup.py` | Stages missing overlays, installs selected user Flatpaks and enables selected service units | Called by the backend | | `lib/boot.py` | Detects the target ESP/root, previews/deploys Limine or GRUB, refreshes kernel menus | Boot action; copied as `fiw-dots-boot` on deployment | | `lib/backups.py` | Lists and previews user config backups, restores selected files and backs up their current versions | TUI backup action or backend commands | | `lib/proposals.py` | Lists pending config changes, previews diffs and accepts individual proposals after checking for newer edits | TUI pending updates action or backend commands | | `lib/reporting.py` | Correlates root/user steps, failures, skips and manual setup into one local summary | Runs after TUI apply actions; `--summary` for CLI use | | `fiw-shot` | Captures a region or monitor using Spectacle, copies it to the clipboard and offers Save/Edit through a notification | Installed with KDE shortcuts; `region` or `screen` argument | -| `tools/capture.py` | Recaptures the explicit preference allowlist without copying full personal profiles | Maintenance command; review the diff | +| `tools/capture.py` | Recaptures selected configs or the explicit preference allowlist without copying full personal profiles | `--config` selects individual configs; review the diff | | `tools/shortcuts.py` | Regenerates the readable shortcut reference from captured repo files | Run after changing/capturing shortcuts | | `tools/check-private.py` | Scans publishable files for personal paths, identifiers and credentials; keeps fingerprinted upstream attribution | Run before committing | | `tools/audit-packages.py` | Compares explicit world/selected sets with main/optional package lists and documented helper exceptions | Read-only package audit | diff --git a/docs/setup.md b/docs/setup.md index 1b9618e..902263e 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -17,14 +17,21 @@ At the final preview: | Key | Action | |---|---| | Enter / s | Save the selection without applying it | +| n | Save a named local device preset | | r | Full restore: packages, Flatpaks, services, configs, selected bootloader | | i | Install Portage packages | | f | Install selected user Flatpaks | | v | Enable selected services | | a | Restore selected user configs | +| e | Update selected configs, preserving local edits | +| p | Browse pending config proposals and preview their diffs | | b | Preview and deploy the selected bootloader | | u | Browse, preview and restore a user config backup | +Named [device selections](devices.md) appear on the preset screen alongside +Stock and Fiw's Ryzen. They retain each device's package/config choices and +build profile. Select a device explicitly on the CLI with `--device NAME`. + Full restore checks the KDE session before making package changes. Log out of Plasma and run from a TTY when KDE configs are selected. Each operation also has a command for resuming a saved selection: diff --git a/lib/device_presets.py b/lib/device_presets.py new file mode 100644 index 0000000..937636c --- /dev/null +++ b/lib/device_presets.py @@ -0,0 +1,49 @@ +"""Named local selections for individual devices; no hardware identifiers.""" +import json +import re +import tempfile +from pathlib import Path + + +def path(repo, name): + if not re.fullmatch(r'[a-z0-9][a-z0-9_-]{0,47}', name): + raise ValueError('Use 1–48 lowercase letters, digits, underscores or hyphens for a device preset name.') + root = repo / 'local/devices' + if not root.resolve().is_relative_to(repo.resolve()): + raise RuntimeError('Device preset directory points outside the checkout.') + target = root / (name + '.json') + if target.is_symlink(): + raise RuntimeError('Device preset is a symlink; preserving it.') + return target + + +def list_presets(repo, load): + root = repo / 'local/devices' + result = {} + for candidate in sorted(root.glob('*.json')): + try: + checked = path(repo, candidate.stem) + result[candidate.stem] = load(checked) + except (ValueError, OSError, RuntimeError): + # A malformed local file cannot block the normal installer. + continue + return result + + +def save(repo, name, selection, ask): + destination = path(repo, name) + if destination.exists() and ask('Replace saved device preset ' + name + '?', ['save', 'keep'], 'keep') != 'save': + print('Kept device preset: ' + name) + return + destination.parent.mkdir(parents=True, exist_ok=True) + # Use a new inode and refuse links; saved selections stay user-readable only. + with tempfile.NamedTemporaryFile(mode='w', dir=destination.parent, prefix='.device-', delete=False) as stream: + temporary = Path(stream.name) + json.dump(dict(selection, name=name), stream, indent=2) + stream.write('\n') + try: + temporary.chmod(0o600) + temporary.replace(destination) + finally: + temporary.unlink(missing_ok=True) + print('Saved device preset: ' + name) diff --git a/lib/rice.py b/lib/rice.py index 69fadf9..2ab3c6b 100644 --- a/lib/rice.py +++ b/lib/rice.py @@ -15,10 +15,11 @@ from pathlib import Path REPO = Path(__file__).resolve().parents[1] sys.path.insert(0, str(REPO / 'tools')) sys.path.insert(0, str(REPO / 'lib')) -from capture import sections +from capture import sections, read_jsonc import backups import reporting import proposals +import device_presets from setup import (FLATPAKS, SERVICES, required_repositories, existing_repository, repository_config, stage_repositories, publish_repositories, install_flatpaks, enable_services) @@ -34,6 +35,10 @@ AUTOSTART_GROUPS = {'steam': 'gaming', 'spotify': 'fiw-apps', 'vesktop': 'fiw-ap def load_selection(path=None, profile='stock'): selection = json.loads((Path(path) if path else REPO / 'presets' / (profile + '.json')).read_text()) + if not isinstance(selection, dict): + raise ValueError('Selection must be a JSON object.') + if not isinstance(selection.get('name'), str) or not selection['name'].strip(): + raise ValueError('Selection needs a name.') if selection.get('profile') not in ('stock', 'fiw-ryzen'): raise ValueError('Unknown preset') for field in ('flatpaks', 'services'): @@ -41,7 +46,7 @@ def load_selection(path=None, profile='stock'): selection[field] = [] for field, allowed in [('groups', GROUPS), ('configs', CATALOG), ('extras', EXTRAS), ('flatpaks', FLATPAKS), ('services', SERVICES)]: - if not isinstance(selection.get(field, []), list): + if not isinstance(selection.get(field), list): raise ValueError('Selection must be a list: ' + field) if any(not isinstance(x, str) or x not in allowed for x in selection.get(field, [])): raise ValueError('Unknown selection in ' + field) @@ -165,7 +170,7 @@ def merge_kconfig(old, patch): def merge_json(old, patch): - existing = json.loads(old) if old.strip() else {} + existing = read_jsonc(old) if old.strip() else {} def merge(a, b): for key, value in b.items(): if isinstance(value, dict) and isinstance(a.get(key), dict): @@ -593,6 +598,9 @@ def main(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument('--version', action='version', version='Fiw-Gentoo-Dots ' + (REPO / 'VERSION').read_text().strip()) parser.add_argument('--selection') + parser.add_argument('--device', metavar='NAME', help='Load a named selection from ignored local/devices') + parser.add_argument('--save-device', metavar='NAME', help='Save the current selection as a named device preset') + parser.add_argument('--list-devices', action='store_true') parser.add_argument('--profile', choices=['stock', 'fiw-ryzen'], default='stock') parser.add_argument('--home', type=Path, default=Path.home()) parser.add_argument('--plan', action='store_true') @@ -623,9 +631,18 @@ def main(): if args.catalog: print(json.dumps({'groups': GROUPS, 'configs': CATALOG, 'extras': EXTRAS, 'flatpaks': FLATPAKS, 'services': SERVICES, - 'stock': load_selection(profile='stock'), 'ryzen': load_selection(profile='fiw-ryzen')})) + 'stock': load_selection(profile='stock'), 'ryzen': load_selection(profile='fiw-ryzen'), + 'devices': device_presets.list_presets(REPO, load_selection)})) + return + if args.selection is not None and args.device is not None: + raise ValueError('Choose either --selection or --device.') + selection = load_selection(device_presets.path(REPO, args.device) if args.device is not None else args.selection, args.profile) + if args.list_devices: + print(json.dumps(sorted(device_presets.list_presets(REPO, load_selection)))) + return + if args.save_device is not None: + device_presets.save(REPO, args.save_device, selection, ask) return - selection = load_selection(args.selection, args.profile) if args.run_id: reporting.validate_run(args.run_id) home = args.home.resolve() diff --git a/tests/test_devices_capture.py b/tests/test_devices_capture.py new file mode 100644 index 0000000..8357fdc --- /dev/null +++ b/tests/test_devices_capture.py @@ -0,0 +1,119 @@ +import importlib.util +import json +import tempfile +import unittest +from pathlib import Path +from unittest.mock import patch + +REPO = Path(__file__).resolve().parents[1] +spec = importlib.util.spec_from_file_location('rice', REPO / 'lib/rice.py') +rice = importlib.util.module_from_spec(spec) +spec.loader.exec_module(rice) +import capture + + +class DevicesAndCaptureTests(unittest.TestCase): + def test_named_devices_preserve_independent_choices_and_ask_on_overwrite(self): + with tempfile.TemporaryDirectory() as temp: + repo = Path(temp) + desktop = rice.load_selection(profile='fiw-ryzen') + portable = rice.load_selection() + portable.update(groups=['cli'], configs=['fish', 'neovim'], extras=[]) + rice.device_presets.save(repo, 'desktop', desktop, lambda *args: 'keep') + rice.device_presets.save(repo, 'portable', portable, lambda *args: 'keep') + original = rice.device_presets.path(repo, 'desktop').read_bytes() + rice.device_presets.save(repo, 'desktop', portable, lambda *args: 'keep') + self.assertEqual(rice.device_presets.path(repo, 'desktop').read_bytes(), original) + devices = rice.device_presets.list_presets(repo, rice.load_selection) + self.assertEqual(devices['desktop']['profile'], 'fiw-ryzen') + self.assertEqual(devices['portable']['configs'], ['fish', 'neovim']) + self.assertEqual(devices['portable']['name'], 'portable') + self.assertEqual(rice.device_presets.path(repo, 'portable').stat().st_mode & 0o777, 0o600) + rice.device_presets.save(repo, 'desktop', portable, lambda *args: 'save') + self.assertEqual(rice.device_presets.list_presets(repo, rice.load_selection)['desktop']['profile'], 'stock') + + def test_unsafe_names_and_invalid_local_selections_do_not_enter_catalog(self): + with tempfile.TemporaryDirectory() as temp: + repo = Path(temp) + root = repo / 'local/devices'; root.mkdir(parents=True) + for content in ('[]', '{"profile":"stock"}', '{broken'): + (root / 'broken.json').write_text(content) + self.assertEqual(rice.device_presets.list_presets(repo, rice.load_selection), {}) + for name in ('../escape', '/escape', '-name', 'Desktop', 'a'*49): + with self.assertRaises(ValueError): + rice.device_presets.save(repo, name, rice.load_selection(), lambda *args: 'save') + (root / 'linked.json').symlink_to(repo / 'outside.json') + with self.assertRaises(RuntimeError): + rice.device_presets.save(repo, 'linked', rice.load_selection(), lambda *args: 'save') + self.assertFalse((repo / 'outside.json').exists()) + + def test_selective_portable_capture_needs_no_other_app_or_kde_files(self): + with tempfile.TemporaryDirectory() as temp: + root = Path(temp); home, repo = root / 'home', root / 'repo' + source = home / '.config/kitty/kitty.conf'; source.parent.mkdir(parents=True) + source.write_text('foreground #abcdef\nlinux_display_server wayland\n') + unrelated = repo / 'configs/fish/files/.config/fish/conf.d/fiw.fish' + unrelated.parent.mkdir(parents=True); unrelated.write_text('keep existing capture\n') + with patch.object(capture, 'HOME', home), patch.object(capture, 'REPO', repo): + capture.capture(['kitty']) + target = repo / 'configs/kitty/files/.config/kitty/kitty.conf' + self.assertIn('linux_display_server auto', target.read_text()) + self.assertEqual(unrelated.read_text(), 'keep existing capture\n') + self.assertEqual({path.relative_to(repo).parts[1] for path in repo.rglob('*') if path.is_file()}, {'kitty','fish'}) + + def test_shortcuts_capture_keeps_style_and_drops_device_ids(self): + with tempfile.TemporaryDirectory() as temp: + root = Path(temp); home, repo = root / 'home', root / 'repo' + source = home / '.config/kwinrc'; source.parent.mkdir(parents=True) + source.write_text('[Desktops]\nNumber=1\nRows=1\nId_1=device-only\n[org.kde.kdecoration2]\ntheme=local\n') + style = repo / 'configs/kde-style/kconfig/.config/kwinrc' + style.parent.mkdir(parents=True); style.write_text('captured style stays intact\n') + with patch.object(capture, 'HOME', home), patch.object(capture, 'REPO', repo): + capture.capture(['kde-shortcuts']) + result = (repo / 'configs/kde-shortcuts/kconfig/.config/kwinrc').read_text() + self.assertIn('Number=1',result) + self.assertNotIn('device-only',result) + self.assertNotIn('theme=local',result) + self.assertEqual(style.read_text(), 'captured style stays intact\n') + + def test_vscode_capture_reads_jsonc_and_omits_machine_settings(self): + with tempfile.TemporaryDirectory() as temp: + root = Path(temp); home, repo = root / 'home', root / 'repo' + source = home / '.config/Code/User/settings.json'; source.parent.mkdir(parents=True) + source.write_text('{ // comment\n"workbench.colorTheme":"ayu MiDas", /* comment */\n"claudeCode.selectedModel":"literal//comma,}",\n"java.configuration.runtimes":[{"path":"device-only"}], "unrelatedSecret":"keep-local",}') + with patch.object(capture, 'HOME', home), patch.object(capture, 'REPO', repo): + capture.capture(['vscode']) + result = json.loads((repo / 'configs/vscode/json/.config/Code/User/settings.json').read_text()) + self.assertEqual(result, {'workbench.colorTheme':'ayu MiDas','claudeCode.selectedModel':'literal//comma,}'}) + + def test_restore_then_recapture_keeps_helpers_portable_and_does_not_nest_guards(self): + with tempfile.TemporaryDirectory() as temp: + root = Path(temp); home, repo = root / 'home', root / 'repo' + home.mkdir() + selection = rice.load_selection() + selection.update(groups=[], configs=['fish', 'kde-shortcuts']) + rice.apply_configs(selection, home, conflict='apply') + with patch.object(capture, 'HOME', home), patch.object(capture, 'REPO', repo): + capture.capture(['fish', 'kde-shortcuts']) + fish = (repo / 'configs/fish/files/.config/fish/conf.d/fiw.fish').read_text() + self.assertEqual(fish.count('if type -q fiw-update'), 1) + desktop = (repo / 'configs/kde-shortcuts/files/.local/share/applications/net.local.fiw-shot-region.desktop').read_text() + self.assertIn('Exec="{{HOME}}/.local/bin/fiw-shot" region', desktop) + self.assertNotIn(str(home), desktop) + + def test_vscode_restore_merges_jsonc_and_keeps_local_runtime_preferences(self): + with tempfile.TemporaryDirectory() as temp: + home = Path(temp) + target = home / '.config/Code/User/settings.json' + target.parent.mkdir(parents=True) + target.write_text('{ // local preference comment\n"privatePreference":"local-only",\n"java.configuration.runtimes":[{"path":"device-only"}],}') + selection = rice.load_selection(); selection.update(groups=[], configs=['vscode']) + rice.apply_configs(selection, home, conflict='apply') + result = json.loads(target.read_text()) + self.assertEqual(result['privatePreference'], 'local-only') + self.assertEqual(result['java.configuration.runtimes'], [{'path':'device-only'}]) + self.assertEqual(result['workbench.colorTheme'], 'ayu MiDas') + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/capture.py b/tools/capture.py index d6ee6f9..b9e7bc5 100644 --- a/tools/capture.py +++ b/tools/capture.py @@ -22,6 +22,16 @@ APP_KEYS = { 'MenuBarInsteadOfToolBar', 'StatusBarVisible', 'ToolbarsLocked']})} +def read_jsonc(text): + # Keep quoted strings intact while removing comments and trailing commas. + text = re.sub(r'"(?:[^"\\]|\\.)*"|//[^\r\n]*|/\*[\s\S]*?\*/', + lambda match: match[0] if match[0].startswith('"') else + re.sub(r'[^\r\n]', ' ', match[0]), text) + text = re.sub(r'"(?:[^"\\]|\\.)*"|,(?=\s*[}\]])', + lambda match: match[0] if match[0].startswith('"') else '', text) + return json.loads(text) + + def sections(text): result, group = {}, None for line in text.splitlines(): @@ -91,21 +101,27 @@ def copy_assets(source, destination): shutil.copy2(src, dest) -def capture_apps(): +CAPTURE_IDS = tuple(sorted(set(APP_KEYS) | { + 'kde-style', 'kde-shortcuts', 'dolphin', 'spectacle', 'fish', 'kitty', + 'neovim', 'fastfetch', 'mangohud', 'vscode', 'vesktop', 'autostart'})) + + +def capture_apps(selected=None): for name, (relative, keys) in APP_KEYS.items(): - kconfig(name, relative, keys=keys) + if selected is None or name in selected: + kconfig(name, relative, keys=keys) -def capture(): - capture_apps() - kconfig("kde-style", ".config/kdeglobals", - groups=[g for g in sections((HOME / '.config/kdeglobals').read_text()) - if g.startswith(('[Colors:', '[ColorEffects:'))] - + ['[General]', '[Icons]', '[KDE]', '[WM]']) - p = REPO / 'configs/kde-style/kconfig/.config/kdeglobals' - p.write_text('\n'.join(line for line in p.read_text().splitlines() - if not line.startswith(('ColorSchemeHash=', 'LastUsedCustomAccentColor=', - 'TerminalApplication=', 'TerminalService='))) + '\n') +def capture_style(): + if (HOME / ".config/kdeglobals").is_file(): + kconfig("kde-style", ".config/kdeglobals", + groups=[g for g in sections((HOME / '.config/kdeglobals').read_text()) + if g.startswith(('[Colors:', '[ColorEffects:'))] + + ['[General]', '[Icons]', '[KDE]', '[WM]']) + p = REPO / 'configs/kde-style/kconfig/.config/kdeglobals' + p.write_text('\n'.join(line for line in p.read_text().splitlines() + if not line.startswith(('ColorSchemeHash=', 'LastUsedCustomAccentColor=', + 'TerminalApplication=', 'TerminalService='))) + '\n') gtk_keys = ['gtk-theme-name', 'gtk-icon-theme-name', 'gtk-font-name', 'gtk-cursor-theme-name', 'gtk-cursor-theme-size', 'gtk-application-prefer-dark-theme'] @@ -115,77 +131,12 @@ def capture(): relative = f'.config/gtk-{version}/settings.ini' kconfig('kde-style', relative, keys={'[Settings]': gtk_keys}) dest = REPO / 'configs/kde-style/kconfig' / relative - if dest.is_file(): + if dest.is_file() and (HOME / relative).is_file(): dest.write_text(dest.read_text().replace('gtk-cursor-theme-name=Qogir', 'gtk-cursor-theme-name=Fiw-Qogir')) kconfig('kde-style', '.config/kcminputrc', keys={'[Mouse]': ['cursorTheme']}) kconfig('kde-style', '.config/kwinrc', groups=['[org.kde.kdecoration2]']) - kconfig('dolphin', '.config/dolphinrc', groups=['[KFileDialog Settings]', '[MainWindow]']) - kconfig('dolphin', '.local/state/dolphinstaterc', keys={'[FilterBar]': ['caseSensitive', 'filterMode'], '[State]': ['State']}) - kconfig('dolphin', '.config/kwinrulesrc', groups=['[fiw-dolphin-opacity]']) - write('configs/dolphin/kconfig/.config/kwinrulesrc', - '[General]\nrules=fiw-dolphin-opacity\ncount=1\n\n' + - (REPO / 'configs/dolphin/kconfig/.config/kwinrulesrc').read_text()) - copy('dolphin', '.local/share/kxmlgui5/dolphin/dolphinui.rc') copy('kde-style', '.local/share/color-schemes/GentooPurple.colors') - kconfig('kde-shortcuts', '.config/kglobalshortcutsrc') - kconfig('kde-shortcuts', '.config/kxkbrc', groups=['[Layout]']) - kconfig('kde-shortcuts', '.config/kwinrc', keys={'[Desktops]': ['Number', 'Rows']}) - for name in ['net.local.kitty.desktop', 'net.local.fiw-shot-region.desktop', 'net.local.fiw-shot-screen.desktop']: - copy('kde-shortcuts', '.local/share/applications/' + name, - lambda t: t.replace('Exec=' + str(HOME) + '/.local/bin/fiw-shot', 'Exec="{{HOME}}/.local/bin/fiw-shot"')) - copy('kde-shortcuts', '.local/bin/fiw-shot') - kconfig('spectacle', '.config/spectaclerc', groups=['[General]', '[Annotations]']) - copy('fish', '.config/fish/conf.d/fiw.fish', - lambda t: t.replace("alias update='sudo fiw-update'", - "if type -q fiw-update\n alias update='sudo fiw-update'\nend")) - copy('fish', '.config/fish/conf.d/done.fish') - for name in ['kitty.conf', 'kitty-main.conf', 'kitty-bright.conf', 'kitty-common.conf']: - copy('kitty', '.config/kitty/' + name, - lambda t: re.sub(r'(?m)^linux_display_server\s+wayland\s*$', - 'linux_display_server auto', t)) - copy('neovim', '.config/nvim/init.lua') - # Keep the layout; the built-in Gentoo logo also works outside Kitty. - data = json.loads((HOME / '.config/fastfetch/config.jsonc').read_text()) - data['logo'] = {'source': 'gentoo', 'type': 'builtin', - 'padding': data.get('logo', {}).get('padding', {})} - for module in data.get('modules', []): - if isinstance(module, dict): - if isinstance(module.get('format'), str): - module['format'] = module['format'].replace('\\u001b', '\x1b') - if module.get('type') == 'os': - module['key'] = module.get('key', '').replace('', '') - write('configs/fastfetch/files/.config/fastfetch/config.jsonc', json.dumps(data, indent=2) + '\n') - for name in ['MangoHud.conf', 'presets.conf']: - copy('mangohud', '.config/MangoHud/' + name) - copy('vscode', '.config/Code/User/settings.json') - # Explicit preference fields: cloud credentials, sessions and caches excluded. - data = json.loads((HOME / '.config/vesktop/settings.json').read_text()) - allowed = ['discordBranch', 'minimizeToTray', 'arRPC', 'splashColor', 'splashBackground', - 'autoStartMinimized', 'customTitleBar', 'splashPixelated'] - data = {k: data[k] for k in allowed if k in data} - if isinstance(data.get('splashBackground'), str) and '/home/' in data['splashBackground']: - data.pop('splashBackground') - write('configs/vesktop/json/.config/vesktop/settings.json', json.dumps(data, indent=2) + '\n') - data = json.loads((HOME / '.config/vesktop/settings/settings.json').read_text()) - allowed = ['autoUpdate', 'autoUpdateNotification', 'useQuickCss', 'eagerPatches', - 'frameless', 'transparent', 'winCtrlQ', 'disableMinSize', 'winNativeTitleBar'] - prefs = {k: data[k] for k in allowed if k in data} - theme_root = REPO / 'configs/vesktop/files/.config/vesktop/themes' - prefs['enabledThemes'] = [name for name in data.get('enabledThemes', []) - if Path(name).name == name and (theme_root / name).is_file()] - prefs['plugins'] = {name: {'enabled': plugin['enabled']} - for name, plugin in data.get('plugins', {}).items() - if isinstance(plugin, dict) and isinstance(plugin.get('enabled'), bool)} - write('configs/vesktop/json/.config/vesktop/settings/settings.json', - json.dumps(prefs, indent=2) + '\n') - for name in ['steam', 'spotify', 'vesktop', 'opendeck', 'musicpresence']: - copy('autostart', '.config/autostart/' + name + '.desktop') - kconfig('autostart', '.config/kwinrulesrc', groups=[ - '[fiw-autostart-minimized-discord]', '[fiw-autostart-minimized-opendeck]', - '[fiw-autostart-minimized-spotify]']) - p = REPO / 'configs/autostart/kconfig/.config/kwinrulesrc' - p.write_text('[General]\nrules=fiw-autostart-minimized-discord,fiw-autostart-minimized-opendeck,fiw-autostart-minimized-spotify\ncount=3\n\n' + p.read_text()) # These small upstream assets retain their original licence notices. theme = HOME / '.local/share/aurorae/themes/Utterly-Round-Dark' if theme.is_dir(): @@ -197,15 +148,154 @@ def capture(): shutil.copy2(cursor / 'COPYING', dest / 'COPYING') (dest / 'index.theme').write_text('[Icon Theme]\nName=Fiw Qogir\nComment=Qogir cursors\nInherits=breeze_cursors\n') p = REPO / 'configs/kde-style/kconfig/.config/kcminputrc' - p.write_text(p.read_text().replace('cursorTheme=Qogir', 'cursorTheme=Fiw-Qogir')) - print('Captured selected preferences. Review the diff and run tools/check-private.py before committing.') + if p.is_file() and (HOME / '.config/kcminputrc').is_file(): + p.write_text(p.read_text().replace('cursorTheme=Qogir', 'cursorTheme=Fiw-Qogir')) + + +def capture_dolphin(): + kconfig('dolphin', '.config/dolphinrc', groups=['[KFileDialog Settings]', '[MainWindow]']) + kconfig('dolphin', '.local/state/dolphinstaterc', keys={'[FilterBar]': ['caseSensitive', 'filterMode'], '[State]': ['State']}) + kconfig('dolphin', '.config/kwinrulesrc', groups=['[fiw-dolphin-opacity]']) + if (HOME / '.config/kwinrulesrc').is_file(): + write('configs/dolphin/kconfig/.config/kwinrulesrc', + '[General]\nrules=fiw-dolphin-opacity\ncount=1\n\n' + + (REPO / 'configs/dolphin/kconfig/.config/kwinrulesrc').read_text()) + copy('dolphin', '.local/share/kxmlgui5/dolphin/dolphinui.rc') + + +def capture_shortcuts(): + kconfig('kde-shortcuts', '.config/kglobalshortcutsrc') + kconfig('kde-shortcuts', '.config/kxkbrc', groups=['[Layout]']) + kconfig('kde-shortcuts', '.config/kwinrc', keys={'[Desktops]': ['Number', 'Rows']}) + for name in ['net.local.kitty.desktop', 'net.local.fiw-shot-region.desktop', 'net.local.fiw-shot-screen.desktop']: + copy('kde-shortcuts', '.local/share/applications/' + name, + lambda t: re.sub(r'(?m)^Exec=("?)' + re.escape(str(HOME)) + r'/.local/bin/fiw-shot\1', + 'Exec="{{HOME}}/.local/bin/fiw-shot"', t)) + copy('kde-shortcuts', '.local/bin/fiw-shot') + + +def capture_fish(): + copy('fish', '.config/fish/conf.d/fiw.fish', + lambda t: t if 'if type -q fiw-update' in t else + t.replace("alias update='sudo fiw-update'", + "if type -q fiw-update\n alias update='sudo fiw-update'\nend")) + copy('fish', '.config/fish/conf.d/done.fish') + + +def capture_kitty(): + for name in ['kitty.conf', 'kitty-main.conf', 'kitty-bright.conf', 'kitty-common.conf']: + copy('kitty', '.config/kitty/' + name, + lambda t: re.sub(r'(?m)^linux_display_server\s+wayland\s*$', + 'linux_display_server auto', t)) + + +def capture_neovim(): + def load_bundled_theme(text): + if 'vim.cmd.packadd' not in text: + text = '-- Load the bundled native theme package.\npcall(vim.cmd.packadd, "catppuccin")\n' + text + return text + copy('neovim', '.config/nvim/init.lua', load_bundled_theme) + + +def capture_fastfetch(): + if not (HOME / '.config/fastfetch/config.jsonc').is_file(): + return + # Keep the layout; the built-in Gentoo logo also works outside Kitty. + data = read_jsonc((HOME / '.config/fastfetch/config.jsonc').read_text()) + data['logo'] = {'source': 'gentoo', 'type': 'builtin', + 'padding': data.get('logo', {}).get('padding', {})} + for module in data.get('modules', []): + if isinstance(module, dict): + if isinstance(module.get('format'), str): + module['format'] = module['format'].replace('\\u001b', '\x1b') + if module.get('type') == 'os': + module['key'] = module.get('key', '').replace('', '') + write('configs/fastfetch/files/.config/fastfetch/config.jsonc', json.dumps(data, indent=2) + '\n') + + +def capture_mangohud(): + for name in ['MangoHud.conf', 'presets.conf']: + copy('mangohud', '.config/MangoHud/' + name) + + +def capture_vscode(): + source = HOME / '.config/Code/User/settings.json' + if not source.is_file(): + return + data = read_jsonc(source.read_text()) + keys = ['workbench.colorTheme', 'claudeCode.preferredLocation', + 'redhat.telemetry.enabled', 'claudeCode.selectedModel', + 'explorer.confirmDelete', 'python.languageServer', 'git.autofetch', + 'explorer.confirmDragAndDrop', 'docker.extension.dockerEngineAvailabilityPrompt'] + write('configs/vscode/json/.config/Code/User/settings.json', + json.dumps({key: data[key] for key in keys if key in data}, indent=2) + '\n') + + +def capture_vesktop(): + if (HOME / '.config/vesktop/settings.json').is_file(): + # Explicit preference fields: cloud credentials, sessions and caches excluded. + data = json.loads((HOME / '.config/vesktop/settings.json').read_text()) + allowed = ['discordBranch', 'minimizeToTray', 'arRPC', 'splashColor', 'splashBackground', + 'autoStartMinimized', 'customTitleBar', 'splashPixelated'] + data = {k: data[k] for k in allowed if k in data} + if isinstance(data.get('splashBackground'), str) and '/home/' in data['splashBackground']: + data.pop('splashBackground') + write('configs/vesktop/json/.config/vesktop/settings.json', json.dumps(data, indent=2) + '\n') + if (HOME / '.config/vesktop/settings/settings.json').is_file(): + data = json.loads((HOME / '.config/vesktop/settings/settings.json').read_text()) + allowed = ['autoUpdate', 'autoUpdateNotification', 'useQuickCss', 'eagerPatches', + 'frameless', 'transparent', 'winCtrlQ', 'disableMinSize', 'winNativeTitleBar'] + prefs = {k: data[k] for k in allowed if k in data} + theme_root = REPO / 'configs/vesktop/files/.config/vesktop/themes' + prefs['enabledThemes'] = [name for name in data.get('enabledThemes', []) + if Path(name).name == name and (theme_root / name).is_file()] + prefs['plugins'] = {name: {'enabled': plugin['enabled']} + for name, plugin in data.get('plugins', {}).items() + if isinstance(plugin, dict) and isinstance(plugin.get('enabled'), bool)} + write('configs/vesktop/json/.config/vesktop/settings/settings.json', + json.dumps(prefs, indent=2) + '\n') + + +def capture_autostart(): + for name in ['steam', 'spotify', 'vesktop', 'opendeck', 'musicpresence']: + copy('autostart', '.config/autostart/' + name + '.desktop') + kconfig('autostart', '.config/kwinrulesrc', groups=[ + '[fiw-autostart-minimized-discord]', '[fiw-autostart-minimized-opendeck]', + '[fiw-autostart-minimized-spotify]']) + p = REPO / 'configs/autostart/kconfig/.config/kwinrulesrc' + if (HOME / '.config/kwinrulesrc').is_file(): + p.write_text('[General]\nrules=fiw-autostart-minimized-discord,fiw-autostart-minimized-opendeck,fiw-autostart-minimized-spotify\ncount=3\n\n' + p.read_text()) + + +def capture(selected=None): + selected = set(CAPTURE_IDS if selected is None else selected) + if selected - set(CAPTURE_IDS): + raise ValueError('Unknown capture selection: ' + ', '.join(sorted(selected - set(CAPTURE_IDS)))) + capture_apps(selected) + functions = {'kde-style': capture_style, 'kde-shortcuts': capture_shortcuts, + 'dolphin': capture_dolphin, 'fish': capture_fish, 'kitty': capture_kitty, + 'neovim': capture_neovim, 'fastfetch': capture_fastfetch, + 'mangohud': capture_mangohud, 'vscode': capture_vscode, + 'vesktop': capture_vesktop, 'autostart': capture_autostart} + for name in sorted(selected): + if name in functions: + functions[name]() + elif name == 'spectacle': + kconfig('spectacle', '.config/spectaclerc', groups=['[General]', '[Annotations]']) + print('Captured: ' + ', '.join(sorted(selected))) + print('Review the diff and run tools/check-private.py before committing.') if __name__ == '__main__': parser = argparse.ArgumentParser(description=__doc__) - parser.add_argument('--apps-only', action='store_true', help='Recapture only Ark, Gwenview and Prism preferences') + choice = parser.add_mutually_exclusive_group() + choice.add_argument('--apps-only', action='store_true', help='Recapture only Ark, Gwenview and Prism preferences') + choice.add_argument('--config', nargs='+', choices=CAPTURE_IDS, help='Recapture only these configs') + parser.add_argument('--list', action='store_true', help='List supported capture selections') + parser.add_argument('--home', type=Path, default=HOME, help='Read preferences from this home directory') args = parser.parse_args() - if args.apps_only: - capture_apps() + HOME = args.home.resolve() + if args.list: + print('\n'.join(CAPTURE_IDS)) else: - capture() + capture(APP_KEYS if args.apps_only else args.config)