Nova uses extensions for its syntax definitions internally, the only special thing about them being they are located inside the application bundle: right click Nova.app in Finder, select “Show Bundle Contents”, navigate to Contents → SharedSupport → Extensions → HTML.novaextension
, repeat bundle opening operation with that. However.
Forking a builtin syntax is a maintenance nightmare: you will have to repeat that every single time Nova’s own syntax definitions update, which is about every release, lest the users of your extension remain saddled with bugs the main HTML definition has fixed, or miss features it has added. It’s preferable to extend the builtin HTML syntax, the only trouble with this being Nova does not have an API for that.
The good news is that, for HTML based template languages, you still can get quite far extending the syntax without such an official extension point. The exact approach depends on if your specific syntax inclusions are terminal or not. By that I mean: are your template tags only found in the content area of ordinary HTML and do they only contain content and other template constructs?
- If the answer to that is yes, injecting them is a simple matter of including the builtin HTML syntax and adding your own scope collection(s), like the Swift Stencil extension does.
- If the answer is no, you can still inject your scopes by using Template Scopes. This has a few drawbacks, but it still compares advantageously to maintaining a syntax fork IMO. Check out the Perch extension for a solution following this pattern.
This thread has a few good snippets of information on the issue.