Closed b0o closed 5 years ago
Looks like this was changed a long time ago in 3e88fc32e8c232b7d00d27edf32621ac3a402ffd.
The ShowMessageRequest is speced in the way that it waits for user input. See: https://microsoft.github.io/language-server-protocol/specification#window_showMessageRequest
I would rather argue that this is something the server needs to fix since the clients seems to work accordingly to the spec.
I close the issue. Please ping if you think otherwise.
@dbaeumer I feel like the API needs to be clearer about this. If I'm just looking at the documentation of Show an error message.
, it's not at all clear that I'm asking for any user input here.
Agree. Done on the server implementation.
I've been experiencing a very odd behavior of ocaml-language-server + LanguageClient-neovim.
Messages such as the following appear when merlin has any sort of issue:
I have to dismiss 20+ of these messages by pressing enter repeatedly when this happens.
I've determined that this stems from ocaml-language-server calls vscode-langserver-node's
showErrorMessage
method defined here:https://github.com/freebroccolo/ocaml-language-server/blob/6310438abaaad6b79175e3443e82437d2b91f1cd/src/bin/server/processes/merlin.ts#L41-L43
vscode-langserver-node then sends a LSP
ShowMessageRequest
message:https://github.com/microsoft/vscode-languageserver-node/blob/58551741af1d90dd96d9c8a5b0069619884d8f22/server/src/main.ts#L837-L840
languageclient-neovim then handles this message:
https://github.com/autozimu/LanguageClient-neovim/blob/5491a64a07b259568e26981e5ec0d78ba8cec756/src/language_server_protocol.rs#L1862-L1883
... which finally calls from the Rust LSP client into the vimscript runtime code:
https://github.com/autozimu/LanguageClient-neovim/blob/0f171f5cef4f611bce3efc217fd83b021adbb3aa/autoload/LanguageClient.vim#L187-L192
which triggers the vim built-in function
inputlist
, as documented:inputlist
basically displays the message (in this case an error message, not really a user input request message as it expects) as shown in the screenshot, which the user must then dismiss manually.I am not sure as to which project is the culprit here, and thus where to file an issue, so I am opening this on all three projects.
showErrorMessage
method really send aShowMessageRequest
, or should it send aShowMessage
? Is this a proper implementation of LSP?inputlist
functionality?