emacs-devel
[Top][All Lists]
Advanced

[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: Tue, 19 Nov 2024 19:59:24 +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.



reply via email to

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