update lspconfig to 2.3.0
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
return {
|
return {
|
||||||
'neovim/nvim-lspconfig',
|
'neovim/nvim-lspconfig',
|
||||||
tag = 'v1.0.0',
|
version = '^2.3.0',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'williamboman/mason.nvim',
|
'williamboman/mason.nvim',
|
||||||
'williamboman/mason-lspconfig.nvim',
|
'williamboman/mason-lspconfig.nvim',
|
||||||
@@ -32,8 +32,10 @@ return {
|
|||||||
|
|
||||||
require('fidget').setup({})
|
require('fidget').setup({})
|
||||||
require('mason').setup({})
|
require('mason').setup({})
|
||||||
|
---@module 'mason-lspconfig'
|
||||||
|
---@type MasonLspconfigSettings
|
||||||
require('mason-lspconfig').setup({
|
require('mason-lspconfig').setup({
|
||||||
automatic_installation = false,
|
automatic_enable = true,
|
||||||
-- Replace the language servers listed here
|
-- Replace the language servers listed here
|
||||||
-- with the ones you want to install
|
-- with the ones you want to install
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
@@ -48,20 +50,18 @@ return {
|
|||||||
'helm_ls',
|
'helm_ls',
|
||||||
'marksman',
|
'marksman',
|
||||||
},
|
},
|
||||||
handlers = {
|
|
||||||
function(server_name)
|
|
||||||
local capabilities = require('blink.cmp').get_lsp_capabilities()
|
|
||||||
require('lspconfig')[server_name].setup({
|
|
||||||
capabilities = capabilities
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
local pythonLineLength = 95
|
local lazydev = require('lazydev')
|
||||||
lspconfig.pylsp.setup {
|
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 = {
|
settings = {
|
||||||
pylsp = {
|
['pylsp'] = {
|
||||||
plugins = {
|
plugins = {
|
||||||
autopep8 = {
|
autopep8 = {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
@@ -71,41 +71,38 @@ return {
|
|||||||
},
|
},
|
||||||
pycodestyle = {
|
pycodestyle = {
|
||||||
ignore = { 'W391' },
|
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 {
|
lspconfig.helm_ls.setup {
|
||||||
settings = {
|
settings = {
|
||||||
['helm-ls'] = {
|
['helm-ls'] = {
|
||||||
yamlls = {
|
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 {}
|
vim.lsp.config('terraformls', {
|
||||||
lspconfig.helm_ls.setup {
|
|
||||||
settings = {
|
|
||||||
['helm-ls'] = {
|
|
||||||
yamlls = {
|
|
||||||
enabled = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
lspconfig.terraformls.setup {
|
|
||||||
filetypes = { 'terraform', 'terraform-vars', 'tf' }
|
filetypes = { 'terraform', 'terraform-vars', 'tf' }
|
||||||
}
|
})
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user