]> git.eshelyaron.com Git - kubed.git/commitdiff
; Teach Imenu about 'kubed-define-resource'
authorEshel Yaron <me@eshelyaron.com>
Mon, 29 Jul 2024 14:35:47 +0000 (16:35 +0200)
committerEshel Yaron <me@eshelyaron.com>
Mon, 29 Jul 2024 14:35:47 +0000 (16:35 +0200)
kubed.el

index ae5a2609401799deeb8a74bcd4177230ba6cba48..d3cea4efa640f067a68bfb2f4da76503aa2a4475 100644 (file)
--- a/kubed.el
+++ b/kubed.el
@@ -894,6 +894,14 @@ Optional argument DEFAULT is the minibuffer default argument." resource)
          "E" #',expl-cmd
          ,@prf-keys))))
 
+(setf
+ ;; Teach Imenu about `kubed-define-resource'.
+ (alist-get "KubedResource" lisp-imenu-generic-expression nil nil #'equal)
+ (list (concat "^\\s-*(kubed-define-resource\\s-+\\("
+               lisp-mode-symbol-regexp
+               "\\)")
+       1))
+
 (defmacro kubed--static-if (condition then-form &rest else-forms)
   "A conditional compilation macro.
 Evaluate CONDITION at macro-expansion time.  If it is non-nil, expand