Skip to content

Commit e5bf88e

Browse files
authored
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
1 parent b4d65bc commit e5bf88e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lua/lspconfig/configs/astro.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ local util = require 'lspconfig.util'
22

33
local function get_typescript_server_path(root_dir)
44
local project_root = vim.fs.dirname(vim.fs.find('node_modules', { path = root_dir, upward = true })[1])
5-
return project_root and (project_root .. '/typescript/lib') or ''
5+
return project_root and (project_root .. '/node_modules/typescript/lib') or ''
66
end
77

88
return {

lua/lspconfig/configs/volar.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ local util = require 'lspconfig.util'
22

33
local function get_typescript_server_path(root_dir)
44
local project_root = vim.fs.dirname(vim.fs.find('node_modules', { path = root_dir, upward = true })[1])
5-
return project_root and (project_root .. '/typescript/lib') or ''
5+
return project_root and (project_root .. '/node_modules/typescript/lib') or ''
66
end
77

88
-- https://github.com/vuejs/language-tools/blob/master/packages/language-server/lib/types.ts

0 commit comments

Comments
 (0)