Skip to content

Language configuration: support for TextMate tokens in notIn #304799

@zackbach

Description

@zackbach

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.

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions