From 34240ddad0f878d5f8821068fa9b92687710af22 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Sat, 10 Aug 2024 06:19:49 +0300 Subject: [PATCH] neovim: try to fix tsserver ls --- neovim/configs/language-server.nix | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/neovim/configs/language-server.nix b/neovim/configs/language-server.nix index 3e2eb33..057c99f 100644 --- a/neovim/configs/language-server.nix +++ b/neovim/configs/language-server.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ config, lib, pkgs, ... }: let inherit (lib.nix2lua) call; in { @@ -27,13 +27,17 @@ let inherit (lib.nix2lua) call; in }; tsserver = rec { filetypes = [ "javascript" "javascriptreact" "typescript" "typescriptreact" "vue" ]; - init_options.plugins = [ - { - name = "@vue/typescript-plugin"; - location = "./node_modules/@vue/typescript-plugin"; - languages = filetypes; - } - ]; + cmd = "${pkgs.nodePackages.typescript-language-server}/bin/typescript-language-server --stdio"; + init_options = { + plugins = [ + { + name = "@vue/typescript-plugin"; + location = "./node_modules/@vue/typescript-plugin"; + languages = filetypes; + } + ]; + tsserver.fallbackPath = "${pkgs.nodePackages.typescript}/lib/node_modules/typescript/lib"; + }; }; eslint = { on_attach = config.fn.lspconfig-eslint-on-attach.lambda;