Skip to content

Commit

Permalink
fix breaking change in hrsh7th/cmp-nvim-lsp/issues/38
Browse files Browse the repository at this point in the history
  • Loading branch information
Arjun31415 committed Oct 16, 2022
1 parent a0cb6cc commit 7eb277a
Show file tree
Hide file tree
Showing 4 changed files with 919 additions and 1,096 deletions.
3 changes: 1 addition & 2 deletions lua/config/lsp/handlers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,10 @@ M.on_attach = function(client, bufnr)
if client.server_capabilities.documentSymbolProvider and client.name ~= "html" then navic_attach(client, bufnr) end
end

local capabilities = vim.lsp.protocol.make_client_capabilities()
M.capabilities = {}
local status_ok, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp")
if not status_ok then return M end

M.capabilities = cmp_nvim_lsp.update_capabilities(capabilities)
M.capabilities = cmp_nvim_lsp.default_capabilities()

return M
2 changes: 2 additions & 0 deletions lua/config/lsp/lsp-installer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ lspconfig.tailwindcss.setup({ on_attach = configFunctions.on_attach })
lspconfig.vimls.setup({ on_attach = configFunctions.on_attach })
-- rust_analyzer
require("config.lsp.settings.rust")
-- java server setup
lspconfig.jdtls.setup({ on_attach = configFunctions.on_attach})
-- lspconfig.rust_analyzer.setup({on_attach = configFunctions.on_attach})
-- latex server
lspconfig.texlab.setup({ on_attach = configFunctions.on_attach })
Expand Down
2 changes: 1 addition & 1 deletion lua/config/nvim-cmp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ cmp.setup({
})
cmp.setup.filetype("gitcommit", {
sources = cmp.config.sources({
{ name = "cmp_git" }, -- You can specify the `cmp_git` source if you were installed it.
{ name = "cmp_git" }, -- You can specify the `cmp_git` source if you have installed it.
}, { { name = "buffer" } }),
})

Expand Down

0 comments on commit 7eb277a

Please sign in to comment.