+ :popup -> set-popup-rule! + :popups -> set-popup-rules! + :company-backend -> set-company-backend! + :evil-state -> set-evil-initial-state! I am slowly phasing out the setting system (def-setting! and set!), starting with these. What are autodefs? These are functions that are always defined, whether or not their respective modules are enabled. However, when their modules are disabled, they are replaced with macros that no-op and don't waste time evaluating their arguments. The old set! function will still work, for a while.
22 lines
767 B
EmacsLisp
22 lines
767 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) (transient . 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))
|