You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even on very small text, rehighlighting is performed with a delay. This is expected:
Highlighting re-lexes the whole buffer after a short pause in typing. Files of a few thousand lines are fine on a desktop; very large files are slower on phones.
but can feel a bit sluggish when you're editing files.
Describe the solution you'd like
For small amounts of text, perhaps apply the re-lexing and highlighting directly; only do the current behavior of after a short pause in typing after the text is beyond a certain character limit.
This design is helpful because larger files are often edited the least in some code writing context, so at least for most things we can maintain the illusion of 'instant rehighlighting as you type.'
Describe alternatives you've considered
Status quo; this is sort of hackish because pygments fundamentally needs the whole file to be lexed rather than just a small part, so this is more in the "workarounds" territory.
Activity
freakboy3742 commentedon Oct 15, 2026
No disagreement that faster is better; the catch is how. Further investigation on options is required.