From a2719a8723e503f1be89d9b1c334846de405eb23 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Wed, 1 Dec 2021 09:03:10 +0100 Subject: fix(npm): resolve the command correctly on windows --- lua/lspconfig/server_configurations/solargraph.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lua/lspconfig/server_configurations/solargraph.lua') diff --git a/lua/lspconfig/server_configurations/solargraph.lua b/lua/lspconfig/server_configurations/solargraph.lua index 4ac0c55f..c0782812 100644 --- a/lua/lspconfig/server_configurations/solargraph.lua +++ b/lua/lspconfig/server_configurations/solargraph.lua @@ -1,13 +1,15 @@ local util = require 'lspconfig.util' local bin_name = 'solargraph' +local cmd = { bin_name, '--stdio' } + if vim.fn.has 'win32' == 1 then - bin_name = bin_name .. '.bat' + cmd = { 'cmd.exe', '/C', bin_name, '--stdio' } end return { default_config = { - cmd = { bin_name, 'stdio' }, + cmd = cmd, settings = { solargraph = { diagnostics = true, -- cgit v1.2.3-70-g09d2