summaryrefslogtreecommitdiff
path: root/lua/lang/graphql.lua
diff options
context:
space:
mode:
authorichigo-gyuunyuu <[email protected]>2021-07-21 01:03:15 +0530
committerGitHub <[email protected]>2021-07-21 00:03:15 +0430
commit0064b446a02be13dba0f16f084e073b347716710 (patch)
tree203f9907132b86c37733096bd139cf224b4dd1ad /lua/lang/graphql.lua
parent9e640fa4d99beeec97292a00a51b335960aa2b0f (diff)
[Feature] Allow for custom path to a language server binary (#1043)
Diffstat (limited to 'lua/lang/graphql.lua')
-rw-r--r--lua/lang/graphql.lua11
1 files changed, 9 insertions, 2 deletions
diff --git a/lua/lang/graphql.lua b/lua/lang/graphql.lua
index b6abfabd..601541a6 100644
--- a/lua/lang/graphql.lua
+++ b/lua/lang/graphql.lua
@@ -1,7 +1,11 @@
local M = {}
M.config = function()
- O.lang.graphql = {}
+ O.lang.graphql = {
+ lsp = {
+ path = "graphql-lsp",
+ },
+ }
end
M.format = function()
@@ -20,7 +24,10 @@ M.lsp = function()
end
-- npm install -g graphql-language-service-cli
- require("lspconfig").graphql.setup { on_attach = require("lsp").common_on_attach }
+ require("lspconfig").graphql.setup {
+ cmd = { O.lang.graphql.lsp.path, "server", "-m", "stream" },
+ on_attach = require("lsp").common_on_attach,
+ }
end
M.dap = function()