diff --git a/doc/emacs/modes.texi b/doc/emacs/modes.texi index c3008a48b04..4a9d753bf6f 100644 --- a/doc/emacs/modes.texi +++ b/doc/emacs/modes.texi @@ -507,6 +507,14 @@ predictable behavior, we recommend that you always customize this variable overrides any remapping that Emacs might decide to perform internally. +@vindex treesit-enabled-modes + For extra convenience of enabling major modes based on the tree-sitter, +the user option @code{treesit-enabled-modes} supports the value @code{t} +that enables all available tree-sitter based modes, or a list of mode +names to enable like @code{c-ts-mode}. After customizing this option, +it adds the corresponding mappings to @code{major-mode-remap-alist} such +as remapping from @code{c-mode} to @code{c-ts-mode}. + @findex normal-mode If you have changed the major mode of a buffer, you can return to the major mode Emacs would have chosen automatically, by typing diff --git a/etc/NEWS b/etc/NEWS index 09ef1d64647..4bf5f1dee9c 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -769,6 +769,7 @@ the default UI you get, i.e., when 'register-use-preview' is 'traditional'. ** Tree-sitter ++++ *** New user option 'treesit-enabled-modes'. You can customize it either to t to enable all available ts-modes, or to select a list of ts-modes to enable. Depending on customization,