[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tree-sitter version?
From: |
Eli Zaretskii |
Subject: |
Re: tree-sitter version? |
Date: |
Fri, 25 Nov 2022 13:52:28 +0200 |
> From: Yuan Fu <casouri@gmail.com>
> Date: Fri, 25 Nov 2022 01:43:39 -0800
> Cc: "T.V Raman" <raman@google.com>,
> emacs-devel@gnu.org
>
> > BTW, how can a user decide that tree-sitter modes should be used? For
> > example, when I open a json file I get js-json-mode, not json-ts-mode,
> > which also works, so support is available. Should user's augment
> > auto-mode-alist? Or is there some "enable TS whenever possible and the
> > devs think its support is in a usable state for that language" toggle?
>
> There is no global toggle, unfortunately. You could use auto-mode-alist or
> major-mode-remap-alist to enable tree-sitter modes, yes. I imagine there
> could be a third-party package that automatically enables tree-sitter for all
> supported nodes, maybe.
I'm not sure a global toggle would make sense at this time: even if the user
has the tree-sitter library installed, there's no guarantee that the grammar
for a particular language is also installed. Only the user knows whether it
is or isn't. Enabling a mode just to get an error message makes little
sense.
Perhaps in the future distros will catch up and provide installation of
grammars that includes everything available, but until they do, we are
better off with individual toggles.
There's also a question of user preferences: some might prefer the
non-TS versions for whatever reasons.
IMO, per-mode toggles is currently the best compromise, given that we don't
yet have enough user feedback and experience to decide on more general
knobs.
- tree-sitter version?, T.V Raman, 2022/11/23
- Re: tree-sitter version?, Yuan Fu, 2022/11/23
- Re: tree-sitter version?, T.V Raman, 2022/11/23
- Re: tree-sitter version?, Yuan Fu, 2022/11/24
- Re: tree-sitter version?, Tassilo Horn, 2022/11/24
- Re: tree-sitter version?, Yuan Fu, 2022/11/25
- Re: tree-sitter version?,
Eli Zaretskii <=
- Re: tree-sitter version?, T.V Raman, 2022/11/25
- Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?), Daniel Martín, 2022/11/25
- Re: Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?), Eli Zaretskii, 2022/11/25
- Re: Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?), Theodor Thornhill, 2022/11/25
- Re: Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?), Elliott Shugerman, 2022/11/25
- Re: Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?), Rudolf Adamkovič, 2022/11/25
- Re: Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?), Eli Zaretskii, 2022/11/25
- Re: Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?), Theodor Thornhill, 2022/11/25
- Re: Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?), Theodor Thornhill, 2022/11/25
- Re: Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?), Stefan Kangas, 2022/11/25