When specifying autoClosingPairs in language-configuration.json, only StandardTokenTypes (i.e. String, Comment, RegEx, Other) can be specified.
The design cannot support arbitrary semantic tokens (see #113254), but the token types already get computed using TextMate. Thus, supporting arbitrary TextMate token types here should be possible. I dug through some code but don't know enough about the architecture to know how easy this change would be to make.
My motivation for suggesting this feature is to be able to accommodate something like notIn: markup.math.typst for pairs of $ in math mode, allowing Myriad-Dreamin/tinymist#2408 to be fixed.
When specifying
autoClosingPairsinlanguage-configuration.json, onlyStandardTokenTypes(i.e.String,Comment,RegEx,Other) can be specified.The design cannot support arbitrary semantic tokens (see #113254), but the token types already get computed using TextMate. Thus, supporting arbitrary TextMate token types here should be possible. I dug through some code but don't know enough about the architecture to know how easy this change would be to make.
My motivation for suggesting this feature is to be able to accommodate something like
notIn: markup.math.typstfor pairs of$in math mode, allowing Myriad-Dreamin/tinymist#2408 to be fixed.