Display color icons for major modes by default.

This commit is contained in:
Vincent Zhang 2019-04-12 01:30:25 +08:00
parent a4de2b6198
commit 3464819e6c
3 changed files with 7 additions and 7 deletions

View file

@ -148,14 +148,14 @@ Strongly recommend to use
;; Please refer to https://github.com/bbatsov/projectile/issues/657. ;; Please refer to https://github.com/bbatsov/projectile/issues/657.
(setq doom-modeline-buffer-file-name-style 'truncate-upto-project) (setq doom-modeline-buffer-file-name-style 'truncate-upto-project)
;; Whether show `all-the-icons' or not (if nil nothing will be showed). ;; Whether display icons or not (if nil nothing will be showed).
(setq doom-modeline-icon t) (setq doom-modeline-icon t)
;; Whether show the icon for major mode. It respects `doom-modeline-icon'. ;; Whether display the icon for major mode. It respects `doom-modeline-icon'.
(setq doom-modeline-major-mode-icon t) (setq doom-modeline-major-mode-icon t)
;; Display color icons for `major-mode'. It respects `all-the-icons-color-icons'. ;; Display color icons for `major-mode'. It respects `all-the-icons-color-icons'.
(setq doom-modeline-major-mode-color-icon nil) (setq doom-modeline-major-mode-color-icon t)
;; Whether display minor modes or not. Non-nil to display in mode-line. ;; Whether display minor modes or not. Non-nil to display in mode-line.
(setq doom-modeline-minor-modes nil) (setq doom-modeline-minor-modes nil)

View file

@ -93,7 +93,7 @@ The icons may not be showed correctly in terminal.")
(defvar doom-modeline-major-mode-icon t (defvar doom-modeline-major-mode-icon t
"Whether show the icon for major mode. It respects `doom-modeline-icon'.") "Whether show the icon for major mode. It respects `doom-modeline-icon'.")
(defvar doom-modeline-major-mode-color-icon nil (defvar doom-modeline-major-mode-color-icon t
"Display color icons for `major-mode'. It respects `all-the-icons-color-icons'.") "Display color icons for `major-mode'. It respects `all-the-icons-color-icons'.")
(defvar doom-modeline-minor-modes nil (defvar doom-modeline-minor-modes nil

View file

@ -206,10 +206,10 @@ buffer where knowing the current project directory is important."
(all-the-icons-match-to-alist buffer-file-name (all-the-icons-match-to-alist buffer-file-name
all-the-icons-icon-alist)) all-the-icons-icon-alist))
(unless (string-empty-p file) (unless (string-empty-p file)
(doom-modeline-icon-for-file file :height height)) (doom-modeline-icon-for-file file :height height :v-adjust -0.05))
(doom-modeline-icon-for-mode major-mode :height height)))) (doom-modeline-icon-for-mode major-mode :height height :v-adjust -0.05))))
(if (symbolp icon) (if (symbolp icon)
(setq icon (doom-modeline-icon-faicon "file-o" :height height :v-adjust -0.0575))) (setq icon (doom-modeline-icon-faicon "file-o" :face 'all-the-icons-dsilver :height height :v-adjust -0.05)))
(unless (symbolp icon) (unless (symbolp icon)
(propertize icon (propertize icon
'help-echo (format "Major-mode: %s" (format-mode-line mode-name)) 'help-echo (format "Major-mode: %s" (format-mode-line mode-name))