-
Background:
We have a test case where we want to apply We use So far it seems ok in the first place (the text has changed). But when we re-run our formatter on the updated document, we get strange effects (different to interactive tests in vscode, when we reformat a document). We have the feeling that we need to trigger a reparse or something similar after calling Are we on the right track? How do we "finalize" formatting a document in memory (for our test case)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hey @goto40, FYI, the formatting can "fixed" by simply returning langium/packages/langium/src/lsp/formatter.ts Lines 203 to 206 in 4bbc180 For your actual question: Langium only runs a document through the document builder in two cases:
|
Beta Was this translation helpful? Give feedback.
@msujew you reply speed is incredible fast!! Thank you so much :-)
The proposed workflow looks very complicated. I think we might workaround by saving the modified texts and reloading them into a new workspace (that is what we did before). We will give it a second try and then maybe fallback.
This is no issue, since we are just testing some details here (it is no end-user functionality)
Thank you!!