Skip to content

Problems implementing command that needs a parser instance #141

Answered by msujew
hallvard asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @hallvard, glad to hear you are using Langium.

Regarding your first issue: The easiest way would probably just to add another call to the webpack CopyPlugin to add another copy of the grammar.json to your output directory. You would add something like the following to the vscodeConfig and point the to property to the out directory.

https://github.com/langium/langium/blob/ba581331bd65733ff1f74a5950320fbbad523ce3/packages/generator-langium/langium-template/webpack.config.js#L49-L58

An alternative would be to direct the main.js bundle with the grammar.json to the out directory instead of out/language-server. Beware that you have to remove one ../ from the devtoolModuleFilenameTemplate of …

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@msujew
Comment options

@msujew
Comment options

@hallvard
Comment options

@msujew
Comment options

@hallvard
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by hallvard
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