Update server config for new cmp_nvim_lsp version
parent
3431a96edb
commit
07a992164a
|
@ -2,7 +2,7 @@
|
||||||
-- - LSP servers common config -
|
-- - LSP servers common config -
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
local capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
local capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||||
|
|
||||||
local function on_attach(client, bufnr)
|
local function on_attach(client, bufnr)
|
||||||
-- Lsp keymaps
|
-- Lsp keymaps
|
||||||
|
@ -31,7 +31,9 @@ local function on_attach(client, bufnr)
|
||||||
vim.api.nvim_clear_autocmds({ buffer = bufnr, group = au_id })
|
vim.api.nvim_clear_autocmds({ buffer = bufnr, group = au_id })
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
group = au_id,
|
group = au_id,
|
||||||
callback = function() vim.lsp.buf.format() end,
|
callback = function()
|
||||||
|
vim.lsp.buf.format()
|
||||||
|
end,
|
||||||
buffer = bufnr,
|
buffer = bufnr,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue