Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

PublishDiagnostics issue #46

Open
charlesxsh opened this issue Apr 22, 2022 · 4 comments
Open

PublishDiagnostics issue #46

charlesxsh opened this issue Apr 22, 2022 · 4 comments

Comments

@charlesxsh
Copy link

I am sending a diagnostic to the VSCode with following LSP server:

let param = PublishDiagnosticsParams {...}
let not = lsp_server::Notification::new(N::METHOD.to_string(), params);
connection.sender.send<...>(not.into())

However, nothing happened in the VSCode, the notification sent successfully from the sender.send call. Can anyone enlighten me where could be the potential issue?

(the file path, start and end position is correct)

@charlesxsh
Copy link
Author

confirmed from language client's trace, no notification received (it does receive response, but no notification received). LSP server did not report any error.

@charlesxsh
Copy link
Author

I tried to send showmessage notification, same behavior, no error in server but nothing indicate that client receive the notification.

@charlesxsh
Copy link
Author

Ok I figured out the reason...since lsp server is talking to the lsp client by stdio, it consumes the stdout. Make sure you don't use std print..

@lnicola
Copy link
Member

lnicola commented Apr 23, 2022

Yeah, not sure we can do anything about that.

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

No branches or pull requests

2 participants