From e5bf88e5ea1c4cea5ea96b1e970cb264f7a401a1 Mon Sep 17 00:00:00 2001 From: krovuxdev <62192487+krovuxdev@users.noreply.github.com> Date: Sun, 26 Jan 2025 05:12:42 -0500 Subject: fix(astro,volar): correct 'typescript/lib' path for TypeScript LSP initialization (#3585) * fix(astro): correct path to locate typescript/lib in Neovim * fix(volar): correct path to locate typescript/lib in Neovim --- lua/lspconfig/configs/astro.lua | 2 +- lua/lspconfig/configs/volar.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lua') diff --git a/lua/lspconfig/configs/astro.lua b/lua/lspconfig/configs/astro.lua index 23c3f760..106d247f 100644 --- a/lua/lspconfig/configs/astro.lua +++ b/lua/lspconfig/configs/astro.lua @@ -2,7 +2,7 @@ local util = require 'lspconfig.util' local function get_typescript_server_path(root_dir) local project_root = vim.fs.dirname(vim.fs.find('node_modules', { path = root_dir, upward = true })[1]) - return project_root and (project_root .. '/typescript/lib') or '' + return project_root and (project_root .. '/node_modules/typescript/lib') or '' end return { diff --git a/lua/lspconfig/configs/volar.lua b/lua/lspconfig/configs/volar.lua index b180f1a9..ff52aed5 100644 --- a/lua/lspconfig/configs/volar.lua +++ b/lua/lspconfig/configs/volar.lua @@ -2,7 +2,7 @@ local util = require 'lspconfig.util' local function get_typescript_server_path(root_dir) local project_root = vim.fs.dirname(vim.fs.find('node_modules', { path = root_dir, upward = true })[1]) - return project_root and (project_root .. '/typescript/lib') or '' + return project_root and (project_root .. '/node_modules/typescript/lib') or '' end -- https://github.com/vuejs/language-tools/blob/master/packages/language-server/lib/types.ts -- cgit v1.2.3-70-g09d2