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
Extension developers can specify tokenTypes for a grammar to map specific scopes to content mode. Behind the scenes, these tokenTypes are parsed into a StandardTokenType, which is one of Other, String, Comment, or RegEx. In tokenTypes, however, users can only specify other, string, or comment, but notregex.
This documentation (under the section "Token types and embedded languages") specifies how one can provide a mapping from certain TextMate scope names to token types to override the default behavior.
The allowed strings in this position are string, comment, and other, which map onto three of the four cases of this enum.
The change that I am proposing (and that I have fixed in the associated PR) is to allow the string regex in this position as well, which should be parsed into the fourth case of StandardTokenType.
Activity
amunger commentedon Mar 26, 2026
can you add some context on what this is for. Those are some very overloaded terms and I'm not sure what feature this is about
zackbach commentedon Mar 26, 2026
Sure thing, sorry for my lack of clarity.
This documentation (under the section "Token types and embedded languages") specifies how one can provide a mapping from certain TextMate scope names to token types to override the default behavior.
The allowed strings in this position are
string,comment, andother, which map onto three of the four cases of this enum.The change that I am proposing (and that I have fixed in the associated PR) is to allow the string
regexin this position as well, which should be parsed into the fourth case ofStandardTokenType.RedCMD commentedon Mar 26, 2026