📣 Removal of Deprecated Built-In Regex Grammar Scopes

Hello all!

With the release of Nova 10 in 2022, we moved most of Nova’s built-in language grammars from their original regex-engine implementations to Tree-sitter. In so doing, we deleted the regex grammar definitions from Nova’s bundle for most of these.

There were a few grammars, however, for which we did not delete the regex definitions, including: HTML, CSS, PHP, JavaScript, and TypeScript. This was intended to ease transition of third-party extensions which either imported scopes from one of one or more of these grammars or used them as a subsyntax (such as a template language implemented on top of HTML). After Nova 10’s release, we recommended to extension developers that they should move such grammars to an appropriate Tree-sitter implementation as soon as they were able (such as by using the embedded_template grammar), and that those scope definitions would be removed in a later major release.

This announcement is to solidify this, by stating explicitly that the leftover regex scopes for all grammars in Nova that have been migrated to Tree-sitter will be deleted from Nova’s bundle with the release of Nova 13, currently scheduled for later this year. As of this writing, the current release of Nova is 11.8, so this means that there will be one additional major milestone cycle of Nova releases before this removal happens.

If you are the author / maintainer of a language extension which uses regex-based grammars, ensure that you are not importing the built-in languages’ deprecated regex scopes (for the languages listed above) within your grammar. Once Nova 13 is released, these imports will fail and affected portions of your grammar will no longer parse.

Note: if you have an extension which provides a self-contained regex grammar that does not reference built-in these deprecated grammar scopes, there is nothing you need to do. Self-contained regex grammars in general will contine to be supported for the forseeable future. This only affects those which made direct use of our built-in grammars. Additionally, if you provide a Tree-sitter grammar which defines injection points for other languages (code fences), there is also nothing to do as this is unaffected.

If you have any questions, don’t hesistate to ask or send me a DM.

Thank you all!

Logan

3 Likes