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/cssls.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lua/lspconfig/server_configurations/cssls.lua') diff --git a/lua/lspconfig/server_configurations/cssls.lua b/lua/lspconfig/server_configurations/cssls.lua index 21470d91..41c38e6a 100644 --- a/lua/lspconfig/server_configurations/cssls.lua +++ b/lua/lspconfig/server_configurations/cssls.lua @@ -1,10 +1,15 @@ local util = require 'lspconfig.util' local bin_name = 'vscode-css-language-server' +local cmd = { bin_name, '--stdio' } + +if vim.fn.has 'win32' == 1 then + cmd = { 'cmd.exe', '/C', bin_name, '--stdio' } +end return { default_config = { - cmd = { bin_name, '--stdio' }, + cmd = cmd, filetypes = { 'css', 'scss', 'less' }, root_dir = util.root_pattern('package.json', '.git'), single_file_support = true, -- cgit v1.2.3-70-g09d2