Migrate for new vim.lsp.config API fron require("lspconfig")
This commit is contained in:
parent
b3032b57df
commit
7e149df236
1 changed files with 5 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
local lspconfig = require("lspconfig")
|
-- Using vim.lsp.config() instead of require('lspconfig') (nvim-lspconfig >= 0.11)
|
||||||
|
|
||||||
local keymap = vim.keymap
|
local keymap = vim.keymap
|
||||||
|
|
||||||
|
|
@ -147,9 +147,12 @@ for name, config in pairs(servers) do
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
}, config)
|
}, config)
|
||||||
|
|
||||||
lspconfig[name].setup(config)
|
vim.lsp.config(name, config)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Enable the configured servers
|
||||||
|
vim.lsp.enable(vim.tbl_keys(servers))
|
||||||
|
|
||||||
-- Here it is used the LSP server attaches to file
|
-- Here it is used the LSP server attaches to file
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
-- Grouping together autocommands.
|
-- Grouping together autocommands.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue