Skip to content

Extend or customize syntax highlighting #604

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

You must be logged in to vote

Hi @EDKarlsson, the generated textMate syntax highlighting file is basically just a starting help for new grammars. Anyone who wants more fine-grained control over their syntactical highlighting should deactivate the textMate option in their langium-config.json and write/modify their textMate file by hand. It's basically impossible to infer accurate syntactical highlighting just based on a grammar. That's also what we did for the Langium syntax highlighting.

Regarding your comments: I'm pretty sure that this style of commenting will lead to a lot of problems down the line. Your COMMENT terminal contains a greedy [\s\S]* regex (compare to the non-greedy [\s\S]*? regex), which basically par…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by EDKarlsson
Comment options

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

@EDKarlsson
Comment options

@msujew
Comment options

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