A long time ago, I started writing syntax definitions for Q# in Sublime Text. Motivated again by the recent contest, I significantly improved them, so they're actually usable in a competition. You can check the current version at https://gitgud.io/Xellos/qsharp-sublime-syntax.
Auto comment: topic has been updated by Xellos (previous revision, new revision, compare).
why not to use language server protocol instead of editor-specific definitions
Hmm, first, I had no idea what that is. Second, after checking out the docs, I'm not in the mood to learn how it works. Seems too long.
If you want something else done, why not do it yourself?
Auto comment: topic has been updated by Xellos (previous revision, new revision, compare).
Thank you, it is a good idea!
Though, it seems there are some weird broken things (due to Q# syntax evolving?) (commit 6f99c0b56dbe241f86792745b1f4f5a8d65a2c2e):
For me operation g and below is not highlighted. If I remove the for loop or change function to operation, then operation g becomes highlighted.
There is a
within { ... } apply {... };
construction.Functors e.g.
is Ctl+Adj
seem to cause en error in parsing.is it possible to make commenting code with Ctrl+/ work?
Yes, I haven't updated it — I would if I had time. The usual thing with open-source applies, you can implement a feature, make a pull request and I'll add it there if it works.