Now accepts a flat plist of all its former parameters, including new :parameters and :actions properties to increase your control over the fate of your windows. The old usage of set-popup-rule! is deprecated and may not work right! The :ui popup module has also seen a major refactor to improve efficiency and load times. Sorry! This is the last "big" change before 2.1!
21 lines
744 B
EmacsLisp
21 lines
744 B
EmacsLisp
;;; emacs/imenu/config.el -*- lexical-binding: t; -*-
|
|
|
|
;; `imenu-anywhere'
|
|
(setq imenu-anywhere-delimiter ": ")
|
|
|
|
|
|
(after! imenu-list
|
|
(setq imenu-list-idle-update-delay 0.5)
|
|
|
|
(set-popup-rule! "^\\*Ilist"
|
|
:side 'right :size 35 :quit 'current :select nil :ttl 0)
|
|
|
|
(defun +imenu|cleanup-on-popup-close ()
|
|
"Clean up after `imenu-list-minor-mode' when killing the list window."
|
|
(unless +popup-buffer-mode
|
|
(when imenu-list--displayed-buffer
|
|
(with-current-buffer imenu-list--displayed-buffer
|
|
(imenu-list-minor-mode -1)))
|
|
(when (equal (buffer-name) imenu-list-buffer-name)
|
|
(kill-buffer (get-buffer imenu-list-buffer-name)))))
|
|
(add-hook '+popup-buffer-mode-hook #'+imenu|cleanup-on-popup-close))
|