From 513f4f0bde469ecb3abe2e1b606f63cf142e751e Mon Sep 17 00:00:00 2001 From: dundargoc Date: Wed, 22 Jan 2025 14:20:49 +0100 Subject: fix: fix incorrect root finding --- lua/lspconfig/configs/relay_lsp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua/lspconfig/configs/relay_lsp.lua') 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 -- cgit v1.2.3-70-g09d2