Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

graphql-language-service-cli not working #3687

Closed
UltiRequiem opened this issue Mar 8, 2022 · 1 comment
Closed

graphql-language-service-cli not working #3687

UltiRequiem opened this issue Mar 8, 2022 · 1 comment

Comments

@UltiRequiem
Copy link

Result from CocInfo

## versions

vim version: NVIM v0.7.0-dev+1159-gcf0266fae
node version: v17.6.0
coc.nvim version: 0.0.80-8ea0cd88c6
coc.nvim directory: /home/z/.local/share/nvim/site/pack/packer/start/coc.nvim
term: WezTerm
platform: linux

## Log of coc.nvim

2022-03-08T12:08:04.502 INFO (pid:224457) [services] - registered service "languageserver.ocaml-lsp"
2022-03-08T12:08:04.504 INFO (pid:224457) [services] - registered service "languageserver.graphql"
2022-03-08T12:08:05.295 INFO (pid:224457) [plugin] - coc.nvim initialized with node: v17.6.0 after 919ms
2022-03-08T12:08:05.320 WARN (pid:224457) [workspace] - workspace.createStatusBarItem is deprecated, please use window.createStatusBarItem instead. 
    at Object.t.initStatusBar (/home/z/.config/coc/extensions/node_modules/coc-spell-checker/out/index.js:1:155873)
    at Object.t.activate (/home/z/.config/coc/extensions/node_modules/coc-spell-checker/out/index.js:1:23099)
2022-03-08T12:08:06.227 INFO (pid:224457) [attach] - receive notification: doAutocmd [ 1 ]
2022-03-08T12:08:06.235 INFO (pid:224457) [attach] - receive notification: runCommand [
  'coc-helper.internal.didVimEvent_m1_v0_13_0_coc_helper_1',
  'BufWipeout',
  1
]
2022-03-08T12:08:06.235 INFO (pid:224457) [attach] - receive notification: runCommand [
  'coc-helper.internal.didVimEvent_m1_v0_13_0_explorer_2',
  'BufWipeout',
  1
]
2022-03-08T12:08:06.243 INFO (pid:224457) [attach] - receive notification: doAutocmd [ 1 ]
2022-03-08T12:08:06.264 INFO (pid:224457) [services] - graphql state change: stopped => starting
2022-03-08T12:08:06.734 INFO (pid:224457) [language-client-index] - Language server "languageserver.graphql" started with 224604
2022-03-08T12:08:06.869 INFO (pid:224457) [services] - graphql state change: starting => stopped
2022-03-08T12:08:06.869 INFO (pid:224457) [services] - graphql state change: stopped => starting
2022-03-08T12:08:06.877 INFO (pid:224457) [language-client-index] - Language server "languageserver.graphql" started with 224611
2022-03-08T12:08:07.011 INFO (pid:224457) [services] - graphql state change: starting => stopped
2022-03-08T12:08:07.011 INFO (pid:224457) [services] - graphql state change: stopped => starting
2022-03-08T12:08:07.019 INFO (pid:224457) [language-client-index] - Language server "languageserver.graphql" started with 224618
2022-03-08T12:08:07.154 INFO (pid:224457) [services] - graphql state change: starting => stopped
2022-03-08T12:08:07.154 INFO (pid:224457) [services] - graphql state change: stopped => starting
2022-03-08T12:08:07.162 INFO (pid:224457) [language-client-index] - Language server "languageserver.graphql" started with 224625
2022-03-08T12:08:07.297 INFO (pid:224457) [services] - graphql state change: starting => stopped
2022-03-08T12:08:07.297 ERROR (pid:224457) [services] - Server languageserver.graphql failed to start: Error: Connection to server got closed. Server will not be restarted.
    at LanguageClient.handleConnectionClosed (/home/z/.local/share/nvim/site/pack/packer/start/coc.nvim/build/index.js:55149:43)
    at LanguageClient.handleConnectionClosed (/home/z/.local/share/nvim/site/pack/packer/start/coc.nvim/build/index.js:56696:15)
    at closeHandler (/home/z/.local/share/nvim/site/pack/packer/start/coc.nvim/build/index.js:55120:16)
    at CallbackList.invoke (/home/z/.local/share/nvim/site/pack/packer/start/coc.nvim/build/index.js:12309:35)
    at Emitter33.fire (/home/z/.local/share/nvim/site/pack/packer/start/coc.nvim/build/index.js:12360:34)
    at closeHandler (/home/z/.local/share/nvim/site/pack/packer/start/coc.nvim/build/index.js:13455:24)
    at CallbackList.invoke (/home/z/.local/share/nvim/site/pack/packer/start/coc.nvim/build/index.js:12309:35)
    at Emitter33.fire (/home/z/.local/share/nvim/site/pack/packer/start/coc.nvim/build/index.js:12360:34)
    at StreamMessageReader2.fireClose (/home/z/.local/share/nvim/site/pack/packer/start/coc.nvim/build/index.js:12502:27)
    at Socket.<anonymous> (/home/z/.local/share/nvim/site/pack/packer/start/coc.nvim/build/index.js:12585:42)
2022-03-08T12:08:21.186 INFO (pid:224457) [attach] - receive notification: codeActionRange [ 1, 1, 'quickfix' ]
2022-03-08T12:08:27.506 INFO (pid:224457) [attach] - receive notification: openLog []
2022-03-08T12:08:27.523 INFO (pid:224457) [attach] - receive notification: doAutocmd [ 1 ]
2022-03-08T12:12:22.750 INFO (pid:224457) [attach] - receive notification: showInfo []

Describe the bug

GraphQL Server not working

Reproduce the bug

  • Create file mini.vim with:

    set nocompatible
    set runtimepath^=/path/to/coc.nvim
    filetype plugin indent on
    syntax on
    set hidden

Install grahpql lsp

yarn global add graphql-language-service-cli

Add a coc-settings.json

{
  "languageserver": {
    "graphql": {
      "command": "/usr/local/bin/graphql-lsp",
      "args": ["server", "-m", "stream"],
      "filetypes": ["typescript", "graphql"]
    }
  }
}
  • Start (neo)vim with command: vim -u mini.vim

  • Operate vim.

Screenshots (optional)

image

@chemzqm
Copy link
Member

chemzqm commented Mar 8, 2022

Should be problem of your language server, checkout https://github.com/neoclide/coc.nvim/wiki/Debug-language-server#using-output-channel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants