diff options
author | Santo Cariotti <santo@dcariotti.me> | 2021-11-03 18:01:27 +0100 |
---|---|---|
committer | Santo Cariotti <santo@dcariotti.me> | 2021-11-03 18:01:27 +0100 |
commit | 436de412e740056ba33fb540f78dd43d29d0ec6b (patch) | |
tree | 7dabff50c5382f8d3eff9b2e9788af753364108f /nvim/lua | |
parent | 70173c466a3745535a1c198a9994b73c96ec4248 (diff) |
use coq instead of cmp
Diffstat (limited to 'nvim/lua')
-rw-r--r-- | nvim/lua/lsp.lua | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/nvim/lua/lsp.lua b/nvim/lua/lsp.lua index f881977..a63b761 100644 --- a/nvim/lua/lsp.lua +++ b/nvim/lua/lsp.lua @@ -1,29 +1,5 @@ local nvim_lsp = require('lspconfig') -local cmp = require'cmp' - -cmp.setup({ - sources = { - {name = 'buffer'}, - {name = 'nvim_lsp'}, - {name = 'vsnip'}, - }, - snippet = { - expand = function(args) - vim.fn["vsnip#anonymous"](args.body) - end, - }, - mapping = { - ['<C-Space>'] = cmp.mapping.complete(), - ['<C-e>'] = cmp.mapping.close(), - ['<CR>'] = cmp.mapping.confirm({ select = true }), - }, - documentation = { - border = 'rounded', - }, -}) - --- Use an on_attach function to only map the following keys --- after the language server attaches to the current buffer +local coq = require('coq') local on_attach = function(client, bufnr) local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end @@ -50,7 +26,7 @@ end local servers = { 'jedi_language_server', 'rust_analyzer', 'tsserver', 'clangd' } for _, lsp in ipairs(servers) do nvim_lsp[lsp].setup { - capabilities = capabilities, + capabilities = coq.lsp_ensure_capabilities(), on_attach = on_attach, flags = { debounce_text_changes = 150, |