Skip to content

Commit

Permalink
fix(volar & astro): remove duplicate node_modules (#3497)
Browse files Browse the repository at this point in the history
fix #3496
  • Loading branch information
Parsifa1 authored Dec 9, 2024
1 parent fc16fd4 commit b8b7256
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lua/lspconfig/configs/astro.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion lua/lspconfig/configs/volar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b8b7256

Please sign in to comment.