I’m not finding the documentation on how to create a language extension syntax simple.
All I want to do is define multiline comments embedded inside .ts, .js, and .css files (for starters) that start with a bang as being markdown
and, ideally, embedded code in markdown as being of the appropriate language so that:
Note that I’m using the tag here because quoting the markdown for it is fraught
<pre>js
// is treated as javascript
</pre>
I’ve written a documentation system that relies on this (I used to use /** */ but so many programs — visual study code, cough — treat that as jsDoc that I gave up. It even finds contiguous sets of code comments and assembles them into live examples (“fiddles”). You can check it the <live-example>
web-component here if you’re curious.
The documentation says this only works for syntaxes defined using tree sitter but there’s no information on whether the ts, js, or css grammars build into Nova qualify.
Anyway, thanks in advance if you have any pointers.