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
Type: root

Definitions

root
grammar object
patterns pattern[] required
Default:
[]
repository Record<string, object>

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.

captures object
pattern object
comment string
disabled integer

set this property to 1 to disable the current pattern

min=0max=1
include string

this allows you to reference a different language, recursively reference the grammar itself or a rule declared in this file's repository.

match string

a regular expression which is used to identify the portion of text to which the name should be assigned. Example: '\b(true|false)\b'.

name string | string
contentName string | string
begin string

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.

end string

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.

while string

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.

captures object
beginCaptures object
endCaptures object
whileCaptures object
patterns pattern[]

applies to the region between the begin and end matches

Default:
[]
applyEndPatternLast integer
min=0max=1
name string | string