Skip to content
This repository has been archived by the owner on Apr 15, 2021. It is now read-only.

vim coc support #55

Closed
burner opened this issue Jul 22, 2019 · 3 comments
Closed

vim coc support #55

burner opened this issue Jul 22, 2019 · 3 comments

Comments

@burner
Copy link

burner commented Jul 22, 2019

I tried getting vscode-dlang to work with neovim and coc using
Plug to install it.
Installing seemed to have worked as vscode-dlang was activated by neovim
when opening an .d file.
But dcd-server does not receive any completion requests.

It would be awesome if vscode-dlang would become a first class coc citizen.

@LaurentTreguier LaurentTreguier transferred this issue from d-language-server/vscode-dlang Jul 22, 2019
@LaurentTreguier
Copy link
Member

vscode-dlang is the extension for VSCode, for coc you should use DLS directly.
You can install it with:

dub fetch dls
dub run dls:bootstrap

Then you should be able to configure it in coc's configuration file with a custom language server definition. It should probably look like something like this:

"languageserver": {
    "d": {
      "command": "/home/burner/.dub/packages/.bin/dls-latest/dls", // this path should be printed with the previous commands
      "args": ["--stdio"],
      "filetypes": ["d"],
      "trace.server": "off",
      "rootPatterns": ["dub.json", "dub.sdl"],
      "initializationOptions": {
      },
      "settings": {
      }
    }
  }

Initialization options and settings are listed in README.md.

@burner
Copy link
Author

burner commented Jul 22, 2019

that got me closer but

2019-07-22T14:16:56.282 INFO (pid:22358) [language-client-index] - languageserver.d started with 22402
2019-07-22T14:16:56.567 DEBUG (pid:22358) [events] - Event: CursorHold [ 1 ]
2019-07-22T14:16:56.743 DEBUG (pid:22358) [events] - Event: CursorMoved [ 1, [ 1039, 1 ] ]
2019-07-22T14:16:57.062 DEBUG (pid:22358) [events] - Event: CursorHold [ 1 ]
2019-07-22T14:16:57.431 DEBUG (pid:22358) [events] - Event: CursorMoved [ 1, [ 1038, 1 ] ]
2019-07-22T14:16:57.606 DEBUG (pid:22358) [events] - Event: CursorMoved [ 1, [ 1037, 1 ] ]
2019-07-22T14:16:57.867 INFO (pid:22358) [services] - d state change: starting => stopped
2019-07-22T14:16:57.880 ERROR (pid:22358) [server] - unhandledRejection  Promise {
  <rejected> { ResponseError: Server not initialized
      at handleResponse (/home/burner/DotFiles/nvim/plugged/coc.nvim/build/index.js:38027:48)
      at processMessageQueue (/home/burner/DotFiles/nvim/plugged/coc.nvim/build/index.js:37854:17)
      at Immediate.setImmediate (/home/burner/DotFiles/nvim/plugged/coc.nvim/build/index.js:37838:13)
      at processImmediate (internal/timers.js:443:21) code: -32002, data: null } } { ResponseError: Server not initialized
    at handleResponse (/home/burner/DotFiles/nvim/plugged/coc.nvim/build/index.js:38027:48)
    at processMessageQueue (/home/burner/DotFiles/nvim/plugged/coc.nvim/build/index.js:37854:17)
    at Immediate.setImmediate (/home/burner/DotFiles/nvim/plugged/coc.nvim/build/index.js:37838:13)
    at processImmediate (internal/timers.js:443:21) code: -32002, data: null }

it dies with the above message.

@burner
Copy link
Author

burner commented Jul 22, 2019

it seems to work on another project of mine.

@burner burner closed this as completed Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants