Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve syntax highlighting #9

Open
cbrewster opened this issue Feb 2, 2020 · 0 comments
Open

Improve syntax highlighting #9

cbrewster opened this issue Feb 2, 2020 · 0 comments

Comments

@cbrewster
Copy link
Owner

I put in text highlighting really quickly for fun, but it is done in a very slow and hackish way. It is hardcoded to only do Rust syntax highlighting instead of trying to match the file extensions and text highlighting is recomputed for the entire buffer any time a change is made to the buffer.

I am using syntect for syntax highlighting and it allows for incrementally recomputing syntax highlighting. For example, usually the text highlighting preceding an edit stays the same so that portion can be skipped. Syntect has a way to save snapshots of the highlighter state which can be used to do this incremental re-computation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant