Minimal skeleton for syntax highlighting


I’m using a rather esoteric language and i’m trying to switch from TextMate to Nova.
I have a minimal syntax highlighting scheme/language grammar in a TextMate bundle and i’m trying to implement the same for Nova, but i find it hard to start.

As a super simple example i’d like to highlight (or downlight) single line comments. These start with “;”

i’ve added


to Syntaxes\mylang.xml. I don’t geht any errors in the extension console (with &semi; instead of &#59; i get “Error loading syntax “mylang.xml - The operation couldn’t be completed (SKXMLDocumentErrorDomain error 111.) - why is that?”

if i select mylang in an existing file comments aren’t high/downlighted in any way.

What am i doing wrong? Thanks.

The <comments> element is used by Nova for the commenting / uncommenting functionality. For highlighting, you need to add scopes to, well, <scopes>. I’d recommend you spend some time with the Syntax API documentation and have a peek at one or more of the syntaxes coming with Nova (you’ll find them inside Nova’s app bundle).

1 Like