Tree sitter demo

10 views
Skip to first unread message

Ville M. Vainio

unread,
Aug 6, 2026, 3:43:04 PM (4 days ago) Aug 6
to leo-editor
This branch now has a proof of concept for using Tree sitter to color .py and .js files:


On quite brief testing, this seems to handle .py files ok. You can also edit the content and highlight doesn't get corrupted but of course serious testing would reveal more. It is enabled by default in the branch, no extra config needed.

The idea is that this would be faster than current jEdit highlighter (as Tree sitter is high performance C code, and does "incremental rehighlights").


There are more rationale in the ticket: https://github.com/leo-editor/leo-editor/issues/4839

Of course I wouldn't seriously propose such a big shift without recognizing that Edward needs intuitive understanding of how this works, so consider this demo level for now.
Reply all
Reply to author
Forward
0 new messages