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
+3
View File
@@ -64,6 +64,9 @@ vim.diagnostic.config({
float = { border = "rounded" }, float = { border = "rounded" },
}) })
-- Vue: semantic-token highlight for custom components
vim.api.nvim_set_hl(0, "@lsp.type.component", { link = "@type" })
-- ============================================================================ -- ============================================================================
-- STEP 5: GLOBAL KEYMAPS -- STEP 5: GLOBAL KEYMAPS
-- ============================================================================ -- ============================================================================
+24 -11
View File
@@ -42,7 +42,7 @@ return {
ensure_installed = { ensure_installed = {
"pyright", -- Python "pyright", -- Python
"ts_ls", -- TypeScript/JavaScript "ts_ls", -- TypeScript/JavaScript
"vuels", -- Vue (Volar) "vue_ls", -- Vue (Volar)
"jsonls", -- JSON "jsonls", -- JSON
"yamlls", -- YAML "yamlls", -- YAML
"html", -- HTML "html", -- HTML
@@ -95,6 +95,25 @@ return {
-- Type- and JavaScript -- Type- and JavaScript
vim.lsp.config("ts_ls", { 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 = { settings = {
typescript = { typescript = {
inlayHints = { inlayHints = {
@@ -121,15 +140,9 @@ return {
}, },
}) })
-- Vue -- Vue (Volar): bundled config in nvim-lspconfig provides cmd,
vim.lsp.config("vuels", { -- filetypes and tsserver/request forwarding to ts_ls (hybrid mode)
filetypes = { "vue" }, vim.lsp.config("vue_ls", {})
init_options = {
typescript = {
tsdk = vim.fn.getcwd() .. "/node_modules/typescript/lib",
},
},
})
-- Other languages -- Other languages
vim.lsp.config("jsonls", {}) vim.lsp.config("jsonls", {})
@@ -142,7 +155,7 @@ return {
vim.lsp.enable("lua_ls") vim.lsp.enable("lua_ls")
vim.lsp.enable("pyright") vim.lsp.enable("pyright")
vim.lsp.enable("ts_ls") vim.lsp.enable("ts_ls")
vim.lsp.enable("vuels") vim.lsp.enable("vue_ls")
vim.lsp.enable("jsonls") vim.lsp.enable("jsonls")
vim.lsp.enable("yamlls") vim.lsp.enable("yamlls")
vim.lsp.enable("html") vim.lsp.enable("html")