BlueGit

ict rusty-teams

Files

rusty-teams / vendor / gpui-component / src / highlighter / languages / php / injections.scm

injections.scm

injections.scm 644 B Download Raw
1; PHP injection rules
2; Based on tree-sitter-php injections.scm with added HTML support for text nodes
3
4((comment) @injection.content
5 (#set! injection.language "phpdoc"))
6
7(heredoc
8 (heredoc_body) @injection.content
9 (heredoc_end) @injection.language)
10
11(nowdoc
12 (nowdoc_body) @injection.content
13 (heredoc_end) @injection.language)
14
15; HTML in text nodes (content outside <?php ?> tags)
16; injection.combined tells the highlighter to merge all text nodes into a single
17; HTML document before parsing, so opening/closing tags across PHP blocks match.
18((text) @injection.content
19 (#set! injection.language "html")
20 (#set! injection.combined))