I have recently started a new Q# community repo, aimed at bringing a holistic and structured approach for building up Q# TextMate grammar.
TextMate grammars are based on regular expressions from the Oniguruma regex engine and are a de-facto standard for syntax highlighting and tokenization for programming languages. Popular editors such as Visual Studio Code or Sublime Text base their syntax highlighting on such grammars.
At the moment, the Q# LSP extension ships with a very basic TextMate grammar only, focused on a handful of keywords and specially designated symbol names only. The goal with the new repository is to provide a well-rounded approach for Q# grammar, and fully fledged tokenization of the language, based on the necessary scoping rules. In addition to this, instead of manually composing the grammar JSON file, I would like to provide a robust grammar delivery pipeline, with a build pipeline, without the needing of escaping the expressions, with proper unit tests and with various output formats.
It is just the beginning but it already provides improved highlighting over the basic one that is currently shipping with the extension. You can find the repo in the Q# community organization and I would like to invite anyone interested in Q# to contribute!