79749815

Date: 2025-08-29 04:21:43
Score: 0.5
Natty:
Report link

I think you're wanting to use "injections".
It will inject rules into your own grammar.
Heres the schema for it "$schema": "https://raw.githubusercontent.com/RedCMD/TmLanguage-Syntax-Highlighter/main/vscode.tmLanguage.schema.json"
Injections documentation

"injections": {
    "L:source.phpf -comment -string": {
        "patterns": [
            {
                "name": "phpf.a",
                "match": "___[A-Z]+___"
            }
        ]
    }
}

"injectionSelector" & "injectTo" is used when you want to inject your language into an existing language.
currently "injectTo": ["source.php"] is injecting your phpf into the existing php language.
making "include": "source.php" redundant.

Reasons:
  • Contains signature (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: RedCMD