diff options
| author | Michael Lingelbach <m.j.lbach@gmail.com> | 2021-01-27 11:14:25 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-27 11:14:25 -0800 |
| commit | d9001935a45dbd5911ecf062bcb321f7c0e7c732 (patch) | |
| tree | 3c20994cfad79538d6c66e89ddc526df7076dc75 /lua/lspconfig/graphql.lua | |
| parent | [docgen] Update CONFIG.md (diff) | |
| parent | Add GraphQL Language Service (diff) | |
| download | nvim-lspconfig-d9001935a45dbd5911ecf062bcb321f7c0e7c732.tar nvim-lspconfig-d9001935a45dbd5911ecf062bcb321f7c0e7c732.tar.gz nvim-lspconfig-d9001935a45dbd5911ecf062bcb321f7c0e7c732.tar.bz2 nvim-lspconfig-d9001935a45dbd5911ecf062bcb321f7c0e7c732.tar.lz nvim-lspconfig-d9001935a45dbd5911ecf062bcb321f7c0e7c732.tar.xz nvim-lspconfig-d9001935a45dbd5911ecf062bcb321f7c0e7c732.tar.zst nvim-lspconfig-d9001935a45dbd5911ecf062bcb321f7c0e7c732.zip | |
Merge pull request #562 from JoosepAlviste/master
Add GraphQL Language Service
Diffstat (limited to 'lua/lspconfig/graphql.lua')
| -rw-r--r-- | lua/lspconfig/graphql.lua | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lua/lspconfig/graphql.lua b/lua/lspconfig/graphql.lua new file mode 100644 index 00000000..05fecf87 --- /dev/null +++ b/lua/lspconfig/graphql.lua @@ -0,0 +1,31 @@ +local configs = require 'lspconfig/configs' +local util = require 'lspconfig/util' + +local server_name = 'graphql' +local bin_name = 'graphql-lsp' + +configs[server_name] = { + default_config = { + cmd = {bin_name, 'server', '-m', 'stream'}, + filetypes = {'graphql'}, + root_dir = util.root_pattern('.git', '.graphqlrc'), + }, + + docs = { + package_json = 'https://raw.githubusercontent.com/graphql/graphiql/main/packages/graphql-language-service-cli/package.json', + description = [[ +https://github.com/graphql/graphiql/tree/main/packages/graphql-language-service-cli + +`graphql-lsp` can be installed via `npm`: + +```sh +npm install -g graphql-language-service-cli +``` +]], + default_config = { + root_dir = [[root_pattern('.git', '.graphqlrc')]], + }, + }, +} + +-- vim:et ts=2 sw=2 |
