Maintain Diagnostic on Non File Node #1741
Unanswered
kapishsingla
asked this question in
Q&A
Replies: 1 comment
-
Hi @kapishsingla! I would create a custom JSON-RPC message where you send exactly the information you need in your Navigator tree. Here's an example for this: langium/examples/statemachine/src/language-server/main-browser.ts Lines 25 to 38 in 21b1051 The example sends the whole serialized AST. In your case, you rather need information about validation results and to which nodes they belong. Then you need corresponding code on the VS Code extension side to register a message handler on the JSON-RPC connection. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
In theia, I have extended the
FileNavigatorWidget
to serve the purpose of showing the components of document as a non-file Node in Navigator.Theia currently uses
LSP
with Langium documents to generate diagnostics and display markers on files in the Navigator, working at the document level. I want to adjust this so diagnostics are maintained and retrieved based on non-file nodes. This way, I can get diagnostics specific to a non-file node and display markers only on that particular node.Could you please suggest any approach for the same?
Beta Was this translation helpful? Give feedback.
All reactions