File tree Expand file tree Collapse file tree 5 files changed +5
-5
lines changed Expand file tree Collapse file tree 5 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ local util = require 'lspconfig.util'
4
4
-- in order to use your projects configured versions.
5
5
-- This defaults to the vim cwd, but will get overwritten by the resolved root of the file.
6
6
local function get_probe_dir (root_dir )
7
- local project_root = vim .fs .find (' node_modules' , { path = root_dir , upward = true })[1 ]
7
+ local project_root = vim .fs .dirname ( vim . fs . find (' node_modules' , { path = root_dir , upward = true })[1 ])
8
8
9
9
return project_root and (project_root .. ' /node_modules' ) or ' '
10
10
end
Original file line number Diff line number Diff line change 1
1
local util = require ' lspconfig.util'
2
2
3
3
local function get_typescript_server_path (root_dir )
4
- local project_root = vim .fs .find (' node_modules' , { path = root_dir , upward = true })[1 ]
4
+ local project_root = vim .fs .dirname ( vim . fs . find (' node_modules' , { path = root_dir , upward = true })[1 ])
5
5
return project_root and (project_root .. ' /typescript/lib' ) or ' '
6
6
end
7
7
Original file line number Diff line number Diff line change 4
4
default_config = {
5
5
cmd = { ' glint-language-server' },
6
6
on_new_config = function (config , new_root_dir )
7
- local project_root = vim .fs .find (' node_modules' , { path = new_root_dir , upward = true })[1 ]
7
+ local project_root = vim .fs .dirname ( vim . fs . find (' node_modules' , { path = new_root_dir , upward = true })[1 ])
8
8
-- Glint should not be installed globally.
9
9
local node_bin_path = project_root .. ' /node_modules/.bin'
10
10
local path = node_bin_path .. (vim .fn .has (' win32' ) == 1 and ' ;' or ' :' ) .. vim .env .PATH
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ return {
23
23
},
24
24
root_dir = util .root_pattern (' relay.config.*' , ' package.json' ),
25
25
on_new_config = function (config , root_dir )
26
- local project_root = vim .fs .find (' node_modules' , { path = root_dir , upward = true })[1 ]
26
+ local project_root = vim .fs .dirname ( vim . fs . find (' node_modules' , { path = root_dir , upward = true })[1 ])
27
27
local node_bin_path = project_root .. ' /node_modules/.bin'
28
28
local compiler_cmd = { node_bin_path .. ' /relay-compiler' , ' --watch' }
29
29
local path = node_bin_path .. (vim .fn .has (' win32' ) == 1 and ' ;' or ' :' ) .. vim .env .PATH
Original file line number Diff line number Diff line change 1
1
local util = require ' lspconfig.util'
2
2
3
3
local function get_typescript_server_path (root_dir )
4
- local project_root = vim .fs .find (' node_modules' , { path = root_dir , upward = true })[1 ]
4
+ local project_root = vim .fs .dirname ( vim . fs . find (' node_modules' , { path = root_dir , upward = true })[1 ])
5
5
return project_root and (project_root .. ' /typescript/lib' ) or ' '
6
6
end
7
7
You can’t perform that action at this time.
0 commit comments