fix vue lint

This commit is contained in:
Mathias Schneider
2026-08-20 08:10:49 +02:00
parent a2559ce0ca
commit 49f03bd7e1
2 changed files with 27 additions and 11 deletions
+24 -11
View File
@@ -42,7 +42,7 @@ return {
ensure_installed = {
"pyright", -- Python
"ts_ls", -- TypeScript/JavaScript
"vuels", -- Vue (Volar)
"vue_ls", -- Vue (Volar)
"jsonls", -- JSON
"yamlls", -- YAML
"html", -- HTML
@@ -95,6 +95,25 @@ return {
-- Type- and JavaScript
vim.lsp.config("ts_ls", {
filetypes = {
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
},
init_options = {
hostInfo = "neovim",
plugins = {
{
name = "@vue/typescript-plugin",
location = vim.fn.stdpath("data")
.. "/mason/packages/vue-language-server/node_modules/@vue/language-server",
languages = { "vue" },
configNamespace = "typescript",
},
},
},
settings = {
typescript = {
inlayHints = {
@@ -121,15 +140,9 @@ return {
},
})
-- Vue
vim.lsp.config("vuels", {
filetypes = { "vue" },
init_options = {
typescript = {
tsdk = vim.fn.getcwd() .. "/node_modules/typescript/lib",
},
},
})
-- Vue (Volar): bundled config in nvim-lspconfig provides cmd,
-- filetypes and tsserver/request forwarding to ts_ls (hybrid mode)
vim.lsp.config("vue_ls", {})
-- Other languages
vim.lsp.config("jsonls", {})
@@ -142,7 +155,7 @@ return {
vim.lsp.enable("lua_ls")
vim.lsp.enable("pyright")
vim.lsp.enable("ts_ls")
vim.lsp.enable("vuels")
vim.lsp.enable("vue_ls")
vim.lsp.enable("jsonls")
vim.lsp.enable("yamlls")
vim.lsp.enable("html")