LogQL Syntax Highlighting

It would be really handy if there was syntax highlighting for logql, for usage in:

  • IDEs (eg: a *.logql file that is automatically highlighted).
  • Markdown (eg: so logql code blocks are syntax highlighted).

I see that queries are highlighted in Grafana (the monaco editor?), so it looks like the work has been done and should be easy to bring into VScode, and maybe needing a bit of massaging to work with markdown renderers.

Can anyone give any hints on where to start?


Edit: I have found the grafana/monaco-logql repository which is a good start.