diff options
Diffstat (limited to '.config/nvim/after/plugin')
-rw-r--r-- | .config/nvim/after/plugin/nvim-cmp.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/.config/nvim/after/plugin/nvim-cmp.lua b/.config/nvim/after/plugin/nvim-cmp.lua index 4bc95c5..399d5a3 100644 --- a/.config/nvim/after/plugin/nvim-cmp.lua +++ b/.config/nvim/after/plugin/nvim-cmp.lua @@ -1,15 +1,16 @@ -local conf = require('lspconfig') local capabilities = require('cmp_nvim_lsp').default_capabilities() +local cmp = require('cmp') +local conf = require('lspconfig') +local snip = require('luasnip') + conf['clangd'].setup { capabilities = capabilities } conf['gopls'].setup { capabilities = capabilities } conf['lua_ls'].setup { capabilities = capabilities } conf['rust_analyzer'].setup { capabilities = capabilities } - -local cmp = require('cmp') cmp.setup { snippet = { expand = function(args) - require('luasnip').lsp_expand(args.body) + snip.lsp_expand(args.body) end, }, mapping = cmp.mapping.preset.insert({ |