[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Make all tree-sitter modes optional
From: |
Eli Zaretskii |
Subject: |
Re: Make all tree-sitter modes optional |
Date: |
Tue, 17 Jan 2023 20:40:01 +0200 |
> Date: Tue, 17 Jan 2023 20:21:18 +0200
> Cc: casouri@gmail.com, monnier@iro.umontreal.ca, larsi@gnus.org,
> theo@thornhill.no, jostein@secure.kjonigsen.net, emacs-devel@gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
>
> +The new modes based on tree-sitter are for now entirely optional, and
> +you must turn them on manually, or load them in your init file, or
> +customize 'auto-mode-alist' to turn them on automatically for certain
> +files.
>
> I thought there would be something more in the docs, given that the new
> behavior is unusual.
What do you suggest to add?
> But I see you are referring to auto-mode-alist here, modifying which
> will still be necessary for js-ts-mode and python-ts-mode. Which will
> touch a lot of users, possibly even the majority of tree-sitter
> enthusiasts, given that JS and Python are some of the most popular
> languages these days.
>
> And yet you rejected my counter-proposal claiming (if I got your
> position right) that modying auto-mode-alist is difficult/annoying/etc
> for an average user. To quote:
>
> - Customizing auto-mode-alist is not the easiest task, it
> requires good knowledge of Emacs regexps and alists. So
> asking anyone who wants to try using the tree-sitter modes to
> do that is not the best idea from the POV of user-friendliness.
>
> So which is it?
Both. I mention auto-mode-alist as the last alternative, for those
who are fine with going that way. It isn't black-and-white.
> To "try out" tree-sitter modes, the users can 'M-x js-ts-mode' or etc
> either way. But to switch to the said mode, they will need to deal with
> auto-mode-alist, again, without any alternative.
That's specific to js-ts-mode (and one other, I think) because they
share the .el file with a non-tree-sitter mode. If there's a
reasonable way to give them separate files, things would be easier.
But this is not a documentation issue, first and foremost.
- Re: Make all tree-sitter modes optional, (continued)
- Re: Make all tree-sitter modes optional, Eli Zaretskii, 2023/01/17
- Re: Make all tree-sitter modes optional, Dmitry Gutov, 2023/01/17
- Re: Make all tree-sitter modes optional, Eli Zaretskii, 2023/01/17
- Re: Make all tree-sitter modes optional, Dmitry Gutov, 2023/01/17
- Re: Make all tree-sitter modes optional, Eli Zaretskii, 2023/01/17
- Re: Make all tree-sitter modes optional, Dmitry Gutov, 2023/01/17
- Re: Make all tree-sitter modes optional, Eli Zaretskii, 2023/01/17
- Re: Make all tree-sitter modes optional, Dmitry Gutov, 2023/01/17
- Re: Make all tree-sitter modes optional, Eli Zaretskii, 2023/01/17
- Re: Make all tree-sitter modes optional, Dmitry Gutov, 2023/01/17
- Re: Make all tree-sitter modes optional,
Eli Zaretskii <=
- Re: Make all tree-sitter modes optional, Dmitry Gutov, 2023/01/17
- Re: Make all tree-sitter modes optional, Eli Zaretskii, 2023/01/17
- Re: Make all tree-sitter modes optional, Dmitry Gutov, 2023/01/17
- Re: Make all tree-sitter modes optional, Yuan Fu, 2023/01/17
- Re: Make all tree-sitter modes optional, Dmitry Gutov, 2023/01/17
- Re: Make all tree-sitter modes optional, Eli Zaretskii, 2023/01/17
- Re: Make all tree-sitter modes optional, Dmitry Gutov, 2023/01/17
- Re: Make all tree-sitter modes optional, Eli Zaretskii, 2023/01/18
- Re: Make all tree-sitter modes optional, Dmitry Gutov, 2023/01/18
- Re: Make all tree-sitter modes optional, Eli Zaretskii, 2023/01/18