summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-11-13 23:31:40 +0100
committerThomas Voss <mail@thomasvoss.com> 2023-11-13 23:31:40 +0100
commit446a47fd5975ec492964e5d59572c93719b24501 (patch)
tree92db7a73a633cbc9115564d0e75a04bff4b8a396 /.config
parent16212da1e72557fcc02035b0f14ad5f0fa1431a1 (diff)
nvim: Slight refactor
Diffstat (limited to '.config')
-rw-r--r--.config/nvim/after/plugin/nvim-cmp.lua9
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({