From 6b0c7f4ebddec2e5c608a6384f4955284e37ae0e Mon Sep 17 00:00:00 2001 From: Rasmus Wejlgaard Date: Thu, 25 Jun 2026 21:12:54 +0100 Subject: [PATCH] chore: dedup Neovim plugins left over from the LSP modernization Two leftovers from the lsp-zero removal in #25: - Unify nvim-web-devicons on the nvim-tree/ repo. barbar and trouble still pulled the old kyazdani42/ name, loading the same plugin twice under two identities. - Settle on a single snippet engine. cmp expanded via vsnip while LuaSnip + friendly-snippets loaded and did nothing (friendly-snippets are LuaSnip-format, so they never reached completion). Drop vim-vsnip, expand via luasnip, lazy_load the friendly-snippets library, and add the luasnip cmp source so the snippets actually surface. --- config/vim/init.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/config/vim/init.lua b/config/vim/init.lua index d72c3c3..c8c9033 100644 --- a/config/vim/init.lua +++ b/config/vim/init.lua @@ -85,7 +85,6 @@ require('lazy').setup({ dependencies = { 'nvim-lua/plenary.nvim' } }, { 'onsails/lspkind.nvim' }, -- lsp kind, makes autocomplete look better - { 'hrsh7th/vim-vsnip' }, { 'nvim-lua/plenary.nvim' }, -- lua utility functions { 'nvim-telescope/telescope.nvim', @@ -107,7 +106,7 @@ require('lazy').setup({ }, { -- adds file bars along the top similar to vscode 'romgrk/barbar.nvim', - dependencies = { 'kyazdani42/nvim-web-devicons' } + dependencies = { 'nvim-tree/nvim-web-devicons' } }, { -- adds a file explorer similar to vscode 'nvim-tree/nvim-tree.lua', @@ -115,7 +114,7 @@ require('lazy').setup({ }, { -- adds diagnostics for files "folke/trouble.nvim", - dependencies = "kyazdani42/nvim-web-devicons", + dependencies = "nvim-tree/nvim-web-devicons", config = function() require("trouble").setup {} end @@ -300,6 +299,9 @@ vim.api.nvim_create_autocmd('LspAttach', { local lspkind = require('lspkind') lspkind.init({}) +-- Pull in the friendly-snippets library (vscode-format) for LuaSnip. +require('luasnip.loaders.from_vscode').lazy_load() + cmp.setup({ formatting = { format = lspkind.cmp_format({ @@ -311,7 +313,7 @@ cmp.setup({ }, snippet = { expand = function(args) - vim.fn["vsnip#anonymous"](args.body) + require('luasnip').lsp_expand(args.body) end }, window = {}, @@ -324,6 +326,7 @@ cmp.setup({ }), sources = cmp.config.sources({ { name = 'nvim_lsp' }, + { name = 'luasnip' }, { name = 'nvim_lua' }, { name = 'path' }, }, {