diff options
Diffstat (limited to 'lua/nvim-lsp-installer/servers/graphql.lua')
| -rw-r--r-- | lua/nvim-lsp-installer/servers/graphql.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lua/nvim-lsp-installer/servers/graphql.lua b/lua/nvim-lsp-installer/servers/graphql.lua new file mode 100644 index 00000000..1728e81e --- /dev/null +++ b/lua/nvim-lsp-installer/servers/graphql.lua @@ -0,0 +1,16 @@ +local util = require('lspconfig.util') + +local server = require('nvim-lsp-installer.server') + +local root_dir = server.get_server_root_path('graphql') + +return server.Server:new { + name = "graphql", + root_dir = root_dir, + install_cmd = [[npm install graphql-language-service-cli@latest graphql]], + default_options = { + cmd = { root_dir .. "/node_modules/.bin/graphql-lsp", "server", "-m", "stream" }, + filetypes = { 'typescriptreact', 'javascriptreact', 'graphql' }, + root_dir = util.root_pattern('.git', '.graphqlrc'), + }, +} |
