Evil: Disable modeline coloring when doom-modeline is loaded, not when a Doom theme is.

master
Pierre Neidhardt 2021-02-06 10:27:58 +01:00
parent eb17fdefdc
commit f5d332f733
1 changed files with 2 additions and 2 deletions

View File

@ -66,8 +66,8 @@
;;; Change mode-line color by Evil state.
(setq evil-default-modeline-color (cons (face-background 'mode-line) (or (face-foreground 'mode-line) "black")))
(defun ambrevar/evil-color-modeline ()
;; Doom themes already have support for Evil.
(if (string-prefix-p "doom" (symbol-name (car custom-enabled-themes)))
;; Doom-modeline already supports Evil.
(if (and (boundp 'doom-modeline-mode) doom-modeline-mode)
(remove-hook 'post-command-hook 'ambrevar/evil-color-modeline)
(let ((color (cond ((minibufferp) evil-default-modeline-color)
((evil-insert-state-p) '("#006fa0" . "#ffffff")) ; 00bb00