aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/configs/relay_lsp.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/lspconfig/configs/relay_lsp.lua')
-rw-r--r--lua/lspconfig/configs/relay_lsp.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/lspconfig/configs/relay_lsp.lua b/lua/lspconfig/configs/relay_lsp.lua
index 78ec20a0..cc8e2c5b 100644
--- a/lua/lspconfig/configs/relay_lsp.lua
+++ b/lua/lspconfig/configs/relay_lsp.lua
@@ -23,7 +23,7 @@ return {
},
root_dir = util.root_pattern('relay.config.*', 'package.json'),
on_new_config = function(config, root_dir)
- local project_root = vim.fs.find('node_modules', { path = root_dir, upward = true })[1]
+ local project_root = vim.fs.dirname(vim.fs.find('node_modules', { path = root_dir, upward = true })[1])
local node_bin_path = project_root .. '/node_modules/.bin'
local compiler_cmd = { node_bin_path .. '/relay-compiler', '--watch' }
local path = node_bin_path .. (vim.fn.has('win32') == 1 and ';' or ':') .. vim.env.PATH