On Sat, Nov 2, 2024 at 9:34 AM Edward K. Ream <[email protected]> wrote:
> This Engineering Notebook post...shows how to use these ideas to extend
Leo's colorizer safely.
First, I'll create a new mode file for @jupytext. This file will be a good
test bed because it will depend heavily on delegation.
> When colorizing a tokenizing mode file, the colorizer will call
init_text(p.b) whenever p changes.
init_text should take different arguments:
def init_text(colorizer, c, p):
> P.S. Tokenizing mode files might call helper modes defined in
leo/modes/_helper_modes.py.
On second thought, this file is unnecessary. Instead, we can add new
helpers to the JEditColorizer class. Some of these new methods will support
delegation with either:
- an embedded main loop, as with @jupytext now.
- calls to a new-style file.
*Summary*
No more invention is needed. The details may change, but everything will
happen naturally.
Edward
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/leo-editor/CAMF8tS3yMm%2BiFt1%2BAuO52HyHgRE8dMWM6pEjWXBgzTtPXfBG1g%40mail.gmail.com.