emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Average-user-facing interface for tree-sitter


From: Stefan Monnier
Subject: Re: Average-user-facing interface for tree-sitter
Date: Tue, 18 Oct 2022 17:48:10 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> For separated major modes, they need to do a bit of a dance.

I don't think we should even try and document what they should do:
they're evil and we should spend our efforts merging them into one instead.

> Besides switching to the new major mode, they need  to add (mode
> . new-mode) to major-mode-remap-alist if global-treesit-mode is on (so
> next time we go straight to new-mode as long as global-treesit-mode is
> on).  They also need to add (mode . new-mode) to
> treesit-remapped-major-mode-alist so global-treesit-mode can remove
> these entries when it turns off.

Too much magic, IMO.  Let each case handle it manually, since I suspect
that every case will be different and the best thing to do will vary (it
depends on whether the two modes are still actively maintained, whether
by the same authors or not, the relative age and popularity of the
respective modes, ...).


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]