On Saturday, January 7, 2017 at 8:21:19 AM UTC-5, Edward K. Ream wrote:

> pyzo is the work of a programming genius.  I'll use that genius to 
improve Leo.

The leo/external/pyzo folder now contains copies of the pyzo code 
pertaining to syntax coloring. I had to repackage some things.  Originally, 
importing any pyzo file started pyzo itself!  The culprit was 
pyzo/__init__.py. Overall, the changes are minor.

Some test code (not pushed yet) defines a wrapper class that integrates the 
pyzo code into Leo's existing colorizing scheme. The code now appears to 
work, except that everything is colored black.  That's actually a nit ;-)

This is exciting. Among other things, the default colors are (will be) 
solarized colors!  The code works directly on QTextEdit widgets, so it 
should work as is with the LeoQTextBrowser class that holds Leo's body pane.

There is lots of interesting and useful code in pyzo.   Pyzo can change 
margins, handle auto-completion, paren matching, etc.  And Pyzo integrates 
that code with QTextEdit directly, unlike Leo's existing code where the 
various wrapper classes get in the way. 

So Pyzo code should indeed simplify major parts of Leo.  For now, I'll 
focus on syntax coloring.  If that can be made to work I'll leave other 
improvements on the back burner.  Integration with IPython and Jupyter 
seems like a higher priority.  But long term, Pyzo points the way to much 
better editor code for Leo.

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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to