Before treesit.el went to set those variables, there have been already a
bunch of packages based on outline-minor-mode for partitioning code into
sections using comments only by highlighting headers and providing
navigation, folding, etc. inspired by emacs-lisp-mode's outline-regexp
settings.
Such ones enable a feel of "literate" programming by bringing
outline-mode features to code section delimited by headings (special
comments like ";;;", ";; *") using just comments regardless of code
semantic.
The above is my use of outline-minor-mode, maybe other people have
different use cases. treesit.el makes the configuration harder by the
additional variable setting. I wish there's a hook like
treesit-after-major-mode-setup-hook to let people fine-tune or even undo
settings, but of course treesit-disable-features to prevent any
execution from the start is still better.
On Nov 21 2024, at 1:50 am, Eli Zaretskii <eliz@gnu.org> wrote:
> Cc: "74412@debbugs.gnu.org" <74412@debbugs.gnu.org>
> Date: Thu, 21 Nov 2024 00:06:41 +0700
> From: Daan Ro <daanturo@gmail.com>
>
> Personally I also find treesit's decision to set outline variables
> somewhat intrusive.
I don't understand why. These variables are meant to be set by modes,
so treesit.el uses them exactly as intended.