Skip to content
Discussion options

You must be logged in to vote

Hey @open-domain,

so Langium doesn't really provide a lot of guidance on how you can run the generator, given that there are a lot of different use cases how and when people want to generate their code. The CLI we offer by default is meant to be installed as a separate package, similar to how langium projects rely on the langium-cli package.

Another way would be to have your generator run on every document change. You could hook your generator into the document lifecycle by calling onBuildPhase. That would then run the generator on every changed document in the editor.

You could also include the generator as a command. One way this could work is by registering a command on the language se…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@open-domain
Comment options

@msujew
Comment options

Answer selected by open-domain
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