Move imenu plugins from core to tools/imenu

This commit is contained in:
Henrik Lissner 2017-09-23 21:29:45 +02:00
parent 91137f83b1
commit 68aeaebff4
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
4 changed files with 30 additions and 7 deletions

View file

@ -269,11 +269,6 @@ with functions that require it (like modeline segments)."
:commands (describe-buffer describe-command describe-file
describe-keymap describe-option describe-option-of-type))
(def-package! imenu-anywhere
:commands (ido-imenu-anywhere ivy-imenu-anywhere helm-imenu-anywhere))
(def-package! imenu-list :commands imenu-list-minor-mode)
(def-package! pcre2el :commands rxt-quote-pcre)
(def-package! smart-forward

View file

@ -36,8 +36,6 @@
(package! editorconfig)
(package! expand-region)
(package! help-fns+)
(package! imenu-anywhere)
(package! imenu-list)
(package! pcre2el)
(package! smart-forward)
(package! smartparens)

View file

@ -0,0 +1,25 @@
;;; tools/imenu/config.el -*- lexical-binding: t; -*-
(def-package! imenu-anywhere
:commands (ido-imenu-anywhere ivy-imenu-anywhere helm-imenu-anywhere)
:config (setq imenu-anywhere-delimiter ": "))
(def-package! imenu-list
:commands imenu-list-minor-mode
:config
(setq imenu-list-focus-after-activation t)
(set! :popup imenu-list-buffer-name :size 35 :align 'right)
;; use popups
(defun doom*imenu-list-show ()
(doom-popup-buffer (get-buffer imenu-list-buffer-name)))
(advice-add #'imenu-list-show :override #'doom*imenu-list-show)
(advice-add #'imenu-list-show-noselect :override #'doom*imenu-list-show)
;; auto kill imenu-list on deactivation
(defun doom|kill-imenu-list ()
(when (and (not imenu-list-minor-mode)
(get-buffer imenu-list-buffer-name))
(kill-buffer (get-buffer imenu-list-buffer-name))))
(add-hook 'imenu-list-minor-mode-hook #'doom|kill-imenu-list))

View file

@ -0,0 +1,5 @@
;; -*- no-byte-compile: t; -*-
;;; tools/imenu/packages.el
(package! imenu-anywhere)
(package! imenu-list)