2022-03-20 10:22:32 +08:00
|
|
|
local util = require 'lspconfig.util'
|
|
|
|
|
|
|
|
return {
|
|
|
|
default_config = {
|
2024-06-13 08:44:55 +08:00
|
|
|
cmd = { 'graphql-lsp', 'server', '-m', 'stream' },
|
|
|
|
filetypes = { 'graphql' },
|
2022-03-20 10:22:32 +08:00
|
|
|
root_dir = util.root_pattern('.git', '.graphqlrc*', '.graphql.config.*', 'graphql.config.*'),
|
|
|
|
},
|
|
|
|
|
|
|
|
docs = {
|
|
|
|
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 = {
|
2024-06-13 08:44:55 +08:00
|
|
|
root_dir = [[root_pattern('.git', '.graphqlrc*', '.graphql.config.*')]],
|
2022-03-20 10:22:32 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|