TextMate Grammar
Language grammar description files for TextMate and compatible editors
| Type | root |
|---|---|
| File match |
*.tmLanguage.json
*.tmLanguage.yaml
*.tmLanguage.yml
*.yaml-tmlanguage
|
| Schema URL | https://catalog.lintel.tools/schemas/schemastore/textmate-grammar/latest.json |
| Source | https://www.schemastore.org/tmlanguage.json |
Validate with Lintel
npx @lintel/lintel check
Definitions
[]
a dictionary (i.e. key/value pairs) of rules which can be included from other places in the grammar. The key is the name of the rule and the value is the actual rule. Further explanation (and example) follow with the description of the include rule key.
set this property to 1 to disable the current pattern
this allows you to reference a different language, recursively reference the grammar itself or a rule declared in this file's repository.
a regular expression which is used to identify the portion of text to which the name should be assigned. Example: '\b(true|false)\b'.
these keys allow matches which span several lines and must both be mutually exclusive with the match key. Each is a regular expression pattern. begin is the pattern that starts the block and end is the pattern which ends the block. Captures from the begin pattern can be referenced in the end pattern by using normal regular expression back-references. This is often used with here-docs. A begin/end rule can have nested patterns using the patterns key.
these keys allow matches which span several lines and must both be mutually exclusive with the match key. Each is a regular expression pattern. begin is the pattern that starts the block and end is the pattern which ends the block. Captures from the begin pattern can be referenced in the end pattern by using normal regular expression back-references. This is often used with here-docs. A begin/end rule can have nested patterns using the patterns key.
these keys allow matches which span several lines and must both be mutually exclusive with the match key. Each is a regular expression pattern. begin is the pattern that starts the block and while continues it.