optimize configurations, add json, svelte
This commit is contained in:
@ -16,7 +16,7 @@
|
|||||||
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
|
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
|
||||||
"menu": { "branch": "main", "commit": "7a0a4a2896b715c066cfbe320bdc048091874cc6" },
|
"menu": { "branch": "main", "commit": "7a0a4a2896b715c066cfbe320bdc048091874cc6" },
|
||||||
"minty": { "branch": "main", "commit": "aafc9e8e0afe6bf57580858a2849578d8d8db9e0" },
|
"minty": { "branch": "main", "commit": "aafc9e8e0afe6bf57580858a2849578d8d8db9e0" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "7cd18e73cfbd70e1546931b7268b3eebaeff9391" },
|
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "4d74e75913832866aa7de35e4202463ddf6efd1b" },
|
"nvim-autopairs": { "branch": "master", "commit": "4d74e75913832866aa7de35e4202463ddf6efd1b" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "ea82027c3447dc1a022be9a9884de276c05cd33a" },
|
"nvim-dap": { "branch": "master", "commit": "ea82027c3447dc1a022be9a9884de276c05cd33a" },
|
||||||
|
@ -3,7 +3,7 @@ require("nvchad.configs.lspconfig").defaults()
|
|||||||
local lspconfig = require "lspconfig"
|
local lspconfig = require "lspconfig"
|
||||||
local nvlsp = require "nvchad.configs.lspconfig"
|
local nvlsp = require "nvchad.configs.lspconfig"
|
||||||
|
|
||||||
local servers = { "html", "cssls", "jdtls", "clangd", "gopls", "eslint" }
|
local servers = { "html", "cssls", "jdtls", "clangd", "gopls", "eslint", "stylelint_lsp", "jsonls", "svelte", "volar" }
|
||||||
|
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
lspconfig[lsp].setup {
|
lspconfig[lsp].setup {
|
||||||
@ -13,30 +13,29 @@ for _, lsp in ipairs(servers) do
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
lspconfig.ts_ls.setup {
|
lspconfig["tailwindcss"].setup {
|
||||||
on_attach = nvlsp.on_attach,
|
on_attach = nvlsp.on_attach,
|
||||||
on_init = nvlsp.on_init,
|
on_init = nvlsp.on_init,
|
||||||
capabilities = nvlsp.capabilities,
|
capabilities = nvlsp.capabilities,
|
||||||
init_options = {
|
settings = {
|
||||||
plugins = {
|
validate = true,
|
||||||
{
|
filetypes = { "svelte" },
|
||||||
name = "@vue/typescript-plugin",
|
|
||||||
location = "",
|
|
||||||
languages = { "vue" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
filetypes = { "typescript", "javascript", "javascriptreact", "typescriptreact", "vue" },
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lspconfig.volar.setup {
|
local ymlCapabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
ymlCapabilities.textDocument.foldingRange = {
|
||||||
|
dynamicRegistration = false,
|
||||||
|
lineFoldingOnly = true,
|
||||||
|
}
|
||||||
|
|
||||||
|
lspconfig.yamlls.setup {
|
||||||
on_attach = nvlsp.on_attach,
|
on_attach = nvlsp.on_attach,
|
||||||
on_init = nvlsp.on_init,
|
on_init = nvlsp.on_init,
|
||||||
capabilities = nvlsp.capabilities,
|
capabilities = ymlCapabilities,
|
||||||
init_options = {
|
settings = {
|
||||||
vue = {
|
yaml = {
|
||||||
hybridMode = true,
|
schemas = {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
filetypes = { "vue" },
|
|
||||||
}
|
}
|
||||||
|
@ -37,18 +37,6 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
|
||||||
"williamboman/mason.nvim",
|
|
||||||
opts = {
|
|
||||||
ensure_installed = {
|
|
||||||
-- your existing tools
|
|
||||||
"vue-language-server",
|
|
||||||
"typescript-language-server",
|
|
||||||
"eslint-lsp",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
require "plugins.java.init",
|
require "plugins.java.init",
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user