Skip to content

Commit

Permalink
update deprecated usage in cmp-nvim-lsp
Browse files Browse the repository at this point in the history
  • Loading branch information
jack828 committed Nov 8, 2022
1 parent 2d72389 commit b4ac8ff
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions .config/nvim/lua/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ lsp_installer.on_server_ready(function(server)
if server.name == 'arduino_language_server' then
opts = {
on_attach = on_attach,
capabilities = cmp_nvim_lsp.update_capabilities(
vim.lsp.protocol.make_client_capabilities()
),
capabilities = cmp_nvim_lsp.default_capabilities(),
cmd = {
"arduino-language-server",
"-fqbn",
Expand All @@ -83,15 +81,11 @@ lsp_installer.on_server_ready(function(server)
opts = {
filetypes = {"c", "cpp", "objc", "objcpp", "ino"},
on_attach = on_attach,
capabilities = cmp_nvim_lsp.update_capabilities(
vim.lsp.protocol.make_client_capabilities()
)
capabilities = cmp_nvim_lsp.default_capabilities()
}
elseif server.name == 'tsserver' then
opts = {
capabilities = cmp_nvim_lsp.update_capabilities(
vim.lsp.protocol.make_client_capabilities()
),
capabilities = cmp_nvim_lsp.default_capabilities(),
on_attach = function(client, bufnr)
client.resolved_capabilities.document_formatting = false

Expand Down Expand Up @@ -175,9 +169,7 @@ lsp_installer.on_server_ready(function(server)

opts = {
on_attach = on_attach,
capabilities = cmp_nvim_lsp.update_capabilities(
vim.lsp.protocol.make_client_capabilities()
),
capabilities = cmp_nvim_lsp.default_capabilities(),
init_options = {
documentFormatting = true
},
Expand All @@ -191,9 +183,7 @@ lsp_installer.on_server_ready(function(server)
else
opts = {
on_attach = on_attach,
capabilities = cmp_nvim_lsp.update_capabilities(
vim.lsp.protocol.make_client_capabilities()
)
capabilities = cmp_nvim_lsp.default_capabilities()
}
end

Expand Down

0 comments on commit b4ac8ff

Please sign in to comment.