From 621aaa2ccd9b2c956375322ff698898fa66483de Mon Sep 17 00:00:00 2001 From: Stefan Imhoff Date: Fri, 20 Dec 2024 12:50:35 +0100 Subject: [PATCH] fix(nvim): change cmp to blink and keep Telescope --- config/nvim/lazy-lock.json | 71 ++++++------- config/nvim/lazyvim.json | 2 +- config/nvim/lua/config/lazy.lua | 1 + config/nvim/lua/plugins/blink.cmp.lua | 75 +++++++++++++ config/nvim/lua/plugins/cmp.lua | 47 -------- config/nvim/lua/plugins/copilot.lua | 10 -- config/nvim/lua/plugins/neotest.lua | 56 ---------- config/nvim/lua/plugins/obsidian.lua | 136 ++++++++++++------------ config/nvim/lua/plugins/tailwindcss.lua | 82 +++++++------- 9 files changed, 218 insertions(+), 262 deletions(-) create mode 100644 config/nvim/lua/plugins/blink.cmp.lua delete mode 100644 config/nvim/lua/plugins/cmp.lua delete mode 100644 config/nvim/lua/plugins/copilot.lua delete mode 100644 config/nvim/lua/plugins/neotest.lua diff --git a/config/nvim/lazy-lock.json b/config/nvim/lazy-lock.json index a1a5f46..221a413 100644 --- a/config/nvim/lazy-lock.json +++ b/config/nvim/lazy-lock.json @@ -1,26 +1,23 @@ { "ChatGPT.nvim": { "branch": "main", "commit": "5b6d296eefc75331e2ff9f0adcffbd7d27862dd6" }, "CopilotChat.nvim": { "branch": "canary", "commit": "451d365928a994cda3505a84905303f790e28df8" }, - "LazyVim": { "branch": "main", "commit": "31af2075423d0e6d3c4f10ab299498471afe4ea0" }, - "SchemaStore.nvim": { "branch": "main", "commit": "f8c2a0f5d51b800ea4625808e243d9e8f7c5e1df" }, + "LazyVim": { "branch": "main", "commit": "447e260a62ffd50b0113c20db0e63108baf44b44" }, + "SchemaStore.nvim": { "branch": "main", "commit": "bb03860b59f17dfada46d6d9563c48b7b12fecaf" }, "aerial.nvim": { "branch": "master", "commit": "fd7fbe36772d7a955815c90ff9b58523bfdb410d" }, "auto-save.nvim": { "branch": "main", "commit": "979b6c82f60cfa80f4cf437d77446d0ded0addf0" }, "baleia.nvim": { "branch": "main", "commit": "1b25eac3ac03659c3d3af75c7455e179e5f197f7" }, "barbecue": { "branch": "main", "commit": "cd7e7da622d68136e13721865b4d919efd6325ed" }, "base16-vim": { "branch": "master", "commit": "3be3cd82cd31acfcab9a41bad853d9c68d30478d" }, "blamer.nvim": { "branch": "master", "commit": "e0d43c11697300eb68f00d69df8b87deb0bf52dc" }, + "blink-cmp-copilot": { "branch": "main", "commit": "c38d3e4201b135ab290c7ad126a9720cf76c788c" }, + "blink.cmp": { "branch": "main", "commit": "ae5a4ce8f7e519e49de7ae6fcadd74547f820a52" }, "bufferline.nvim": { "branch": "main", "commit": "261a72b90d6db4ed8014f7bda976bcdc9dd7ce76" }, "catppuccin": { "branch": "main", "commit": "faf15ab0201b564b6368ffa47b56feefc92ce3f4" }, "chafa.nvim": { "branch": "main", "commit": "792c8f4f0e86b5e27c3602be4614f886f3a12a5a" }, "cheatsheet.nvim": { "branch": "master", "commit": "9716f9aaa94dd1fd6ce59b5aae0e5f25e2a463ef" }, - "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-npm": { "branch": "main", "commit": "2337f109f51a09297596dd6b538b70ccba92b4e4" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, - "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "codewindow.nvim": { "branch": "master", "commit": "dd7017617962943eb1d152fc58940f11c6775a4a" }, "committia.vim": { "branch": "master", "commit": "c8c0f255e8090ed90dd9d5dd2e8672994f8e3671" }, "conform.nvim": { "branch": "master", "commit": "f4e8837878fc5712d053ba3091a73d27d96a09e2" }, - "copilot-cmp": { "branch": "master", "commit": "15fc12af3d0109fa76b60b5cffa1373697e261d1" }, "copilot.lua": { "branch": "master", "commit": "d3783b9283a7c35940ed8d71549030d5f5f9f980" }, "dashboard-nvim": { "branch": "master", "commit": "ae309606940d26d8c9df8b048a6e136b6bbec478" }, "dial.nvim": { "branch": "master", "commit": "46b4375e84e8eb771129bff6b2b1e47746601ef9" }, @@ -33,70 +30,67 @@ "flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" }, "fm-nvim": { "branch": "master", "commit": "8e6a77049330e7c797eb9e63affd75eb796fe75e" }, "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, - "fzf": { "branch": "master", "commit": "ec3acb19321b8f74035225baf4a188cbb1163909" }, - "fzf-lua": { "branch": "main", "commit": "2b35807945413b622c72af92eb93bb59d5c405f5" }, + "fzf": { "branch": "master", "commit": "b2c3e567dadd35253bbccaf4e69c9dc352d36304" }, + "fzf-lua": { "branch": "main", "commit": "dd1aa78c189cd4a2a8686710aa548276b1185671" }, "fzf.vim": { "branch": "master", "commit": "556f45e79ae5e3970054fee4c4373472604a1b4e" }, "gen.nvim": { "branch": "main", "commit": "b9721662daedd880ca0a0358cf6ffbff60617ab3" }, "gh.nvim": { "branch": "main", "commit": "ebbaac254ef7dd6f85b439825fbce82d0dc84515" }, "gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" }, - "grug-far.nvim": { "branch": "main", "commit": "eadd3c4d7d3edc9d6b1ddc15e3c661d830dbf2b6" }, + "grug-far.nvim": { "branch": "main", "commit": "11d0fbd6fff6f4e394af95319deeaab4ef88ce97" }, "harpoon": { "branch": "harpoon2", "commit": "a84ab829eaf3678b586609888ef52f7779102263" }, "harpoon-lualine": { "branch": "master", "commit": "eae10bc6bddddbc73daa0956ba4ee5cc29cf9a49" }, "highlight-undo.nvim": { "branch": "main", "commit": "ee2f6355e08719fea902e7c478aa7351934f2bb6" }, - "inc-rename.nvim": { "branch": "main", "commit": "1871ca49ae6ee3e9ebee37955ba10c7b1425974f" }, - "indent-blankline.nvim": { "branch": "master", "commit": "259357fa4097e232730341fa60988087d189193a" }, - "lazy.nvim": { "branch": "main", "commit": "7c493713bc2cb392706866eeba53aaef6c8e9fc6" }, + "inc-rename.nvim": { "branch": "main", "commit": "f4e13df6e2d0b3177a7305dbc1cc7f7ea44b94f1" }, + "lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" }, "lazydev.nvim": { "branch": "main", "commit": "f59bd14a852ca43db38e3662395354cb2a9b13e0" }, "lazygit.nvim": { "branch": "main", "commit": "77a0d42943d8265271e6e6beaed72da54eeb17e7" }, - "legendary.nvim": { "branch": "master", "commit": "ba8452081f63548ce30a8bbc94369c3764cee33c" }, + "legendary.nvim": { "branch": "master", "commit": "58dc0e3a99b76d6f1386d8da2cd985d7e2804dd4" }, "lf.nvim": { "branch": "master", "commit": "69ab1efcffee6928bf68ac9bd0c016464d9b2c8b" }, "litee.nvim": { "branch": "main", "commit": "4efaf373322d9e71eaff31164abb393417cc6f6a" }, - "lsp-progress.nvim": { "branch": "main", "commit": "d5f4d28efe75ce636bfbe271eb45f39689765aab" }, + "lsp-progress.nvim": { "branch": "main", "commit": "f3df1df8f5ea33d082db047b5d2d2b83cc01cd8a" }, "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, "lush.nvim": { "branch": "main", "commit": "45a79ec4acb5af783a6a29673a999ce37f00497e" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "8e46de9241d3997927af12196bd8faa0ed08c29a" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "2daa8921b7afdcfa47419a21ea343c3df6d74fa0" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, "mini.ai": { "branch": "main", "commit": "ebb04799794a7f94628153991e6334c3304961b8" }, "mini.animate": { "branch": "main", "commit": "d14190ac3040116540889e2ebc25f488b195799e" }, "mini.icons": { "branch": "main", "commit": "44c0160526f7ae17ca8e8eab9ab235d047fcf7a6" }, - "mini.nvim": { "branch": "main", "commit": "e78a98ac2f984fb30e31c016f97d57e2d60a3ee7" }, + "mini.nvim": { "branch": "main", "commit": "4228f166ee9db3e910eea1915e2d3683028add47" }, "mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" }, "mini.surround": { "branch": "main", "commit": "aa5e245829dd12d8ff0c96ef11da28681d6049aa" }, - "neo-tree.nvim": { "branch": "main", "commit": "395ce4675a54828f9fd730d78f7910c114ab0a49" }, - "neogit": { "branch": "master", "commit": "bd0c2d3429eac3e70dae42cfe913b44242da7132" }, + "neo-tree.nvim": { "branch": "main", "commit": "d7266e467de1adbaf775cbd4bff9b68842e27386" }, + "neogit": { "branch": "master", "commit": "0820552997dd4dda4faa147228f0e61ea88290a3" }, "neotest": { "branch": "master", "commit": "6d3d22cdad49999ef774ebe1bc250a4994038964" }, - "neotest-golang": { "branch": "main", "commit": "3565f317eab2dbfdd1e208e1fa6b25834121b8f7" }, + "neotest-golang": { "branch": "main", "commit": "722b6116b4c9201a97edb06565ebed797f88441d" }, "neotest-jest": { "branch": "main", "commit": "514fd4eae7da15fd409133086bb8e029b65ac43f" }, "neotest-rspec": { "branch": "main", "commit": "f8c91edc5dd87ca467a624652f365ac217d7cc1c" }, - "neotest-vitest": { "branch": "main", "commit": "9e30dca989a2287cf3fde86b3e138ea7fa4de935" }, + "neotest-vitest": { "branch": "main", "commit": "3e338b77700853f725856c37ff5a3cf9295bffae" }, "night-owl.nvim": { "branch": "main", "commit": "86ed124c2f7e118670649701288e024444bf91e5" }, "noctis.nvim": { "branch": "main", "commit": "0b9336e39c686a7e58de06e4dd38c2bd862a7b33" }, "noice.nvim": { "branch": "main", "commit": "eaed6cc9c06aa2013b5255349e4f26a6b17ab70f" }, "nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" }, - "nvim-cmp": { "branch": "main", "commit": "3403e2e9391ed0a28c3afddd8612701b647c8e26" }, "nvim-colorizer.lua": { "branch": "master", "commit": "4acf88d31b3a7a1a7f31e9c30bf2b23c6313abdb" }, "nvim-cursorline": { "branch": "main", "commit": "804f0023692653b2b2368462d67d2a87056947f9" }, - "nvim-dap": { "branch": "master", "commit": "b08e05d7cff6024a9c29b64287d295db7c191450" }, + "nvim-dap": { "branch": "master", "commit": "04ce47fc5a6ef2b717f33c320fc003091cebac40" }, "nvim-dap-go": { "branch": "main", "commit": "6aa88167ea1224bcef578e8c7160fe8afbb44848" }, "nvim-dap-ruby": { "branch": "main", "commit": "4176405d186a93ebec38a6344df124b1689cfcfd" }, "nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "76d80c3d171224315b61c006502a1e30c213a9ab" }, - "nvim-lint": { "branch": "master", "commit": "6b46370d02cd001509a765591a3ffc481b538794" }, - "nvim-lspconfig": { "branch": "master", "commit": "124be12d782d656b3c75b513a44d9e4728406078" }, + "nvim-lint": { "branch": "master", "commit": "1fea92f1d9908eaa5eb8bafe08b4293d7aadaa55" }, + "nvim-lspconfig": { "branch": "master", "commit": "040001d85e9190a904d0e35ef5774633e14d8475" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, "nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" }, "nvim-silicon": { "branch": "main", "commit": "9fe6001dc8cad4d9c53bcfc8649e3dc76ffa169c" }, - "nvim-snippets": { "branch": "main", "commit": "56b4052f71220144689caaa2e5b66222ba5661eb" }, "nvim-transparent": { "branch": "main", "commit": "8a2749a2fa74f97fe6557f61b89ac7fd873f3c21" }, - "nvim-treesitter": { "branch": "master", "commit": "33d27173876499a0f037cb9edff90d583711b6ae" }, + "nvim-treesitter": { "branch": "master", "commit": "2405274937718d520a40e03df92030dca6b4f0fd" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" }, "nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" }, - "nvim-ufo": { "branch": "main", "commit": "95cbe2e99901135704aabdc8732d722cf68b12c9" }, - "nvim-various-textobjs": { "branch": "main", "commit": "cb63b4d047b7d05b57e0b7b71b428a9a74b5531b" }, - "nvim-web-devicons": { "branch": "master", "commit": "dd0c15170f9ab2ffac695d90212318c05078751d" }, + "nvim-ufo": { "branch": "main", "commit": "270ca542dae992ffe40274718c63645217ebc8bf" }, + "nvim-various-textobjs": { "branch": "main", "commit": "157b5d7f0eeba38be01d940bfb1449eb90b4eac9" }, + "nvim-web-devicons": { "branch": "master", "commit": "0eb18da56e2ba6ba24de7130a12bcc4e31ad11cb" }, "oatmeal.nvim": { "branch": "master", "commit": "c8cdd0a182cf77f88ea5fa4703229ddb3f47c1f7" }, "obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" }, "oil.nvim": { "branch": "master", "commit": "dba037598843973b8c54bc5ce0318db4a0da439d" }, @@ -107,16 +101,15 @@ "promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" }, "rainbow_csv": { "branch": "master", "commit": "3dbbfd7d17536aebfb80f571255548495574c32b" }, "remote-nvim.nvim": { "branch": "main", "commit": "66fc20fd259401c7bb6ac5189ecb6283c2eb65d2" }, - "render-markdown.nvim": { "branch": "main", "commit": "e41b0002fe4196825450ab5a6343300c40791d51" }, + "render-markdown.nvim": { "branch": "main", "commit": "0022a579ac7355966be5ade77699b88c76b6a549" }, "smart-open.nvim": { "branch": "0.2.x", "commit": "7770b01ce4d551c143d7ec8589879320796621b9" }, - "smart-splits.nvim": { "branch": "master", "commit": "63d16fc6a8fa6864d00de99207943556b10676cb" }, - "snacks.nvim": { "branch": "main", "commit": "5532ba07be1306eb05c727a27368a8311bae3eeb" }, - "sqlite.lua": { "branch": "master", "commit": "d0ffd703b56d090d213b497ed4eb840495f14a11" }, + "smart-splits.nvim": { "branch": "master", "commit": "1e8fa136f1be004c75b4f794f86a7103e077b6ca" }, + "snacks.nvim": { "branch": "main", "commit": "9563bb1ffc890abf35341561ea2362b9ac51da04" }, + "sqlite.lua": { "branch": "master", "commit": "cf482586c4f24e197375235a6e310b9b9e80ba83" }, "symbols-outline.nvim": { "branch": "master", "commit": "564ee65dfc9024bdde73a6621820866987cbb256" }, "tabular": { "branch": "master", "commit": "12437cd1b53488e24936ec4b091c9324cafee311" }, "tailwind-sorter.nvim": { "branch": "main", "commit": "717e5c9761ed8334dadbb9357df7d826aae97b92" }, "tailwind-tools.nvim": { "branch": "master", "commit": "3703e162d819a04b128902c508276553dae0dfb8" }, - "tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "3d3cd95e4a4135c250faf83dd5ed61b8e5502b86" }, "telescope-file-browser.nvim": { "branch": "master", "commit": "626998e5c1b71c130d8bc6cf7abb6709b98287bb" }, "telescope-frecency.nvim": { "branch": "master", "commit": "a358728043a429d69ecfb317937df66f7cec40d5" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "dae2eac9d91464448b584c7949a31df8faefec56" }, @@ -131,14 +124,14 @@ "tmux-awesome-manager.nvim": { "branch": "master", "commit": "f266ba588249965a16df77bca3f8e9a241156d37" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, "toggleterm.nvim": { "branch": "main", "commit": "87b2d6a3cab8e2bd9a0255427074285f0365398d" }, - "tokyonight.nvim": { "branch": "main", "commit": "b262293ef481b0d1f7a14c708ea7ca649672e200" }, + "tokyonight.nvim": { "branch": "main", "commit": "45d22cf0e1b93476d3b6d362d720412b3d34465c" }, "trouble.nvim": { "branch": "main", "commit": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6" }, - "ts-comments.nvim": { "branch": "main", "commit": "2002692ad1d3f6518d016550c20c2a890f0cbf0e" }, + "ts-comments.nvim": { "branch": "main", "commit": "872dcfa0418f4a33b7437fb4d9f4e89f2f000d74" }, "twilight.nvim": { "branch": "main", "commit": "1584c0b0a979b71fd86b18d302ba84e9aba85b1b" }, "vim-abolish": { "branch": "master", "commit": "dcbfe065297d31823561ba787f51056c147aa682" }, "vim-astro": { "branch": "main", "commit": "9b4674ecfe1dd84b5fb9b4de1653975de6e8e2e1" }, "vim-bookmarks": { "branch": "master", "commit": "9cc5fa7ecc23b052bd524d07c85356c64b92aeef" }, - "vim-fugitive": { "branch": "master", "commit": "320b18fba2a4f2fe3c8225c778c687e0d2620384" }, + "vim-fugitive": { "branch": "master", "commit": "fcb4db52e7f65b95705aa58f0f2df1312c1f2df2" }, "vim-gh-line": { "branch": "master", "commit": "731751fdfa4f64a061dbc7088cb7b2f12e0828ad" }, "vim-grammarous": { "branch": "master", "commit": "db46357465ce587d5325e816235b5e92415f8c05" }, "vim-markdown": { "branch": "master", "commit": "8f6cb3a6ca4e3b6bcda0730145a0b700f3481b51" }, @@ -151,7 +144,7 @@ "vim-wakatime": { "branch": "master", "commit": "cf51327a9e08935569614d1cb24e779ee9f45519" }, "vim-xtract": { "branch": "master", "commit": "65e47be935080f112f219b5f0bc1bf411c783f27" }, "vimux": { "branch": "master", "commit": "7db6b2f79d432ee3820668b1d4625311dbe1d0ad" }, - "which-key.nvim": { "branch": "main", "commit": "4ab3bbe976e63b5390d3fca74a52a092a041cd30" }, + "which-key.nvim": { "branch": "main", "commit": "8ab96b38a2530eacba5be717f52e04601eb59326" }, "worktrees.nvim": { "branch": "main", "commit": "9b705e702b29297009702e492c28c0277a5bb8fa" }, "wrapping.nvim": { "branch": "master", "commit": "a5210c29be19ed736eb3333677e08a57efebce78" }, "zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" } diff --git a/config/nvim/lazyvim.json b/config/nvim/lazyvim.json index 9ae47e0..74768fa 100644 --- a/config/nvim/lazyvim.json +++ b/config/nvim/lazyvim.json @@ -10,7 +10,7 @@ "lazyvim.plugins.extras.lang.yaml" ], "news": { - "NEWS.md": "7429" + "NEWS.md": "10960" }, "version": 7 } \ No newline at end of file diff --git a/config/nvim/lua/config/lazy.lua b/config/nvim/lua/config/lazy.lua index a6e53e2..2bdfc55 100644 --- a/config/nvim/lua/config/lazy.lua +++ b/config/nvim/lua/config/lazy.lua @@ -20,6 +20,7 @@ require("lazy").setup({ { import = "lazyvim.plugins.extras.dap.core" }, { import = "lazyvim.plugins.extras.editor.aerial" }, { import = "lazyvim.plugins.extras.editor.harpoon2" }, + { import = "lazyvim.plugins.extras.editor.telescope" }, { import = "lazyvim.plugins.extras.formatting.prettier" }, { import = "lazyvim.plugins.extras.lang.go" }, { import = "lazyvim.plugins.extras.lang.json" }, diff --git a/config/nvim/lua/plugins/blink.cmp.lua b/config/nvim/lua/plugins/blink.cmp.lua new file mode 100644 index 0000000..a508a5a --- /dev/null +++ b/config/nvim/lua/plugins/blink.cmp.lua @@ -0,0 +1,75 @@ +-- blink.cmp +-- https://github.com/saghen/blink.cmp +return { + "saghen/blink.cmp", + version = not vim.g.lazyvim_blink_main and "*", + build = vim.g.lazyvim_blink_main and "cargo build --release", + opts_extend = { + "sources.completion.enabled_providers", + "sources.compat", + "sources.default", + }, + dependencies = { + "rafamadriz/friendly-snippets", + -- add blink.compat to dependencies + { + "saghen/blink.compat", + optional = true, -- make optional so it's only enabled if any extras need it + opts = {}, + version = not vim.g.lazyvim_blink_main and "*", + }, + }, + event = "InsertEnter", + opts = { + snippets = { + expand = function(snippet, _) + return LazyVim.cmp.expand(snippet) + end, + }, + appearance = { + -- sets the fallback highlight groups to nvim-cmp's highlight groups + -- useful for when your theme doesn't support blink.cmp + -- will be removed in a future release, assuming themes add support + use_nvim_cmp_as_default = false, + -- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font' + -- adjusts spacing to ensure icons are aligned + nerd_font_variant = "mono", + }, + completion = { + accept = { + -- experimental auto-brackets support + auto_brackets = { + enabled = true, + }, + }, + menu = { + draw = { + treesitter = { "lsp" }, + }, + }, + documentation = { + auto_show = true, + auto_show_delay_ms = 200, + }, + ghost_text = { + enabled = vim.g.ai_cmp, + }, + }, + + -- experimental signature help support + -- signature = { enabled = true }, + + sources = { + -- adding any nvim-cmp sources here will enable them + -- with blink.compat + compat = {}, + default = { "lsp", "path", "snippets", "buffer" }, + cmdline = {}, + }, + + keymap = { + preset = "enter", + [""] = { "select_and_accept" }, + }, + }, +} diff --git a/config/nvim/lua/plugins/cmp.lua b/config/nvim/lua/plugins/cmp.lua deleted file mode 100644 index 0e1432d..0000000 --- a/config/nvim/lua/plugins/cmp.lua +++ /dev/null @@ -1,47 +0,0 @@ -return { - "hrsh7th/nvim-cmp", - dependencies = { - { "roobert/tailwindcss-colorizer-cmp.nvim", config = true }, - "zbirenbaum/copilot-cmp", - "David-Kunz/cmp-npm", - }, - opts = function(_, opts) - local cmp = require("cmp") - opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { - { name = "copilot" }, - { name = "npm", keyword_length = 4 }, - })) - - opts.formatting = { - fields = { "kind", "abbr", "menu" }, - format = function(_, item) - local icons = require("lazyvim.config").icons.kinds - if icons[item.kind] then - item.kind = icons[item.kind] - end - return item - end, - } - - opts.window = { - completion = cmp.config.window.bordered(), - documentation = cmp.config.window.bordered(), - } - - vim.api.nvim_set_hl(0, "CmpItemKindCopilot", { fg = "#6CC644" }) - vim.api.nvim_set_hl(0, "CmpItemAbbrMatch", { fg = "NONE", bg = "#000000" }) - - vim.cmd([[highlight! link CmpItemAbbrMatchFuzzy CmpItemAbbrMatch]]) - vim.cmd([[highlight! CmpItemAbbrDeprecated guibg=NONE gui=strikethrough guifg=#808080]]) - vim.cmd([[highlight! CmpItemAbbrMatch guibg=NONE guifg=#569CD6]]) - vim.cmd([[highlight! link CmpItemAbbrMatchFuzzy CmpItemAbbrMatch]]) - vim.cmd([[highlight! CmpItemKindVariable guibg=NONE guifg=#9CDCFE]]) - vim.cmd([[highlight! link CmpItemKindInterface CmpItemKindVariable]]) - vim.cmd([[highlight! link CmpItemKindText CmpItemKindVariable]]) - vim.cmd([[highlight! CmpItemKindFunction guibg=NONE guifg=#C586C0]]) - vim.cmd([[highlight! link CmpItemKindMethod CmpItemKindFunction]]) - vim.cmd([[highlight! CmpItemKindKeyword guibg=NONE guifg=#D4D4D4]]) - vim.cmd([[highlight! link CmpItemKindProperty CmpItemKindKeyword]]) - vim.cmd([[highlight! link CmpItemKindUnit CmpItemKindKeyword]]) - end, -} diff --git a/config/nvim/lua/plugins/copilot.lua b/config/nvim/lua/plugins/copilot.lua deleted file mode 100644 index 47317fc..0000000 --- a/config/nvim/lua/plugins/copilot.lua +++ /dev/null @@ -1,10 +0,0 @@ --- Copilot replacement --- https://github.com/zbirenbaum/copilot.lua --- https://github.com/zbirenbaum/copilot-cmp -return { - "zbirenbaum/copilot-cmp", - dependencies = "zbirenbaum/copilot.lua", - opts = function() - require("copilot").setup() - end, -} diff --git a/config/nvim/lua/plugins/neotest.lua b/config/nvim/lua/plugins/neotest.lua deleted file mode 100644 index dd2009a..0000000 --- a/config/nvim/lua/plugins/neotest.lua +++ /dev/null @@ -1,56 +0,0 @@ --- Neotest --- https://github.com/nvim-neotest/neotest -return { - { - "nvim-neotest/neotest", - dependencies = { - "haydenmeade/neotest-jest", - "marilari88/neotest-vitest", - }, - keys = { - { - "tl", - function() - require("neotest").run.run_last() - end, - desc = "Run Last Test", - }, - { - "tL", - function() - require("neotest").run.run_last({ - strategy = "dap", - }) - end, - desc = "Debug Last Test", - }, - { - "tw", - "lua require('neotest').run.run({ jestCommand = 'jest --watch ' })", - desc = "Run Watch", - }, - }, - opts = function(_, opts) - table.insert( - opts.adapters, - require("neotest-jest")({ - jestCommand = "npm test --", - jestConfigFile = "custom.jest.config.ts", - env = { - CI = true, - }, - cwd = function() - return vim.fn.getcwd() - end, - }) - ) - table.insert(opts.adapters, require("neotest-vitest")) - table.insert( - opts.adapters, - require("neotest-go")({ - recursive_run = true, - }) - ) - end, - }, -} diff --git a/config/nvim/lua/plugins/obsidian.lua b/config/nvim/lua/plugins/obsidian.lua index 423f68e..c519fa2 100644 --- a/config/nvim/lua/plugins/obsidian.lua +++ b/config/nvim/lua/plugins/obsidian.lua @@ -1,72 +1,72 @@ -- Obsidian -- https://github.com/epwalsh/obsidian.nvim return { - "epwalsh/obsidian.nvim", - version = "*", - lazy = true, - ft = "markdown", - dependencies = { - -- required - "nvim-lua/plenary.nvim", - -- optional - "hrsh7th/nvim-cmp", - "nvim-telescope/telescope.nvim", - "ibhagwan/fzf-lua", - "junegunn/fzf", - "junegunn/fzf.vim", - "godlygeek/tabular", - "preservim/vim-markdown", - }, - opts = { - ui = { enable = false }, - workspaces = { - { - name = "zettelkasten", - path = "~/Code/GitHub/obsidian/zettelkasten", - overrides = { - notes_subdir = "pages", - }, - }, - { - name = "highlights", - path = "~/Code/GitHub/obsidian/highlights", - }, - }, - completion = { - nvim_cmp = true, - min_chars = 2, - use_path_only = false, - }, - mappings = { - -- Overrides the 'gf' mapping to work on markdown/wiki links within your vault. - ["gf"] = { - action = function() - return require("obsidian").util.gf_passthrough() - end, - opts = { noremap = false, expr = true, buffer = true }, - }, - -- Toggle check-boxes. - ["ch"] = { - action = function() - return require("obsidian").util.toggle_checkbox() - end, - opts = { buffer = true }, - }, - }, - disable_frontmatter = true, - note_id_func = function(title) - local suffix = "" - if title ~= nil and title ~= "" then - suffix = title - else - suffix = tostring(os.date("%Y%m%d%H%M")) - end - return suffix - end, - templates = { - subdir = "templates", - date_format = "%Y-%m-%d", - time_format = "%H:%M", - }, - }, + "epwalsh/obsidian.nvim", + version = "*", + lazy = true, + ft = "markdown", + dependencies = { + -- required + "nvim-lua/plenary.nvim", + -- optional + -- "hrsh7th/nvim-cmp", + -- "nvim-telescope/telescope.nvim", + "ibhagwan/fzf-lua", + "junegunn/fzf", + "junegunn/fzf.vim", + "godlygeek/tabular", + "preservim/vim-markdown", + }, + opts = { + ui = { enable = false }, + workspaces = { + { + name = "zettelkasten", + path = "~/Code/GitHub/obsidian/zettelkasten", + overrides = { + notes_subdir = "pages", + }, + }, + { + name = "highlights", + path = "~/Code/GitHub/obsidian/highlights", + }, + }, + completion = { + -- nvim_cmp = true, + min_chars = 2, + use_path_only = false, + }, + mappings = { + -- Overrides the 'gf' mapping to work on markdown/wiki links within your vault. + ["gf"] = { + action = function() + return require("obsidian").util.gf_passthrough() + end, + opts = { noremap = false, expr = true, buffer = true }, + }, + -- Toggle check-boxes. + ["ch"] = { + action = function() + return require("obsidian").util.toggle_checkbox() + end, + opts = { buffer = true }, + }, + }, + disable_frontmatter = true, + note_id_func = function(title) + local suffix = "" + if title ~= nil and title ~= "" then + suffix = title + else + suffix = tostring(os.date("%Y%m%d%H%M")) + end + return suffix + end, + templates = { + subdir = "templates", + date_format = "%Y-%m-%d", + time_format = "%H:%M", + }, + }, } diff --git a/config/nvim/lua/plugins/tailwindcss.lua b/config/nvim/lua/plugins/tailwindcss.lua index cbfb8a1..e47d0c9 100644 --- a/config/nvim/lua/plugins/tailwindcss.lua +++ b/config/nvim/lua/plugins/tailwindcss.lua @@ -1,48 +1,48 @@ -- Tailwind CSS return { - { - "neovim/nvim-lspconfig", - opts = { - servers = { - tailwindcss = {}, - }, - }, - }, - { - "NvChad/nvim-colorizer.lua", - opts = { - user_default_options = { - tailwind = true, - }, + { + "neovim/nvim-lspconfig", + opts = { + servers = { + tailwindcss = {}, + }, + }, }, { - "hrsh7th/nvim-cmp", - dependencies = { - { "roobert/tailwindcss-colorizer-cmp.nvim", config = true }, - }, - opts = function(_, opts) - -- original LazyVim kind icon formatter - local format_kinds = opts.formatting.format - opts.formatting.format = function(entry, item) - format_kinds(entry, item) -- add icons - return require("tailwindcss-colorizer-cmp").formatter(entry, item) - end - end, + "NvChad/nvim-colorizer.lua", + opts = { + user_default_options = { + tailwind = true, + }, + }, + -- { + -- "hrsh7th/nvim-cmp", + -- dependencies = { + -- { "roobert/tailwindcss-colorizer-cmp.nvim", config = true }, + -- }, + -- opts = function(_, opts) + -- -- original LazyVim kind icon formatter + -- local format_kinds = opts.formatting.format + -- opts.formatting.format = function(entry, item) + -- format_kinds(entry, item) -- add icons + -- return require("tailwindcss-colorizer-cmp").formatter(entry, item) + -- end + -- end, + -- }, + "laytan/tailwind-sorter.nvim", + dependencies = { + "nvim-treesitter/nvim-treesitter", + "nvim-lua/plenary.nvim", + }, + build = "cd formatter && npm i && npm run build", + config = { + on_save_enabled = true, + on_save_pattern = { "*.html", "*.jsx", "*.tsx", "*.astro", "*.svelte" }, + }, }, - "laytan/tailwind-sorter.nvim", - dependencies = { - "nvim-treesitter/nvim-treesitter", - "nvim-lua/plenary.nvim", + { + "luckasRanarison/tailwind-tools.nvim", + dependencies = { "nvim-treesitter/nvim-treesitter" }, + opts = {}, }, - build = "cd formatter && npm i && npm run build", - config = { - on_save_enabled = true, - on_save_pattern = { "*.html", "*.jsx", "*.tsx", "*.astro", "*.svelte" }, - }, - }, - { - "luckasRanarison/tailwind-tools.nvim", - dependencies = { "nvim-treesitter/nvim-treesitter" }, - opts = {}, - }, }