LSP: The client should request for completion / completion details only if the server supported
#1,378 创建于 2018年1月27日
描述
Oni does not seem to respect the language server capability settings of InitializeResult.capabilities.completionProvider and InitializeResult.capabilities.completionProvider.resolveProvider.
Details
When I was using go-langserver and editing a go file, I noticed in the dev console that Oni is making completionItem/resolve requests to the server, which returned Error: method not supported: completionItem/resolve. Go-langserver does not support completion detail resolve, and it declares so by not setting InitializeResult.capabilities.completionProvider.resolveProvider, but Oni does not seem to respect this server capability setting.
go-langserver has a flag to switch on/off the completion capability, which, when disabled, will not set the field InitializeResult.capabilities.completionProvider at all. I tried disabling the flag in the language server argument in config.js. Still, I see Oni making failed textDocument/completion requests.