Closed tomoakley closed 7 months ago
Hey @tomoakley, I just opened a PR to make the returns more pertinent. That being said with the current implementation, it's in fact unclear whether the command succeeded or failed so you may just want for these changes to be released. Thanks for raising this :D!
Awesome, thanks Jules. I will merge my PR now and when a new version is released will check it out. Thanks!
FYI, looking at the Microsoft docs, it makes sense to return nil
in case of success, as there is nothing to return here, we'll keep returning nil
when the command succeeds but you'll be ensured that you'll get an error if any error happens.
Hey, closing the issue as the version is now released.
I have implemented the functionality for setting the Circle user token and self-hosted URL in my neovim plugin, PR here. Annoyingly I am unable to test it because the Circle org I work on has no private contexts/orbs and it's not self-hosted.
However I'd just like to check I've done it correctly; when the client.request command is made, the handler callback in the Lua code has two params -
error
andresult
(andctx
andconfig
). According to the Neovim LSP docs,error
is nil if the request completed. Andresult
should be defined - if it'snil
the request failed. When the LSP client attaches when I run it, both these are nil. The Microsoft docs for language servers say this shouldn't be the case.In the third param in the handler callback (
ctx
), it contains the arguments supplied (ctx.params.arguments
). These arguments contained the user token and self-hosted URL.Does my code work? Should the Circle LSP be responding with some result to indicate success - or is it enough that
error
is nil? I looked at:LspLog
in neovim but it doesn't appear to be sending anything. Are there any other logs I can look at for the Circle LSP?