neovim: use vue-language-server and drop vtsls due to poor support in vue

This commit is contained in:
Alexandre Cavalheiro S. Tiago da Silva 2024-08-01 10:55:44 -03:00
parent 03e8eaf451
commit c693a00cd4
Signed by: wizardlink
GPG key ID: A5767B54367CFBDF
2 changed files with 20 additions and 4 deletions

View file

@ -34,7 +34,7 @@
nixfmt-rfc-style nixfmt-rfc-style
# TypeScript # TypeScript
(callPackage ../vtsls/package.nix { }) typescript-language-server
# Rust # Rust
rust-analyzer rust-analyzer
@ -42,7 +42,7 @@
vscode-extensions.vadimcn.vscode-lldb.adapter vscode-extensions.vadimcn.vscode-lldb.adapter
# Vue # Vue
vscode-extensions.vue.volar vue-language-server
# Svelte # Svelte
nodePackages.svelte-language-server nodePackages.svelte-language-server

View file

@ -60,7 +60,7 @@ return {
"svelte", "svelte",
"taplo", "taplo",
"volar", "volar",
"vtsls", "tsserver",
"yamlls", "yamlls",
}, },
-- customize language server configuration options passed to `lspconfig` -- customize language server configuration options passed to `lspconfig`
@ -72,7 +72,7 @@ return {
nixd = { nixd = {
options = { options = {
nixos = { nixos = {
expr = '(builtins.getFlake ("git+file:///home/wizardlink/.system")).nixosConfigurations.nixos.options', expr = '(builtins.getFlake ("git+file:///home/wizardlink/.system")).nixosConfigurations.wizdesk.options',
}, },
home_manager = { home_manager = {
expr = expr =
@ -82,6 +82,22 @@ return {
}, },
}, },
}, },
tsserver = {
init_options = {
plugins = {
{
name = "@vue/typescript-plugin",
location = {}, -- Means we need @vue/typescript-plugin in node_modules
languages = { "javascript", "typescript", "vue" },
},
},
},
filetypes = {
"javascript",
"typescript",
"vue",
},
},
}, },
-- customize how language servers are attached -- customize how language servers are attached
handlers = { handlers = {