Tree-Sitter php Injection Help for Syntax Extension Developments

#features #nova-extensions


I have reached a roadblockšŸš«, and I was hoping if anyone could help.
Basically I am creating a blade extension based on a tree-sitter grammar I wrote.

The extension requires base-php to be injected into double brackets {{ parse-me-as-php }} as well as inside various other syntaxes.

Before Nova 10, I think it was possible to inject php using the php-base.xml.

The actual php-base.xml is still in Nova, for backward compatibility. However it is useless for the tree-sitter grammars. I can inject php but the problem is, that php already starts by injecting html . This means that even though I can inject php, I end up practically injecting html :face_with_spiral_eyes:

Therefore the only way for the user to get all the php autocompletion goodies, is inside the default <?php ?> tag, rendering all the template tags and the injections useless.

I really dont think this is possible at the moment with Nova 11, hence placing it under ā€œfeature requestā€, BUT if anyone knows a better way to do this, I would really appreciate the help as I can not develop any further without the ability to inject php :confused:

Should be a fairly easy fix for the future tbh? Nova needs to practically not inject html when the extensions tries to inject php

P.S: I also need to inject html inside blade as well, but I would be following the same procedure as the internal php. As a result I would rather decide myself when and where php and html are injected.