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
# TypeScript
(callPackage ../vtsls/package.nix { })
typescript-language-server
# Rust
rust-analyzer
@ -42,7 +42,7 @@
vscode-extensions.vadimcn.vscode-lldb.adapter
# Vue
vscode-extensions.vue.volar
vue-language-server
# Svelte
nodePackages.svelte-language-server

View file

@ -60,7 +60,7 @@ return {
"svelte",
"taplo",
"volar",
"vtsls",
"tsserver",
"yamlls",
},
-- customize language server configuration options passed to `lspconfig`
@ -72,7 +72,7 @@ return {
nixd = {
options = {
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 = {
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
handlers = {