summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.emacs.d/init.el16
1 files changed, 13 insertions, 3 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index 6c17967..4c69e2a 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -608,6 +608,19 @@ For disabling the behaviour for certain buffers and/or modes."
ivy-use-virtual-buffers t
ivy-virtual-abbreviate 'abbreviate
ivy-count-format "%d/%d ")
+
+ (defvar b/ivy-ignore-buffer-modes '(magit-mode erc-mode dired-mode))
+ (defun b/ivy-ignore-buffer-p (str)
+ "Return non-nil if str names a buffer with a major mode
+derived from one of `b/ivy-ignore-buffer-modes'.
+
+This function is intended for use with `ivy-ignore-buffers'."
+ (let* ((buf (get-buffer str))
+ (mode (and buf (buffer-local-value 'major-mode buf))))
+ (and mode
+ (apply #'provided-mode-derived-p mode b/ivy-ignore-buffer-modes))))
+ (add-to-list 'ivy-ignore-buffers 'b/ivy-ignore-buffer-p)
+
(ivy-mode 1)
;; :custom-face
;; (ivy-minibuffer-match-face-2 ((t (:background "#e99ce8" :weight semi-bold))))
@@ -2091,9 +2104,6 @@ https://csclub.uwaterloo.ca/~abandali")
(erc-server-reconnect-attempts 5)
(erc-server-reconnect-timeout 3)
:config
- (with-eval-after-load 'ivy
- ;; ignore channel buffer names
- (add-to-list 'ivy-ignore-buffers "^#"))
(defun erc-cmd-OPME ()
"Request chanserv to op me."
(erc-message "PRIVMSG"