Skip to content

Commit

Permalink
Breaking change: Use default_capabilities in cmp-nvim-lsp
Browse files Browse the repository at this point in the history
  • Loading branch information
alkaloidbit committed Oct 15, 2022
1 parent ef32150 commit e9ad0e9
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions lua/plugins/lspconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
-- https://github.com/kosayoda/nvim-lightbulb
-- rafi settings

local capabilities = require("cmp_nvim_lsp").default_capabilities()
-- Buffer attached
local on_attach = function(client, bufnr)
-- Enable completion triggerd by <C-x><C-o>
Expand Down Expand Up @@ -89,7 +90,6 @@ local on_attach = function(client, bufnr)
zindex = 50,
}, bufnr)

local capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities())

if client.config.flags then
client.config.flags.allow_incremental_sync = true
Expand Down Expand Up @@ -123,7 +123,7 @@ local function make_config(server_name)
lineFoldingOnly = true,
}
end
c.capabilities = require("cmp_nvim_lsp").update_capabilities(cap)
c.capabilities = capabilities

-- Merge user-defined lsp settings.
-- These can be overridden locally by lua/lsp-local/<server_name>.lua
Expand Down Expand Up @@ -197,13 +197,14 @@ local function setup()
-- }
-- )

local lsp = {
float = {
focusable = false,
style = "minimal",
border = "rounded",
},
}
-- local lsp = {
-- float = {
-- focusable = false,
-- style = "minimal",
-- border = "rounded",
-- },
-- }

-- Configure help hover (normal K) handler
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "rounded" })

Expand Down

0 comments on commit e9ad0e9

Please sign in to comment.