diff --git a/lua/lspconfig/configs/astro.lua b/lua/lspconfig/configs/astro.lua index ce54391bbe..a29ec1c1bf 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.find('node_modules', { path = root_dir, upward = true })[1] - return project_root and (util.path.join(project_root, 'node_modules', 'typescript', 'lib')) or '' + return project_root and (util.path.join(project_root, 'typescript', 'lib')) or '' end return { diff --git a/lua/lspconfig/configs/volar.lua b/lua/lspconfig/configs/volar.lua index d0fa2e4d63..7628238b77 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.find('node_modules', { path = root_dir, upward = true })[1] - return project_root and (util.path.join(project_root, 'node_modules', 'typescript', 'lib')) or '' + return project_root and (util.path.join(project_root, 'typescript', 'lib')) or '' end -- https://github.com/johnsoncodehk/volar/blob/20d713b/packages/shared/src/types.ts