From 446a47fd5975ec492964e5d59572c93719b24501 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Mon, 13 Nov 2023 23:31:40 +0100 Subject: nvim: Slight refactor --- .config/nvim/after/plugin/nvim-cmp.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to '.config/nvim/after') 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({ -- cgit v1.2.3