fix error in lsp/handler when cmp_nvim_lsp plugin is not available

pull/49/head
Jakob Schwendner 3 years ago
parent 7a082a3306
commit a4a5d792ba

@ -95,10 +95,8 @@ end
local capabilities = vim.lsp.protocol.make_client_capabilities() local capabilities = vim.lsp.protocol.make_client_capabilities()
local status_ok, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp") local status_ok, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp")
if not status_ok then if status_ok then
return M.capabilities = cmp_nvim_lsp.update_capabilities(capabilities)
end end
M.capabilities = cmp_nvim_lsp.update_capabilities(capabilities)
return M return M

Loading…
Cancel
Save