Hi Leandro,

On 02/05/2011 06:36 PM, Leandro Hermida wrote:
> Just wondering if there is a feature roadmap for Padre, particularly
> on syntax highlighting capabilities?  I really love the IDE except for
> the syntax highlighting capabilities... Scintilla really sucks and and
> you are always forced to revert to it when you file is anything bigger
> than a tiny amount of code or is there a workaround to force it to use
> the much better Kate or PPIx in all cases?

This is quite a difficult problem to solve. All known alternatives for 
syntax highlighting have some serious downsides:

- Scintilla isn't great at parsing perl. Particularly, the version we 
have access to doesn't recognize a lot of features from recent versions 
of perl. This would be somewhat improved if the most recent versions of 
Scintilla were available through Wx.

- The Perl & (Kate|PPI) based lexer/parsers are simply too slow to be 
used for large documents. This is why you see Padre automatically fall 
back to the faster highlighter for large documents. I believe you can 
set the threshold for this in the configuration. I'm sure somebody else 
on this list knows exactly how. If in doubt, grep through Padre::Config.

Personally, I'm a vim user and must say that vim syntax highlighting for 
Perl isn't the worst. But extracting such functionality from a project 
such as vim is probably prohibitive.

If I remember correctly, the Kate highlighter is huge amounts of 
auto-generated Perl code from some templates taken from Kate. I am not 
sure if the original generator code is still available and/or 
maintained, but I do wonder whether generating C code from the templates 
and then compiling that as an XS module would make the Kate highlighter 
fast enough to be used in place of Scintilla?

Alas, I won't be able tackle this, but since I thought about it some way 
back, I figured sharing my thoughts might help jump start somebody 
else's efforts.

Best regards,
Steffen
_______________________________________________
Padre-dev mailing list
Padre-dev@perlide.org
http://mail.perlide.org/mailman/listinfo/padre-dev

Reply via email to