From 1c125baa3f0d908eaf19698bbef2e81653e4f421 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 2 Feb 2023 19:41:09 +0200 Subject: [PATCH] Teach 'hs-minor-mode' about tree-sitter based modes * lisp/progmodes/hideshow.el (hs-special-modes-alist): Teach 'hs-minor-mode' about tree-sitter based modes. (Bug#61232) --- lisp/progmodes/hideshow.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index c160e6ad1df..b878986d7a4 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -256,10 +256,14 @@ This has effect only if `search-invisible' is set to `open'." (defvar hs-special-modes-alist (mapcar #'purecopy '((c-mode "{" "}" "/[*/]" nil nil) + (c-ts-mode "{" "}" "/[*/]" nil nil) (c++-mode "{" "}" "/[*/]" nil nil) + (c++-ts-mode "{" "}" "/[*/]" nil nil) (bibtex-mode ("@\\S(*\\(\\s(\\)" 1)) (java-mode "{" "}" "/[*/]" nil nil) + (java-ts-mode "{" "}" "/[*/]" nil nil) (js-mode "{" "}" "/[*/]" nil) + (js-ts-mode "{" "}" "/[*/]" nil) (mhtml-mode "{\\|<[^/>]*?" "}\\|]*[^/]>" "