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
This commit is contained in:
krovuxdev 2025-01-26 05:12:42 -05:00 committed by GitHub
parent b4d65bce97
commit e5bf88e5ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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 {

View File

@ -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