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.
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.