]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/textmodes/css-mode.el (css-ts-mode--outline-predicate): Improve.
authorJuri Linkov <juri@linkov.net>
Thu, 13 Mar 2025 18:25:29 +0000 (20:25 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 15 Mar 2025 15:28:14 +0000 (16:28 +0100)
Set separate value that differs from 'css--treesit-simple-imenu-settings'
by adding new node "at_rule".

(cherry picked from commit abeeb6eb748652b48124fa34db718f7c749b4d8b)

lisp/textmodes/css-mode.el

index 9960211ac646307c5f6749706dcd2bc2327031c2..17da056f41edee4c3e0ef5d8cdf1ced71c9197bb 100644 (file)
@@ -1824,7 +1824,13 @@ rgb()/rgba()."
   "Settings for `treesit-simple-imenu'.")
 
 (defvar css-ts-mode--outline-predicate
-  (nth 1 (car css--treesit-simple-imenu-settings))
+  (rx bos (or "rule_set"
+              "media_statement"
+              "keyframes_statement"
+              "keyframe_block"
+              "supports_statement"
+              "at_rule")
+      eos)
   "Predicate for `treesit-outline-predicate'.")
 
 (defvar css--treesit-defun-type-regexp