[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: An anonymous IRC user's opinion
From: |
Juri Linkov |
Subject: |
Re: An anonymous IRC user's opinion |
Date: |
Wed, 20 Nov 2024 19:36:17 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) |
>>> +(defvar treesit--mode-associations
>>> + '((javascript-mode . js-ts-mode )
>>> + (c-or-c++-mode . c-or-c++-ts-mode)
>>> + (c-mode . c-ts-mode)
>>> + (c++-mode . c++-ts-mode)
>>> + ("\\.elixir\\'" . elixir-ts-mode)
>>> + ("\\.ex\\'" . elixir-ts-mode)
>>> + ("\\.go\\'" . go-ts-mode)
>>> + ;; And so on.
>>> + ;; Some info needed for interpreter-mode-alist as well.
>>> + ))
>>> +
>>> +(defcustom treesit-enable-modes nil
>>> + "Non-nil to enable tree-sitter modes during Emacs's startup."
>>> + :type 'boolean
>>> + :version "31.1"
>>> + :set #'treesit-enable-modes--set)
>>
>> This could support a list to enable ts-modes selectively,
>> e.g. (setq treesit-enable-modes '(elixir-ts-mode js-ts-mode))
>> to not enable 'c-ts-mode', etc.
>
> I might have missed something, but how would that then differ from
> configuring `major-mode-remap-alist' appropriately?
Maybe because it would be a little easier to customize?
But you are right, `major-mode-remap-alist' is already
easy to use. And customizing it has much more predictable
result than enabling ts-modes by loading .el files.
- Re: Turning on/off tree-sitter modes, (continued)
- Commands that change user options? [was: Turning on/off tree-sitter modes], Drew Adams, 2024/11/24
- Re: Turning on/off tree-sitter modes, Dmitry Gutov, 2024/11/23
- Re: Turning on/off tree-sitter modes, Juri Linkov, 2024/11/24
- Re: Turning on/off tree-sitter modes, Eli Zaretskii, 2024/11/24
- Re: An anonymous IRC user's opinion, Juri Linkov, 2024/11/19
- Re: An anonymous IRC user's opinion, Dmitry Gutov, 2024/11/19
- Re: An anonymous IRC user's opinion, Philip Kaludercic, 2024/11/20
- Re: An anonymous IRC user's opinion,
Juri Linkov <=
- Re: An anonymous IRC user's opinion, Dmitry Gutov, 2024/11/20
- Re: An anonymous IRC user's opinion, Dr. Arne Babenhauserheide, 2024/11/05
- Re: An anonymous IRC user's opinion, Eli Zaretskii, 2024/11/05
- Re: An anonymous IRC user's opinion, Dr. Arne Babenhauserheide, 2024/11/05
- Re: An anonymous IRC user's opinion, Eli Zaretskii, 2024/11/05
- Re: An anonymous IRC user's opinion, Philip Kaludercic, 2024/11/05
- Re: An anonymous IRC user's opinion, Dr. Arne Babenhauserheide, 2024/11/05
- Re: An anonymous IRC user's opinion, Philip Kaludercic, 2024/11/05
- Re: An anonymous IRC user's opinion, Dr. Arne Babenhauserheide, 2024/11/06
- Re: An anonymous IRC user's opinion, Philip Kaludercic, 2024/11/06