Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notifications not working (publishDiagnostics) #303

Open
cdietrich opened this issue Feb 10, 2023 · 3 comments
Open

Notifications not working (publishDiagnostics) #303

cdietrich opened this issue Feb 10, 2023 · 3 comments
Labels

Comments

@cdietrich
Copy link

cdietrich commented Feb 10, 2023

it looks like publishDiagnostics notifications are not processed by the client.
(tested with a langium and a Xtext based server)
what do ne need to do to get notifications like publishDiagnostics to work?
in MessageHandler i see normal request response messages but no notification messages

my client adaption can be found here
master...cdietrich:lsp4intellij:cd_dmodel

my server here:
https://github.com/cdietrich/xtext-domainmodel-ls

@cdietrich
Copy link
Author

cdietrich commented Feb 12, 2023

did some debugging. 1st problem was that the client cannot handle the servers serverCapabilities.getTextDocumentSync == TextDocumentSyncKind.Incremental
what that patched in RequestManager i can at least see the notifications arrive at the client

but the DaemonCodeAnalyzer.getInstance(project).restart(file); does not seem to call into LSPAnnotator (got this running setting language on the annotator

@jnt0r
Copy link
Contributor

jnt0r commented Jun 9, 2023

I also ran into this problem. LSPAnnotator runs but never finds any diagnostics as they are never received from the LSP Server.

@jnt0r
Copy link
Contributor

jnt0r commented Jun 9, 2023

I wonder why getInitParams() in LanguageServerWrapper does not set the capability for publishDiagnostics and other diagnostics as these features are implemented. Does this mean the LSP server does not send diagnostics as the client says he is not able to handle it?

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

No branches or pull requests

2 participants