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'
44-- in order to use your projects configured versions.
55-- This defaults to the vim cwd, but will get overwritten by the resolved root of the file.
66local 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 ])
88
99 return project_root and (project_root .. ' /node_modules' ) or ' '
1010end
Original file line number Diff line number Diff line change 11local util = require ' lspconfig.util'
22
33local 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 ])
55 return project_root and (project_root .. ' /typescript/lib' ) or ' '
66end
77
Original file line number Diff line number Diff line change 44 default_config = {
55 cmd = { ' glint-language-server' },
66 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 ])
88 -- Glint should not be installed globally.
99 local node_bin_path = project_root .. ' /node_modules/.bin'
1010 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 {
2323 },
2424 root_dir = util .root_pattern (' relay.config.*' , ' package.json' ),
2525 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 ])
2727 local node_bin_path = project_root .. ' /node_modules/.bin'
2828 local compiler_cmd = { node_bin_path .. ' /relay-compiler' , ' --watch' }
2929 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 11local util = require ' lspconfig.util'
22
33local 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 ])
55 return project_root and (project_root .. ' /typescript/lib' ) or ' '
66end
77
You can’t perform that action at this time.
0 commit comments