> So a new option could have a similar name, e.g.
> 'treesit-disable-features' that the users could set to e.g.
>
> (setopt treesit-disable-features '(outline imenu))

That's much better, indeed.

Daanturo
On Nov 21 2024, at 12:18 am, Juri Linkov <juri@linkov.net> wrote:
> Personally I also find treesit's decision to set outline variables
> somewhat intrusive. I have to advice `treesit-major-mode-setup` to
> disable that. If only there is an easier way to do it like the
> attached patch.
>
> +(defcustom treesit-enable-outline-settings t
> + "Non-nil means Tree sitter-based outline settings are enabled."
> + :type 'boolean
> + :version "31.1")

Should such an option be more general and allow
disabling some other features too?

There is already 'treesit-font-lock-recompute-features'.
So a new option could have a similar name, e.g.
'treesit-disable-features' that the users could set to e.g.

(setopt treesit-disable-features '(outline imenu))
Sent from Mailspring