From 436de412e740056ba33fb540f78dd43d29d0ec6b Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Wed, 3 Nov 2021 18:01:27 +0100 Subject: use coq instead of cmp --- nvim/lua/lsp.lua | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) (limited to 'nvim/lua/lsp.lua') 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 = { - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.close(), - [''] = 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, -- cgit v1.2.3-18-g5258