From f1ece3077e9a30d0057a7ab2ca5ababcfb0871e7 Mon Sep 17 00:00:00 2001 From: john muhl Date: Wed, 26 Feb 2025 10:31:24 -0600 Subject: [PATCH] Use TS to support 'hs-minor-mode' in 'lua-ts-mode' * lisp/progmodes/lua-ts-mode.el (lua-ts-mode): Add list type to 'treesit-thing-settings'. * lisp/progmodes/hideshow.el (hs-special-modes-alist): Remove regular expression based implementation. * test/lisp/progmodes/lua-ts-mode-resources/hide-show.lua: New file. * test/lisp/progmodes/lua-ts-mode-tests.el (lua-ts-test-hideshow): Add test. (Bug#76693) (cherry picked from commit 2f1b1414f78e471f1c4e852c1cbd8320cb0fa60d) --- lisp/progmodes/hideshow.el | 1 - lisp/progmodes/lua-ts-mode.el | 46 +++++++++++-------- .../lua-ts-mode-resources/hide-show.lua | 43 +++++++++++++++++ test/lisp/progmodes/lua-ts-mode-tests.el | 13 ++++++ 4 files changed, 83 insertions(+), 20 deletions(-) create mode 100644 test/lisp/progmodes/lua-ts-mode-resources/hide-show.lua diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index c9b43fe8e16..c1d62fb92ab 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -266,7 +266,6 @@ This has effect only if `search-invisible' is set to `open'." (java-ts-mode "{" "}" "/[*/]" nil nil) (js-mode "{" "}" "/[*/]" nil) (js-ts-mode "{" "}" "/[*/]" nil) - (lua-ts-mode "{\\|\\[\\[" "}\\|\\]\\]" "--" nil) (mhtml-mode "{\\|<[^/>]*?" "}\\|]*[^/]>" "