From 4a69ad6646eaad752901413c9a0dced73dfb562d Mon Sep 17 00:00:00 2001 From: Raphael Date: Tue, 9 May 2023 15:10:14 +0800 Subject: fix: use exepath on server command (#2595) --- lua/lspconfig/server_configurations/turtle_ls.lua | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'lua/lspconfig/server_configurations/turtle_ls.lua') diff --git a/lua/lspconfig/server_configurations/turtle_ls.lua b/lua/lspconfig/server_configurations/turtle_ls.lua index 0e58e956..21624a82 100644 --- a/lua/lspconfig/server_configurations/turtle_ls.lua +++ b/lua/lspconfig/server_configurations/turtle_ls.lua @@ -12,7 +12,7 @@ if bin_path == nil then local path = os.getenv 'PATH' if path ~= nil then for str in string.gmatch(path, '([^' .. sep .. ']+)') do - table.insert(paths, str) + paths[#paths + 1] = str end end for _, p in ipairs(paths) do @@ -26,15 +26,9 @@ else full_path = util.path.join(bin_path, bin_name) end -local cmd = { 'node', full_path, '--stdio' } - -if vim.fn.has 'win32' == 1 then - cmd = { 'cmd.exe', '/C', 'node', full_path, '--stdio' } -end - return { default_config = { - cmd = cmd, + cmd = { 'node', full_path, '--stdio' }, filetypes = { 'turtle', 'ttl' }, root_dir = function(fname) return util.find_git_ancestor(fname) -- cgit v1.2.3-70-g09d2