Skip to content
Discussion options

You must be logged in to vote

@jiashengguo These are just done using different scopes for the textMate tokenizer. You can inspect the scope of a token in vscode by executing the Developer: Inspect Editor Tokens and Scopes command.

To change this you need to modify the generated textMate grammar to use a different scope for your keywords. Since Langium doesn't really know which keyword belongs to which scope (see also the discussion over at #818), it will just generate all keywords into the default keyword scope (keyword.control.<id>).

To use the blue colored keywords in your example, you need to switch from the keyword.control.<id> to the keyword.storage.<id> scope.

BTW, I'm curious why the colors are the same for so…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@jiashengguo
Comment options

@msujew
Comment options

@jiashengguo
Comment options

Answer selected by jiashengguo
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