mirror of
https://github.com/pnx/dotfiles
synced 2026-06-16 03:14:55 +02:00
nvim/lua/user/plugins/ide/lsp.lua: add support new nvim api (0.11+)
This commit is contained in:
parent
68cee9f48a
commit
36939b006a
1 changed files with 6 additions and 1 deletions
|
|
@ -117,7 +117,12 @@ return {
|
||||||
capabilities = capabilities
|
capabilities = capabilities
|
||||||
}, server_opts or {})
|
}, server_opts or {})
|
||||||
|
|
||||||
lspconfig[server].setup(server_opts)
|
if vim.fn.has('nvim-0.11') then
|
||||||
|
vim.lsp.config(server, server_opts)
|
||||||
|
vim.lsp.enable(server)
|
||||||
|
else
|
||||||
|
lspconfig[server].setup(server_opts)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local have_mason, mlsp = pcall(require, "mason-lspconfig")
|
local have_mason, mlsp = pcall(require, "mason-lspconfig")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue