Feature: #70 Support for the package Minions.

This commit is contained in:
Vincent Zhang 2018-12-21 01:41:39 +08:00
parent 7f95e8b8d8
commit 5cf1857add
2 changed files with 19 additions and 4 deletions

View file

@ -21,6 +21,7 @@ The `doom-modeline` was designed for minimalism, and offers:
- An indicator for recording a macro - An indicator for recording a macro
- Local `python`/`ruby`/`perl`/`go`/`elixir` version in the major-mode - Local `python`/`ruby`/`perl`/`go`/`elixir` version in the major-mode
- A customizable mode-line height (see `doom-modeline-height`) - A customizable mode-line height (see `doom-modeline-height`)
- A minor modes segment which is compatible with `minions`
- An error/warning count segment for `flycheck` - An error/warning count segment for `flycheck`
- A workspace number segment for `eyebrowse` - A workspace number segment for `eyebrowse`
- A perspective name segment for `persp-mode` - A perspective name segment for `persp-mode`

View file

@ -40,6 +40,7 @@
;; - An indicator for recording a macro ;; - An indicator for recording a macro
;; - Local python/ruby version in the major-mode ;; - Local python/ruby version in the major-mode
;; - A customizable mode-line height (see doom-modeline-height) ;; - A customizable mode-line height (see doom-modeline-height)
;; - A minor modes segment which is compatible with minions
;; - An error/warning count segment for flycheck ;; - An error/warning count segment for flycheck
;; - A workspace number segment for eyebrowse ;; - A workspace number segment for eyebrowse
;; - A perspective name segment for persp-mode ;; - A perspective name segment for persp-mode
@ -170,6 +171,8 @@ It returns a file name which can be used directly as argument of
(defvar iedit-mode) (defvar iedit-mode)
(defvar iedit-occurrences-overlays) (defvar iedit-occurrences-overlays)
(defvar mc/mode-line) (defvar mc/mode-line)
(defvar minions-mode)
(defvar minions-mode-line-lighter)
(defvar persp-nil-name) (defvar persp-nil-name)
(defvar symbol-overlay-keywords-alist) (defvar symbol-overlay-keywords-alist)
(defvar symbol-overlay-temp-symbol) (defvar symbol-overlay-temp-symbol)
@ -205,6 +208,7 @@ It returns a file name which can be used directly as argument of
(declare-function image-get-display-property 'image-mode) (declare-function image-get-display-property 'image-mode)
(declare-function lsp-mode-line 'lsp-mode) (declare-function lsp-mode-line 'lsp-mode)
(declare-function magit-toplevel 'magit-git) (declare-function magit-toplevel 'magit-git)
(declare-function minions-minor-modes-menu 'minions)
(declare-function persp-add-buffer 'persp-mode) (declare-function persp-add-buffer 'persp-mode)
(declare-function persp-contain-buffer-p 'persp-mode) (declare-function persp-contain-buffer-p 'persp-mode)
(declare-function persp-remove-buffer 'persp-mode) (declare-function persp-remove-buffer 'persp-mode)
@ -929,10 +933,20 @@ mouse-3: Toggle minor modes"
(doom-modeline-def-segment minor-modes (doom-modeline-def-segment minor-modes
(when doom-modeline-minor-modes (when doom-modeline-minor-modes
(propertize (if (bound-and-true-p minions-mode)
(concat (format-mode-line `(:propertize ("" minor-mode-alist))) (concat
" ") " "
'face (if (doom-modeline--active) 'doom-modeline-buffer-minor-mode)))) (propertize minions-mode-line-lighter
'face (if (doom-modeline--active) 'doom-modeline-buffer-minor-mode)
'help-echo "Minions
mouse-1: Display minor modes menu"
'mouse-face 'mode-line-highlight
'local-map (make-mode-line-mouse-map
'mouse-1 #'minions-minor-modes-menu))
" ")
(propertize
(concat (format-mode-line `(:propertize ("" minor-mode-alist))) " ")
'face (if (doom-modeline--active) 'doom-modeline-buffer-minor-mode)))))
;; ;;