summaryrefslogtreecommitdiff
path: root/.config/nvim/after/plugin/nvim-cmp.lua
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-06-10 23:07:28 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-06-10 23:07:28 +0200
commit511efe89ed084bc922ae142d32e08427859198f4 (patch)
treefef9294b6056b6cf972ea5e689f70da8184fafae /.config/nvim/after/plugin/nvim-cmp.lua
parent64e2e90abdca04743558e3baf42a6b714b440bd0 (diff)
nvim: Completely rewrite my configuration
Diffstat (limited to '.config/nvim/after/plugin/nvim-cmp.lua')
-rw-r--r--.config/nvim/after/plugin/nvim-cmp.lua32
1 files changed, 0 insertions, 32 deletions
diff --git a/.config/nvim/after/plugin/nvim-cmp.lua b/.config/nvim/after/plugin/nvim-cmp.lua
deleted file mode 100644
index 399d5a3..0000000
--- a/.config/nvim/after/plugin/nvim-cmp.lua
+++ /dev/null
@@ -1,32 +0,0 @@
-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 }
-cmp.setup {
- snippet = {
- expand = function(args)
- snip.lsp_expand(args.body)
- end,
- },
- mapping = cmp.mapping.preset.insert({
- ['<C-k>'] = cmp.mapping.select_prev_item(),
- ['<C-j>'] = cmp.mapping.select_next_item(),
- ['<C-e>'] = cmp.mapping.abort(),
- ['<CR>'] = cmp.mapping.confirm({ select = true }),
- }),
- sources = cmp.config.sources({
- { name = 'nvim_lsp' },
- { name = 'path' },
- { name = 'luasnip' },
- }, {
- { name = 'buffer', length = 5 },
- }),
- experimental = {
- ghost_text = true,
- }
-}