diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 3570471..0d6dc95 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -83,6 +83,20 @@ return { on_attach = lsp_attach }) vim.lsp.config('ts_ls', { + capabilities = capabilities, + on_attach = lsp_attach, + filetypes = { "typescript", "javascript", "typescriptreact", "javascriptreact", "javascript.jsx", "typescript.tsx", "vue" }, + init_options = { + plugins = { { + name = '@vue/typescript-plugin', + location = vim.fn.expand(vim.fn.stdpath "data" .. + "/mason/packages/vue-language-server/node_modules/@vue/language-server"), + languages = { 'vue' }, + configNamespace = 'typescript' + } } + } + }) + vim.lsp.config('vue_ls', { capabilities = capabilities, on_attach = lsp_attach }) @@ -131,7 +145,7 @@ return { on_attach = lsp_attach }) vim.lsp.config('emmet_ls', { - filetypes = { "css", "html", "javascript", "typescript" }, + filetypes = { "css", "html" }, -- Read more about this options in the [vscode docs](https://code.visualstudio.com/docs/editor/emmet#_emmet-configuration). -- **Note:** only the options listed in the table are supported. init_options = { @@ -161,8 +175,9 @@ return { -- }) vim.lsp.config('clangd', { capabilities = capabilities, - on_attach = lsp_attach, + on_attach = lsp_attach }) + vim.lsp.enable({ 'ts_ls', 'vue_ls', 'clangd' }) end }, {