From 3df862b86b7b2919612134120b65c6d198de2153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Hamal=20Dvo=C5=99=C3=A1k?= Date: Tue, 29 Jul 2025 18:11:14 +0200 Subject: [PATCH] Use vtsls + vue_ls --- lua/init.lua | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/lua/init.lua b/lua/init.lua index 55dbd38..6b89c77 100644 --- a/lua/init.lua +++ b/lua/init.lua @@ -107,26 +107,33 @@ vim.lsp.config("hls", { local yarn_path = vim.fn.expand("$HOME/.config/yarn/global/node_modules") -vim.lsp.enable("ts_ls") -vim.lsp.config("ts_ls", { - init_options = { - plugins = { - { - name = "@vue/typescript-plugin", - location = yarn_path .. "/@vue/typescript-plugin", - languages = { "javascript", "typescript", "vue" }, +vim.lsp.enable("vtsls") +vim.lsp.config("vtsls", { + settings = { + vtsls = { + tsserver = { + globalPlugins = { + { + configNamespace = "typescript", + name = "@vue/typescript-plugin", + location = yarn_path .. "/@vue/typescript-plugin", + languages = { "vue" }, + }, + }, }, }, }, filetypes = { "javascript", + "javascriptreact", "typescript", + "typescriptreact", "vue", - }, + } }) -vim.lsp.enable("volar") -vim.lsp.config("volar", { +vim.lsp.enable("vue_ls") +vim.lsp.config("vue_ls", { init_options = { typescript = { tsdk = yarn_path .. "/typescript/lib",