From b3f20969a78d4fa17b3f146096e55e489f75c840 Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Thu, 24 Feb 2022 17:27:49 +0200 Subject: [PATCH] Nvim: Setup LSP with additional capabilities supported by nvim-cmp --- home/.config/nvim/lua/pluginconf/lsp.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/home/.config/nvim/lua/pluginconf/lsp.lua b/home/.config/nvim/lua/pluginconf/lsp.lua index 3aef542..9a56dbb 100644 --- a/home/.config/nvim/lua/pluginconf/lsp.lua +++ b/home/.config/nvim/lua/pluginconf/lsp.lua @@ -44,6 +44,10 @@ local buf_map_keys = function(server_name, bufnr) keymapOpts) end +-- Add additional capabilities supported by nvim-cmp +local capabilities = vim.lsp.protocol.make_client_capabilities() +capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities) + -- Register a handler that will be called for all installed servers. -- Alternatively, you may also register handlers on specific server instances instead (see example below). lsp_installer.on_server_ready(function(server) @@ -75,5 +79,6 @@ lsp_installer.on_server_ready(function(server) end opts.on_attach = buf_map_keys + opts.capabilities = capabilities server:setup(opts) end)