From a4a5d792ba8cc7591a87e3c66d391f33da79418a Mon Sep 17 00:00:00 2001 From: Jakob Schwendner Date: Sun, 9 Jan 2022 15:02:36 +0000 Subject: [PATCH] fix error in lsp/handler when cmp_nvim_lsp plugin is not available --- lua/user/lsp/handlers.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lua/user/lsp/handlers.lua b/lua/user/lsp/handlers.lua index fb8b7f8..1100093 100644 --- a/lua/user/lsp/handlers.lua +++ b/lua/user/lsp/handlers.lua @@ -95,10 +95,8 @@ end local capabilities = vim.lsp.protocol.make_client_capabilities() local status_ok, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp") -if not status_ok then - return +if status_ok then + M.capabilities = cmp_nvim_lsp.update_capabilities(capabilities) end -M.capabilities = cmp_nvim_lsp.update_capabilities(capabilities) - return M