diff --git a/lua/lspconfig/server_configurations/angularls.lua b/lua/lspconfig/server_configurations/angularls.lua index 321c97cbbf..4d30de7128 100644 --- a/lua/lspconfig/server_configurations/angularls.lua +++ b/lua/lspconfig/server_configurations/angularls.lua @@ -11,16 +11,24 @@ end local default_probe_dir = get_probe_dir(vim.fn.getcwd()) +local bin_name = 'ngserver' +local args = { + '--stdio', + '--tsProbeLocations', + default_probe_dir, + '--ngProbeLocations', + default_probe_dir, +} + +local cmd = { bin_name, unpack(args) } + +if vim.fn.has 'win32' == 1 then + cmd = { 'cmd.exe', '/C', bin_name, unpack(args) } +end + return { default_config = { - cmd = { - 'ngserver', - '--stdio', - '--tsProbeLocations', - default_probe_dir, - '--ngProbeLocations', - default_probe_dir, - }, + cmd = cmd, filetypes = { 'typescript', 'html', 'typescriptreact', 'typescript.tsx' }, -- Check for angular.json or .git first since that is the root of the project. -- Don't check for tsconfig.json or package.json since there are multiple of these diff --git a/lua/lspconfig/server_configurations/ansiblels.lua b/lua/lspconfig/server_configurations/ansiblels.lua index 073119693b..5eb8e527c0 100644 --- a/lua/lspconfig/server_configurations/ansiblels.lua +++ b/lua/lspconfig/server_configurations/ansiblels.lua @@ -1,8 +1,15 @@ local util = require 'lspconfig.util' +local bin_name = 'ansible-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 = { 'ansible-language-server', '--stdio' }, + cmd = cmd, settings = { ansible = { python = { diff --git a/lua/lspconfig/server_configurations/bashls.lua b/lua/lspconfig/server_configurations/bashls.lua index 6aa8780e71..bae4318bd3 100644 --- a/lua/lspconfig/server_configurations/bashls.lua +++ b/lua/lspconfig/server_configurations/bashls.lua @@ -1,8 +1,15 @@ local util = require 'lspconfig.util' +local bin_name = 'bash-language-server' +local cmd = { bin_name, 'start' } + +if vim.fn.has 'win32' == 1 then + cmd = { 'cmd.exe', '/C', bin_name, 'start' } +end + return { default_config = { - cmd = { 'bash-language-server', 'start' }, + cmd = cmd, cmd_env = { -- Prevent recursive scanning which will cause issues when opening a file -- directly in the home directory (e.g. ~/foo.sh). diff --git a/lua/lspconfig/server_configurations/cssls.lua b/lua/lspconfig/server_configurations/cssls.lua index 21470d9157..41c38e6afe 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, diff --git a/lua/lspconfig/server_configurations/cucumber_language_server.lua b/lua/lspconfig/server_configurations/cucumber_language_server.lua index 1fb4b8a0f4..07832061fe 100644 --- a/lua/lspconfig/server_configurations/cucumber_language_server.lua +++ b/lua/lspconfig/server_configurations/cucumber_language_server.lua @@ -1,8 +1,15 @@ local util = require 'lspconfig.util' +local bin_name = 'cucumber-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 = { 'cucumber-language-server', '--stdio' }, + cmd = cmd, filetypes = { 'cucumber' }, root_dir = util.find_git_ancestor, }, diff --git a/lua/lspconfig/server_configurations/diagnosticls.lua b/lua/lspconfig/server_configurations/diagnosticls.lua index 4e1b8ee5df..8f0476b614 100644 --- a/lua/lspconfig/server_configurations/diagnosticls.lua +++ b/lua/lspconfig/server_configurations/diagnosticls.lua @@ -1,13 +1,15 @@ local util = require 'lspconfig.util' local bin_name = 'diagnostic-languageserver' +local cmd = { bin_name, '--stdio' } + if vim.fn.has 'win32' == 1 then - bin_name = bin_name .. '.cmd' + cmd = { 'cmd.exe', '/C', bin_name, '--stdio' } end return { default_config = { - cmd = { bin_name, '--stdio' }, + cmd = cmd, root_dir = util.find_git_ancestor, single_file_support = true, filetypes = {}, diff --git a/lua/lspconfig/server_configurations/dockerls.lua b/lua/lspconfig/server_configurations/dockerls.lua index 97376ea7a9..6d1cfc7d2f 100644 --- a/lua/lspconfig/server_configurations/dockerls.lua +++ b/lua/lspconfig/server_configurations/dockerls.lua @@ -1,8 +1,15 @@ local util = require 'lspconfig.util' +local bin_name = 'docker-langserver' +local cmd = { bin_name, '--stdio' } + +if vim.fn.has 'win32' == 1 then + cmd = { 'cmd.exe', '/C', bin_name, '--stdio' } +end + return { default_config = { - cmd = { 'docker-langserver', '--stdio' }, + cmd = cmd, filetypes = { 'dockerfile' }, root_dir = util.root_pattern 'Dockerfile', single_file_support = true, diff --git a/lua/lspconfig/server_configurations/dotls.lua b/lua/lspconfig/server_configurations/dotls.lua index 479f430637..dff14b9cd5 100644 --- a/lua/lspconfig/server_configurations/dotls.lua +++ b/lua/lspconfig/server_configurations/dotls.lua @@ -1,8 +1,15 @@ local util = require 'lspconfig.util' +local bin_name = 'dot-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 = { 'dot-language-server', '--stdio' }, + cmd = cmd, filetypes = { 'dot' }, root_dir = util.find_git_ancestor, single_file_support = true, diff --git a/lua/lspconfig/server_configurations/elmls.lua b/lua/lspconfig/server_configurations/elmls.lua index 2e4feca957..bac26550ad 100644 --- a/lua/lspconfig/server_configurations/elmls.lua +++ b/lua/lspconfig/server_configurations/elmls.lua @@ -3,6 +3,11 @@ local lsp = vim.lsp local api = vim.api local bin_name = 'elm-language-server' +local cmd = { bin_name } + +if vim.fn.has 'win32' == 1 then + cmd = { 'cmd.exe', '/C', bin_name } +end local default_capabilities = lsp.protocol.make_client_capabilities() default_capabilities.offsetEncoding = { 'utf-8', 'utf-16' } @@ -10,7 +15,7 @@ local elm_root_pattern = util.root_pattern 'elm.json' return { default_config = { - cmd = { bin_name }, + cmd = cmd, -- TODO(ashkan) if we comment this out, it will allow elmls to operate on elm.json. It seems like it could do that, but no other editor allows it right now. filetypes = { 'elm' }, root_dir = function(fname) diff --git a/lua/lspconfig/server_configurations/ember.lua b/lua/lspconfig/server_configurations/ember.lua index 98d01ad1c7..e6ce1eae76 100644 --- a/lua/lspconfig/server_configurations/ember.lua +++ b/lua/lspconfig/server_configurations/ember.lua @@ -1,8 +1,15 @@ local util = require 'lspconfig.util' +local bin_name = 'ember-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 = { 'ember-language-server', '--stdio' }, + cmd = cmd, filetypes = { 'handlebars', 'typescript', 'javascript' }, root_dir = util.root_pattern('ember-cli-build.js', '.git'), }, diff --git a/lua/lspconfig/server_configurations/emmet_ls.lua b/lua/lspconfig/server_configurations/emmet_ls.lua index 471f21f15d..9eed1feb49 100644 --- a/lua/lspconfig/server_configurations/emmet_ls.lua +++ b/lua/lspconfig/server_configurations/emmet_ls.lua @@ -1,8 +1,15 @@ local util = require 'lspconfig.util' +local bin_name = 'emmet-ls' +local cmd = { bin_name, '--stdio' } + +if vim.fn.has 'win32' == 1 then + cmd = { 'cmd.exe', '/C', bin_name, '--stdio' } +end + return { default_config = { - cmd = { 'emmet-ls', '--stdio' }, + cmd = cmd, filetypes = { 'html', 'css' }, root_dir = util.find_git_ancestor, }, diff --git a/lua/lspconfig/server_configurations/eslint.lua b/lua/lspconfig/server_configurations/eslint.lua index 5ddd3b4aad..db57fb5c93 100644 --- a/lua/lspconfig/server_configurations/eslint.lua +++ b/lua/lspconfig/server_configurations/eslint.lua @@ -43,9 +43,15 @@ local function fix_all(opts) end local bin_name = 'vscode-eslint-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 = { 'javascript', 'javascriptreact', diff --git a/lua/lspconfig/server_configurations/graphql.lua b/lua/lspconfig/server_configurations/graphql.lua index f4299e99ac..43fd23d217 100644 --- a/lua/lspconfig/server_configurations/graphql.lua +++ b/lua/lspconfig/server_configurations/graphql.lua @@ -1,8 +1,15 @@ local util = require 'lspconfig.util' +local bin_name = 'graphql-lsp' +local cmd = { bin_name, 'server', '-m', 'stream' } + +if vim.fn.has 'win32' == 1 then + cmd = { 'cmd.exe', '/C', bin_name, 'server', '-m', 'stream' } +end + return { default_config = { - cmd = { 'graphql-lsp', 'server', '-m', 'stream' }, + cmd = cmd, filetypes = { 'graphql', 'typescriptreact', 'javascriptreact' }, root_dir = util.root_pattern('.git', '.graphqlrc*', '.graphql.config.*', 'graphql.config.*'), }, diff --git a/lua/lspconfig/server_configurations/html.lua b/lua/lspconfig/server_configurations/html.lua index 8b6882d504..315143dd2c 100644 --- a/lua/lspconfig/server_configurations/html.lua +++ b/lua/lspconfig/server_configurations/html.lua @@ -1,10 +1,15 @@ local util = require 'lspconfig.util' local bin_name = 'vscode-html-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 = { 'html' }, root_dir = util.root_pattern('package.json', '.git'), single_file_support = true, diff --git a/lua/lspconfig/server_configurations/intelephense.lua b/lua/lspconfig/server_configurations/intelephense.lua index 3ab69b1b13..b422dae42e 100644 --- a/lua/lspconfig/server_configurations/intelephense.lua +++ b/lua/lspconfig/server_configurations/intelephense.lua @@ -1,8 +1,15 @@ local util = require 'lspconfig.util' +local bin_name = 'intelephense' +local cmd = { bin_name, '--stdio' } + +if vim.fn.has 'win32' == 1 then + cmd = { 'cmd.exe', '/C', bin_name, '--stdio' } +end + return { default_config = { - cmd = { 'intelephense', '--stdio' }, + cmd = cmd, filetypes = { 'php' }, root_dir = function(pattern) local cwd = vim.loop.cwd() diff --git a/lua/lspconfig/server_configurations/jsonls.lua b/lua/lspconfig/server_configurations/jsonls.lua index beed940a91..751702830d 100644 --- a/lua/lspconfig/server_configurations/jsonls.lua +++ b/lua/lspconfig/server_configurations/jsonls.lua @@ -1,13 +1,15 @@ local util = require 'lspconfig.util' local bin_name = 'vscode-json-language-server' +local cmd = { bin_name, '--stdio' } + if vim.fn.has 'win32' == 1 then - bin_name = bin_name .. '.cmd' + cmd = { 'cmd.exe', '/C', bin_name, '--stdio' } end return { default_config = { - cmd = { bin_name, '--stdio' }, + cmd = cmd, filetypes = { 'json' }, init_options = { provideFormatter = true, diff --git a/lua/lspconfig/server_configurations/lean3ls.lua b/lua/lspconfig/server_configurations/lean3ls.lua index cad9b12548..dc3872e8b5 100644 --- a/lua/lspconfig/server_configurations/lean3ls.lua +++ b/lua/lspconfig/server_configurations/lean3ls.lua @@ -1,8 +1,16 @@ local util = require 'lspconfig.util' +local bin_name = 'lean-language-server' +local args = { '--stdio', '--', '-M', '4096', '-T', '100000' } +local cmd = { bin_name, unpack(args) } + +if vim.fn.has 'win32' == 1 then + cmd = { 'cmd.exe', '/C', bin_name, unpack(args) } +end + return { default_config = { - cmd = { 'lean-language-server', '--stdio', '--', '-M', '4096', '-T', '100000' }, + cmd = cmd, filetypes = { 'lean3' }, root_dir = function(fname) -- check if inside elan stdlib diff --git a/lua/lspconfig/server_configurations/ocamlls.lua b/lua/lspconfig/server_configurations/ocamlls.lua index 8526f3e277..fcc25dbc51 100644 --- a/lua/lspconfig/server_configurations/ocamlls.lua +++ b/lua/lspconfig/server_configurations/ocamlls.lua @@ -1,8 +1,14 @@ local util = require 'lspconfig.util' +local bin_name = 'ocaml-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 = { 'ocaml-language-server', '--stdio' }, + cmd = cmd, filetypes = { 'ocaml', 'reason' }, root_dir = util.root_pattern('*.opam', 'esy.json', 'package.json'), }, diff --git a/lua/lspconfig/server_configurations/prismals.lua b/lua/lspconfig/server_configurations/prismals.lua index 96c12a869f..1cfb486fbe 100644 --- a/lua/lspconfig/server_configurations/prismals.lua +++ b/lua/lspconfig/server_configurations/prismals.lua @@ -1,13 +1,15 @@ local util = require 'lspconfig.util' local bin_name = 'prisma-language-server' +local cmd = { bin_name, '--stdio' } + if vim.fn.has 'win32' == 1 then - bin_name = bin_name .. '.cmd' + cmd = { 'cmd.exe', '/C', bin_name, '--stdio' } end return { default_config = { - cmd = { bin_name, '--stdio' }, + cmd = cmd, filetypes = { 'prisma' }, settings = { prisma = { diff --git a/lua/lspconfig/server_configurations/purescriptls.lua b/lua/lspconfig/server_configurations/purescriptls.lua index e5cef6be99..81524d5624 100644 --- a/lua/lspconfig/server_configurations/purescriptls.lua +++ b/lua/lspconfig/server_configurations/purescriptls.lua @@ -1,13 +1,15 @@ local util = require 'lspconfig.util' local bin_name = 'purescript-language-server' +local cmd = { bin_name, '--stdio' } + if vim.fn.has 'win32' == 1 then - bin_name = bin_name .. '.cmd' + cmd = { 'cmd.exe', '/C', bin_name, '--stdio' } end return { default_config = { - cmd = { bin_name, '--stdio' }, + cmd = cmd, filetypes = { 'purescript' }, root_dir = util.root_pattern('bower.json', 'psc-package.json', 'spago.dhall'), }, diff --git a/lua/lspconfig/server_configurations/pyright.lua b/lua/lspconfig/server_configurations/pyright.lua index ca2d815bd0..118241bb35 100644 --- a/lua/lspconfig/server_configurations/pyright.lua +++ b/lua/lspconfig/server_configurations/pyright.lua @@ -1,8 +1,10 @@ local util = require 'lspconfig.util' local bin_name = 'pyright-langserver' +local cmd = { bin_name, '--stdio' } + if vim.fn.has 'win32' == 1 then - bin_name = bin_name .. '.cmd' + cmd = { 'cmd.exe', '/C', bin_name, '--stdio' } end local root_files = { @@ -24,7 +26,7 @@ end return { default_config = { - cmd = { bin_name, '--stdio' }, + cmd = cmd, filetypes = { 'python' }, root_dir = util.root_pattern(unpack(root_files)), single_file_support = true, diff --git a/lua/lspconfig/server_configurations/rome.lua b/lua/lspconfig/server_configurations/rome.lua index 3e82be7b9b..7a8e9ceeec 100644 --- a/lua/lspconfig/server_configurations/rome.lua +++ b/lua/lspconfig/server_configurations/rome.lua @@ -1,8 +1,15 @@ local util = require 'lspconfig.util' +local bin_name = 'rome' +local cmd = { bin_name, 'lsp' } + +if vim.fn.has 'win32' == 1 then + cmd = { 'cmd.exe', '/C', bin_name, 'lsp' } +end + return { default_config = { - cmd = { 'rome', 'lsp' }, + cmd = cmd, filetypes = { 'javascript', 'javascriptreact', diff --git a/lua/lspconfig/server_configurations/solargraph.lua b/lua/lspconfig/server_configurations/solargraph.lua index 4ac0c55f8d..c07828126b 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, diff --git a/lua/lspconfig/server_configurations/stylelint_lsp.lua b/lua/lspconfig/server_configurations/stylelint_lsp.lua index f311b4103b..7dfc27aa3e 100644 --- a/lua/lspconfig/server_configurations/stylelint_lsp.lua +++ b/lua/lspconfig/server_configurations/stylelint_lsp.lua @@ -1,8 +1,15 @@ local util = require 'lspconfig.util' +local bin_name = 'stylelint-lsp' +local cmd = { bin_name, '--stdio' } + +if vim.fn.has 'win32' == 1 then + cmd = { 'cmd.exe', '/C', bin_name, '--stdio' } +end + return { default_config = { - cmd = { 'stylelint-lsp', '--stdio' }, + cmd = cmd, filetypes = { 'css', 'less', diff --git a/lua/lspconfig/server_configurations/svelte.lua b/lua/lspconfig/server_configurations/svelte.lua index ca2151b4eb..14db192589 100644 --- a/lua/lspconfig/server_configurations/svelte.lua +++ b/lua/lspconfig/server_configurations/svelte.lua @@ -1,13 +1,15 @@ local util = require 'lspconfig.util' local bin_name = 'svelteserver' +local cmd = { bin_name, '--stdio' } + if vim.fn.has 'win32' == 1 then - bin_name = bin_name .. '.cmd' + cmd = { 'cmd.exe', '/C', bin_name, '--stdio' } end return { default_config = { - cmd = { bin_name, '--stdio' }, + cmd = cmd, filetypes = { 'svelte' }, root_dir = util.root_pattern('package.json', '.git'), }, diff --git a/lua/lspconfig/server_configurations/tailwindcss.lua b/lua/lspconfig/server_configurations/tailwindcss.lua index e392bfaa53..dcdaa2931a 100644 --- a/lua/lspconfig/server_configurations/tailwindcss.lua +++ b/lua/lspconfig/server_configurations/tailwindcss.lua @@ -1,10 +1,15 @@ local util = require 'lspconfig.util' local bin_name = 'tailwindcss-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 copied and adjusted from tailwindcss-intellisense filetypes = { -- html diff --git a/lua/lspconfig/server_configurations/tsserver.lua b/lua/lspconfig/server_configurations/tsserver.lua index 553378a1c5..0f916fefc4 100644 --- a/lua/lspconfig/server_configurations/tsserver.lua +++ b/lua/lspconfig/server_configurations/tsserver.lua @@ -1,14 +1,16 @@ local util = require 'lspconfig.util' local bin_name = 'typescript-language-server' +local cmd = { bin_name, '--stdio' } + if vim.fn.has 'win32' == 1 then - bin_name = bin_name .. '.cmd' + cmd = { 'cmd.exe', '/C', bin_name, '--stdio' } end return { default_config = { init_options = { hostInfo = 'neovim' }, - cmd = { bin_name, '--stdio' }, + cmd = cmd, filetypes = { 'javascript', 'javascriptreact', diff --git a/lua/lspconfig/server_configurations/vimls.lua b/lua/lspconfig/server_configurations/vimls.lua index f8de086199..4f0d1d93bd 100644 --- a/lua/lspconfig/server_configurations/vimls.lua +++ b/lua/lspconfig/server_configurations/vimls.lua @@ -1,13 +1,15 @@ local util = require 'lspconfig.util' local bin_name = 'vim-language-server' +local cmd = { bin_name, '--stdio' } + if vim.fn.has 'win32' == 1 then - bin_name = bin_name .. '.cmd' + cmd = { 'cmd.exe', '/C', bin_name, '--stdio' } end return { default_config = { - cmd = { bin_name, '--stdio' }, + cmd = cmd, filetypes = { 'vim' }, root_dir = function(fname) return util.find_git_ancestor(fname) or vim.fn.getcwd() diff --git a/lua/lspconfig/server_configurations/volar.lua b/lua/lspconfig/server_configurations/volar.lua index 6c7d71ec28..21d65beb5e 100644 --- a/lua/lspconfig/server_configurations/volar.lua +++ b/lua/lspconfig/server_configurations/volar.lua @@ -46,9 +46,15 @@ local volar_init_options = { }, } +local bin_name = 'volar-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 = { 'volar-server', '--stdio' }, + cmd = cmd, filetypes = { 'vue' }, root_dir = util.root_pattern 'package.json', init_options = volar_init_options, diff --git a/lua/lspconfig/server_configurations/vuels.lua b/lua/lspconfig/server_configurations/vuels.lua index 1e2ecd99f0..0a689b3451 100644 --- a/lua/lspconfig/server_configurations/vuels.lua +++ b/lua/lspconfig/server_configurations/vuels.lua @@ -1,8 +1,15 @@ local util = require 'lspconfig.util' +local bin_name = 'vls' +local cmd = { bin_name } + +if vim.fn.has 'win32' == 1 then + cmd = { 'cmd.exe', '/C', bin_name } +end + return { default_config = { - cmd = { 'vls' }, + cmd = cmd, filetypes = { 'vue' }, root_dir = util.root_pattern('package.json', 'vue.config.js'), init_options = { diff --git a/lua/lspconfig/server_configurations/yamlls.lua b/lua/lspconfig/server_configurations/yamlls.lua index 91bb66c9c3..03dfba7c69 100644 --- a/lua/lspconfig/server_configurations/yamlls.lua +++ b/lua/lspconfig/server_configurations/yamlls.lua @@ -1,8 +1,15 @@ local util = require 'lspconfig.util' +local bin_name = 'yaml-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 = { 'yaml-language-server', '--stdio' }, + cmd = cmd, filetypes = { 'yaml', 'yaml.docker-compose' }, root_dir = util.find_git_ancestor, single_file_support = true,