[Geany-Users] Code folding in geany 1.26

Matthew Brush mbrush at xxxxx
Wed Dec 7 01:17:45 UTC 2016


On 2016-12-06 05:08 PM, Lex Trotman wrote:
> On 7 December 2016 at 11:01, Matthew Brush <mbrush at codebrainz.ca> wrote:
>> On 2016-11-26 07:20 AM, H wrote:
>>>
>>> [...]
>>> Ideally I would also like to be able to fold markdown text, not only
>>> programming code. Has anyone had success with that?
>>>
>>
>> I've never seen it implemented. If you were motivated, you could do it in a
>> plugin using Scintilla's folding API[0], but I've not seen any plugins that
>> do that.
>
> I don't think Geany supports SCI_LEX_CONTAINER that you need to know
> when/what to lex.
>

A plugin could look at the code and notifications and decide what and 
when to fold. If the lexer does folding already (unlike Markdown), the 
plugin would be fighting the lexer's setting of fold levels, and would 
probably require disabling code folding in Geany and doing everything in 
the plugin.

The proper solution would be to improve Scintilla's Markdown lexer to 
support folding though[0].

Regards,
Matthew Brush

[0]: https://sourceforge.net/p/scintilla/feature-requests/971/


More information about the Users mailing list