switching use-pygments within one leo file

33 views
Skip to first unread message

Josef

unread,
Jun 5, 2019, 8:54:57 AM6/5/19
to leo-e...@googlegroups.com
use-pygments = True works better for latex files, but Leo's colorizer seems to work better for some other syntaxes,
so I was wondering if there is a way to switch between the two within a single Leo outline?

Btw, the pygments colorizer seems to be buggy when it comes to Lua long literal string syntax, e.g. those between [[ and ]] or between [=[ and ]=] etc. when it contains newlines or quotes. Should I file a bug report, or is this anyhow a "won't fix"?

The Leo colorizer for Lua seems to recognize long literal strings correctly when they are enclosed in [[ and ]], but  not when enclosed in [=[ and ]=]  (the same problem with more than one '=' between the brackets). Again, should I file a bug report?

- Josef

Edward K. Ream

unread,
Jun 6, 2019, 8:05:07 AM6/6/19
to leo-editor
On Wed, Jun 5, 2019 at 7:55 AM Josef <joe...@gmx.net> wrote:
use-pygments = True works better for latex files, but Leo's colorizer seems to work better for some other syntaxes,
so I was wondering if there is a way to switch between the two within a single Leo outline?

Not yet.  One could imagine @pygments or @jedit directives.

However, it would be simpler and better to fix latex coloring when using Leo's legacy syntax coloring code.  Please open a new issue, listing the desired improvements to Leo's latex colorer.
Btw, the pygments colorizer seems to be buggy when it comes to Lua long literal string syntax, e.g. those between [[ and ]] or between [=[ and ]=] etc. when it contains newlines or quotes. Should I file a bug report, or is this anyhow a "won't fix"?

I would be "Can't fix", if this is a pygments bug.  Consider filing a bug report with the pygments people, if one has not already been filed.

Edward
Reply all
Reply to author
Forward
0 new messages