Subject: Re: bug#12518: outline-minor-mode doesn't work well in C(++) mode

From: Juri Linkov <[email-masked]>
Date: Sat, 13 Jan 2024 19:55:59 +0200

>> That was 12 years ago, and it has gotten a little bit of attention at
>> least in the time since.  Could you summarize some of the current issues
>> with `outline-minor-mode'?
>
> I stopped trying to use Outline minor mode in C and can't remember what
> were the main annoyances.  Obviously my bug report was ...hmmm... really
> poor, so it's not worth keeping.
>
> IIRC I think one of the main things I wanted was to be able to fold "a
> function" so we'd keep a single line for that function, whereas
> currently a function like:
>
>     static void
>     myfun (blabla
>            blabla)
>     {
>       bla blabla;
>     }
>
> is treated as 3 independent "headings".

The most reliable way would be to rely on the tree-sitter.
There is already treesit-simple-imenu-settings, but it has
no information about levels, and I have not figured out yet
how to get it.  But anyway this should be in a separate
feature request.