mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-21 16:39:06 +02:00
refactor(lsp)!: move servers to lspconfig plugin spec
This commit is contained in:
parent
8f782709d8
commit
ef78153afa
2 changed files with 17 additions and 29 deletions
|
@ -11,7 +11,21 @@ return {
|
|||
"hrsh7th/cmp-nvim-lsp",
|
||||
},
|
||||
---@type lspconfig.options
|
||||
servers = nil,
|
||||
servers = {
|
||||
jsonls = {},
|
||||
sumneko_lua = {
|
||||
settings = {
|
||||
Lua = {
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
},
|
||||
completion = {
|
||||
callSnippet = "Replace",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function(plugin)
|
||||
-- setup formatting and keymaps
|
||||
require("lazyvim.util").on_attach(function(client, buffer)
|
||||
|
@ -31,8 +45,8 @@ return {
|
|||
severity_sort = true,
|
||||
})
|
||||
|
||||
-- lspconfig
|
||||
local servers = plugin.servers or require("lazyvim.plugins.lsp.servers")
|
||||
---@type lspconfig.options
|
||||
local servers = plugin.servers or {}
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
|
||||
require("mason-lspconfig").setup({ ensure_installed = vim.tbl_keys(servers) })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue