[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Turning on/off tree-sitter modes (was: An anonymous IRC user's opini
From: |
Eli Zaretskii |
Subject: |
Re: Turning on/off tree-sitter modes (was: An anonymous IRC user's opinion) |
Date: |
Sat, 23 Nov 2024 15:24:50 +0200 |
[I've started a new thread about this.]
> Date: Fri, 22 Nov 2024 17:08:52 +0200
> Cc: johan.myreen@gmail.com, emacs-devel@gnu.org
> From: Dmitry Gutov <dmitry@gutov.dev>
>
> >> That's what my patch aims to do, to be the replacement for the
> >> capabilities we currently have, but in a more "ecological" way. And add
> >> a user option, like I think you requested.
> >
> > Agreed. So I'm asking again: what is the next step? Should we start
> > a new discussion about replacing (on master) the current
> > implementation with a command based on your patch?
>
> Sure.
>
> Not a command, though - a user option. The command is 'M-x
> customize-variable', at least in the current version. Though I suppose
> that's also up for discussion.
>
> > One thing that I
> > think is missing in your patch is a way to go back to use the non-TS
> > modes (where they are available).
>
> I think it does that already - but only for new buffers. That could be
> implemented without too much trouble, now or in a later revision.
>
> > But maybe people don't think we
> > should have that?
>
> Not sure which would be more natural. But if we implement switching for
> existing buffers when when treesit-enable-modes is customized to t, I
> suppose the reverse could also be expected.
>
> > Another thing that seems to be missing is a command
> > to enable just one TS-based mode, not all of them.
>
> How about if that's done like:
>
> (setopt treesit-enable-modes '(c-ts-mode))
>
> Or maybe 'M-x treesit-add-enabled-mode' can be added too.
I think a command is better.
Here are the issues that are currently not handled by your patch,
which perhaps require modifications and additions (but should probably
be discussed first):
. we need the ability to turn on and off selected TS-based modes,
and do it easily
. we should include in this feature handling of all the TS-based
modes in core (right now, I don't see python-ts-mode,
ruby-ts-mode, and csharp-ts-mode, at least)
. we should decide how to handle TS-based modes whose non-TS
counterparts are available as 3rd-party packages
. we should decide whether we want to modify auto-mode-alist or use
major-mode remapping for all the TS-based modes
- Re: An anonymous IRC user's opinion, (continued)
- Re: An anonymous IRC user's opinion, Eli Zaretskii, 2024/11/20
- Re: An anonymous IRC user's opinion, Dmitry Gutov, 2024/11/20
- Re: An anonymous IRC user's opinion, Eli Zaretskii, 2024/11/21
- Re: An anonymous IRC user's opinion, Dmitry Gutov, 2024/11/21
- Re: An anonymous IRC user's opinion, Eli Zaretskii, 2024/11/21
- Re: An anonymous IRC user's opinion, Dmitry Gutov, 2024/11/21
- Re: An anonymous IRC user's opinion, Eli Zaretskii, 2024/11/21
- Re: An anonymous IRC user's opinion, Dmitry Gutov, 2024/11/21
- Re: An anonymous IRC user's opinion, Eli Zaretskii, 2024/11/22
- Re: An anonymous IRC user's opinion, Dmitry Gutov, 2024/11/22
- Re: Turning on/off tree-sitter modes (was: An anonymous IRC user's opinion),
Eli Zaretskii <=
- Re: Turning on/off tree-sitter modes, Dmitry Gutov, 2024/11/23
- Re: Turning on/off tree-sitter modes, Eli Zaretskii, 2024/11/23
- Re: Turning on/off tree-sitter modes, Dmitry Gutov, 2024/11/23
- Re: Turning on/off tree-sitter modes, Steinar Bang, 2024/11/24
- Re: Turning on/off tree-sitter modes, Juri Linkov, 2024/11/23
- Re: Turning on/off tree-sitter modes, Eli Zaretskii, 2024/11/23
- Re: Turning on/off tree-sitter modes, Juri Linkov, 2024/11/23
- Re: Turning on/off tree-sitter modes, Dmitry Gutov, 2024/11/23
- Re: Turning on/off tree-sitter modes, Stefan Monnier, 2024/11/24
- Commands that change user options? [was: Turning on/off tree-sitter modes], Drew Adams, 2024/11/24