update lspconfig to 2.3.0

This commit is contained in:
2025-08-05 17:24:02 +03:00
parent 552536e87b
commit 17abcf48ae

View File

@@ -1,6 +1,6 @@
return {
'neovim/nvim-lspconfig',
tag = 'v1.0.0',
version = '^2.3.0',
dependencies = {
'williamboman/mason.nvim',
'williamboman/mason-lspconfig.nvim',
@@ -32,8 +32,10 @@ return {
require('fidget').setup({})
require('mason').setup({})
---@module 'mason-lspconfig'
---@type MasonLspconfigSettings
require('mason-lspconfig').setup({
automatic_installation = false,
automatic_enable = true,
-- Replace the language servers listed here
-- with the ones you want to install
ensure_installed = {
@@ -48,20 +50,18 @@ return {
'helm_ls',
'marksman',
},
handlers = {
function(server_name)
local capabilities = require('blink.cmp').get_lsp_capabilities()
require('lspconfig')[server_name].setup({
capabilities = capabilities
})
end,
}
})
local pythonLineLength = 95
lspconfig.pylsp.setup {
local lazydev = require('lazydev')
lazydev.setup()
vim.lsp.config('lua_ls', {
root_dir = function(bufnr, on_dir) on_dir(lazydev.find_workspace(bufnr)) end
})
---@type lspconfig.Config
vim.lsp.config('pylsp', {
settings = {
pylsp = {
['pylsp'] = {
plugins = {
autopep8 = {
enabled = false,
@@ -71,41 +71,38 @@ return {
},
pycodestyle = {
ignore = { 'W391' },
maxLineLength = pythonLineLength
maxLineLength = 95,
}
}
}
}
}
lspconfig.ansiblels.setup {}
lspconfig.lua_ls.setup {}
})
-- leave it until it works with lsp.config
lspconfig.helm_ls.setup {
settings = {
['helm-ls'] = {
yamlls = {
path = 'yaml-language-server',
enabled = false,
path = "yaml-language-server",
}
}
}
}
-- vim.lsp.config('helm-ls', {
-- settings = {
-- ['helm-ls'] = {
-- yamlls = {
-- path = "yaml-language-server",
-- enabled = false,
-- }
-- }
-- }
-- })
lspconfig.yamlls.setup {}
lspconfig.helm_ls.setup {
settings = {
['helm-ls'] = {
yamlls = {
enabled = false
}
}
}
}
lspconfig.terraformls.setup {
vim.lsp.config('terraformls', {
filetypes = { 'terraform', 'terraform-vars', 'tf' }
}
})
end
}