update
This commit is contained in:
parent
a0049b8e06
commit
ed3cabf8b0
6 changed files with 119 additions and 8 deletions
36
lua/plugins/lsp.lua
Normal file
36
lua/plugins/lsp.lua
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = {
|
||||
"folke/neoconf.nvim",
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
},
|
||||
config = function()
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
local servers = {
|
||||
lua_ls = {
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = { globals = { "vim" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
ts_ls = {},
|
||||
html = {},
|
||||
cssls = {},
|
||||
jsonls = {},
|
||||
bashls = {},
|
||||
marksman = {},
|
||||
intelephense = {},
|
||||
}
|
||||
|
||||
for name, opts in pairs(servers) do
|
||||
local ok, mod = pcall(require, "lspconfig." .. name)
|
||||
if ok and mod and type(mod.setup) == "function" then
|
||||
opts = vim.tbl_deep_extend("force", { capabilities = capabilities }, opts or {})
|
||||
mod.setup(opts)
|
||||
end
|
||||
end
|
||||
end,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue