diff --git a/pkgs/nvim/config/languages/typescript-tools-nvim.nix b/pkgs/nvim/config/languages/typescript-tools-nvim.nix index 8134073..809cae4 100644 --- a/pkgs/nvim/config/languages/typescript-tools-nvim.nix +++ b/pkgs/nvim/config/languages/typescript-tools-nvim.nix @@ -1,6 +1,6 @@ { plugins.typescript-tools = { - enable = true; + enable = false; onAttach = '' function(client, bufnr) client.server_capabilities.documentFormattingProvider = false @@ -23,6 +23,9 @@ includeInlayFunctionLikeReturnTypeHints = true; includeInlayEnumMemberValueHints = true; }; + tsserverPlugins = [ + "@vue/typescript-plugin" + ]; }; }; diff --git a/pkgs/nvim/config/lsp/lsp.nix b/pkgs/nvim/config/lsp/lsp.nix index 59fc267..b89c90f 100644 --- a/pkgs/nvim/config/lsp/lsp.nix +++ b/pkgs/nvim/config/lsp/lsp.nix @@ -1,4 +1,8 @@ -{icons, ...}: { +{ + pkgs, + icons, + ... +}: { plugins = { lsp-format = { enable = false; # Enable it if you want lsp-format integration for none-ls @@ -26,8 +30,8 @@ }; nil-ls = {enable = true;}; tsserver = { - enable = false; - filetypes = ["javascript" "javascriptreact" "typescript" "typescriptreact"]; + enable = true; + filetypes = ["javascript" "javascriptreact" "typescript" "typescriptreact" "vue"]; extraOptions = { settings = { javascript = { @@ -53,10 +57,23 @@ }; }; }; + init_options = { + plugins = [ + { + name = "@vue/typescript-plugin"; + location = "${pkgs.vue-language-server}/lib/node_modules/@vue/language-server"; + languages = ["javascript" "typescript" "vue"]; + } + ]; + }; }; }; astro = {enable = true;}; - volar = {enable = true;}; + volar = { + enable = true; + package = pkgs.vue-language-server; + rootDir = ''require("lspconfig.util").root_pattern("src/App.vue")''; + }; svelte = {enable = true;}; eslint = {enable = true;}; pyright = {enable = true;}; diff --git a/pkgs/nvim/config/none-ls/none-ls.nix b/pkgs/nvim/config/none-ls/none-ls.nix index 9e3d8f9..1565a15 100644 --- a/pkgs/nvim/config/none-ls/none-ls.nix +++ b/pkgs/nvim/config/none-ls/none-ls.nix @@ -38,6 +38,7 @@ }; prettier = { enable = true; + disableTsServerFormatter = true; }; google_java_format = { enable = true;