Skip to content

Conversation

@Colengms
Copy link
Contributor

Reasons to leverage the existing text mate colorization instead of our lexer for syntactic colorization:

  • Our hypothesis was that our lexer would be faster than text mate's regexp-based approach. But, in practice, due to how we need to marshal ranges from native to TS, manage TextEditorDecorations, and manage visible ranges, the built in text mate colorization is orders of magnitude faster by comparison, especially with larger source files.

  • Text mate distinguishes between a large number of syntactic token types, all of which may potentially be independently colored by themes. It would be difficult to match this behavior with our own syntactic colorization.

  • Not having to merge syntactic and semantic tokens ourselves makes our implementation a lot simpler.

@Colengms Colengms merged commit f63a8da into master Jun 25, 2019
@Colengms Colengms deleted the coleng/remove_syntactic_colorization branch June 25, 2019 00:42
@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants