Skip to content
Discussion options

You must be logged in to vote

Hey @ejfasting,

in order to provide hovers for targets of cross references, i.e.:

const value = 42;
value // <-- hover here

Langium needs to resolve those cross references to figure out what kind of information to provide on hover. Generally, the DocumentBuilder should be invoked to build documents. Langium is simply not designed to provide LSP results without first going through the document lifecycle.

Ideally, you should be able to replicate the document handling that is happening inside of addDocumentUpdateHandler. I've recommended this also already in #1494 (comment), as these services are meant to cache relevant data across rebuilds so that you don't run into performance issues in yo…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ejfasting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants