feat: use installed lsp instead of fixed list
This commit is contained in:
parent
06506cb84e
commit
99a33912bb
4 changed files with 53 additions and 22 deletions
|
|
@ -3,12 +3,11 @@ local options = {
|
|||
lua = { "stylua" },
|
||||
css = { "prettier" },
|
||||
html = { "prettier" },
|
||||
typescript = { { "eslint", "prettier" } },
|
||||
typescript = { "prettier" },
|
||||
typescriptreact = { "prettier" },
|
||||
javascript = { "prettier" },
|
||||
javascriptreact = { "prettier" },
|
||||
json = { "prettier" },
|
||||
-- rust = { "rustfmt" },
|
||||
},
|
||||
|
||||
format_on_save = {
|
||||
|
|
|
|||
|
|
@ -1,21 +1,2 @@
|
|||
-- load defaults i.e lua_lsp
|
||||
require("nvchad.configs.lspconfig").defaults()
|
||||
|
||||
local servers = {
|
||||
html = {},
|
||||
cssls = {},
|
||||
clangd = {},
|
||||
ts_ls = {},
|
||||
tailwindcss = {},
|
||||
jdtls = {},
|
||||
texlab = {},
|
||||
jsonls = {},
|
||||
dartls = {},
|
||||
rust_analyzer = {},
|
||||
yamlls = {},
|
||||
}
|
||||
|
||||
for name, opts in pairs(servers) do
|
||||
vim.lsp.enable(name)
|
||||
vim.lsp.config(name, opts)
|
||||
end
|
||||
|
|
|
|||
12
lua/custom/plugins/mason-lspconfig.lua
Normal file
12
lua/custom/plugins/mason-lspconfig.lua
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
return {
|
||||
"mason-org/mason-lspconfig.nvim",
|
||||
lazy = false,
|
||||
opts = {},
|
||||
dependencies = {
|
||||
{ "mason-org/mason.nvim", opts = {} },
|
||||
"neovim/nvim-lspconfig",
|
||||
},
|
||||
config = function()
|
||||
require("mason-lspconfig").setup()
|
||||
end,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue