aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/server_configurations/graphql.lua
diff options
context:
space:
mode:
authorMichael Lingelbach <m.j.lbach@gmail.com>2021-12-10 10:22:10 -0800
committerGitHub <noreply@github.com>2021-12-10 10:22:10 -0800
commit026ab6bd54075cc8e095f9040f7912ffb708864d (patch)
tree38898842be3e84e5bed0f385fc177a5f05329ac9 /lua/lspconfig/server_configurations/graphql.lua
parentdocs: update server_configurations.md (diff)
parentchore(docs): add a section about windows shims (diff)
downloadnvim-lspconfig-026ab6bd54075cc8e095f9040f7912ffb708864d.tar
nvim-lspconfig-026ab6bd54075cc8e095f9040f7912ffb708864d.tar.gz
nvim-lspconfig-026ab6bd54075cc8e095f9040f7912ffb708864d.tar.bz2
nvim-lspconfig-026ab6bd54075cc8e095f9040f7912ffb708864d.tar.lz
nvim-lspconfig-026ab6bd54075cc8e095f9040f7912ffb708864d.tar.xz
nvim-lspconfig-026ab6bd54075cc8e095f9040f7912ffb708864d.tar.zst
nvim-lspconfig-026ab6bd54075cc8e095f9040f7912ffb708864d.zip
Merge pull request #1522 from kylo252/win-compat
Diffstat (limited to 'lua/lspconfig/server_configurations/graphql.lua')
-rw-r--r--lua/lspconfig/server_configurations/graphql.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/lua/lspconfig/server_configurations/graphql.lua b/lua/lspconfig/server_configurations/graphql.lua
index f4299e99..43fd23d2 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.*'),
},