You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The injection syntax is parsed into the following tokens
34
-
35
-
*`L:` - `left` side priority selector `-1` to following the scopeName
36
-
*`R:` - `right` side priority selector `1` to following the scopeName
32
+
The injection [parser](https://github.com/microsoft/vscode-textmate/blob/main/src/matcher.ts) parses the syntax into the following tokens:
33
+
*`L:` - `left` side priority selector `-1` to the following scopeName
34
+
*`R:` - `right` side priority selector `1` to the following scopeName
37
35
*`B:` - Both `left` and `right` side priority selectors (Github and [TextMate](https://github.com/textmate/textmate/blob/master/Frameworks/scope/src/types.h#L74) only. VSCode doesn't support it)
38
-
*__*__`:` - any char followed by `:` colon. Defaults to priority `0` to following the scopeName
36
+
*__*__`:` - any char followed by `:` colon. Defaults to priority `0` to the following scopeName
39
37
*`(` - Open bracket group
40
38
*`)` - Close bracket group
41
-
*`-` - Negate following scopeName or group (negates each scopeName individually if inside group)
39
+
*`-` - Negates the following scopeName or group (negates each scopeName individually within the group)
42
40
*`,` - Logical `OR`
43
-
*`|` - Logical `OR` (only when inside group)
41
+
*`|` - Logical `OR` (only when inside a group)
44
42
*`/[\w.:][\w.:-]*/` - Regex for scopeNames (`identifier`)
45
-
*__*__ - any other character left over (including whitespace `` and asterisk `*`) becomes whitespace
43
+
*__*__ - any other character left over is treated as whitespace
46
44
*`*` - Asterisk matches against any scope; TextMate 2.0 only. VSCode treats it as whitespace
47
45
48
46
Any rogue closing bracket `)` or `|` (when at root level) will cause all text afterwards to be ignored.
@@ -88,7 +86,7 @@ Including recursively into the injected grammar.
88
86
`"injections"` injects rules into the grammar based on the scopeNames specified.
89
87
90
88
Sadly in VSCode injections do not work if the grammar is embedded inside another grammar.
91
-
You will need put the injections inside the parent grammar.
89
+
You will need to put the injections inside the parent grammar.
92
90
93
91
TextMate will inject the rules into the entire document.
0 commit comments