From ba1b855038da5fb6c15db53dbd751f183398efdd Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Thu, 25 Jan 2024 07:28:56 +0200 Subject: Redo use-package config for imenu Just enable use-package-enable-imenu-support instead of making custom functions --- .emacs.d/init.el | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to '.emacs.d/init.el') diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 1ea9b24..8858809 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -50,27 +50,12 @@ (setf disabled-command-function nil ;; Enable all commands url-privacy-level 'high) ;; Privacy level -(defun thanos/imenu-use-package () - "Add `use-package' to imenu." - (add-to-list 'imenu-generic-expression - `(,(propertize "Package " 'face 'font-lock-keyword-face) - "\\(^\\s-*(use-package +\\)\\(\\_<.+\\_>\\)" 2))) - -(add-hook 'emacs-lisp-mode-hook #'thanos/imenu-use-package) - -(setf consult-imenu-config - '((emacs-lisp-mode :toplevel "Functions" - :types ((?f "Functions" font-lock-function-name-face) - (?m "Macros" font-lock-function-name-face) - (?p "Packages" font-lock-constant-face) - (?t "Types" font-lock-type-face) - (?v "Variables" font-lock-variable-name-face) - (?p "Package:" font-lock-keyword-face))))) - ;; Set and load custom.el (setf custom-file (locate-user-emacs-file "custom.el")) (load custom-file 'noerror) +;; Enable use-package support for imenu +(setf use-package-enable-imenu-support t) ;; Install straight.el (defvar bootstrap-version) -- cgit v1.2.3