Formalize the face of major mode icon.

This commit is contained in:
Vincent Zhang 2018-11-25 01:10:53 +08:00
parent f244142693
commit 336cab5ed4

View file

@ -680,12 +680,9 @@ buffer where knowing the current project directory is important."
(propertize icon (propertize icon
'help-echo (format "Major-mode: `%s'" major-mode) 'help-echo (format "Major-mode: `%s'" major-mode)
'display '(raise 0) 'display '(raise 0)
'face (cond (buffer-read-only 'doom-modeline-warning) 'face '(:height 1.1
((buffer-modified-p) 'doom-modeline-buffer-modified) :family (all-the-icons-icon-family-for-mode major-mode)
((and buffer-file-name :inherit))
(not (file-exists-p buffer-file-name)))
'doom-modeline-urgent)
((buffer-narrowed-p) 'doom-modeline-warning)))
" "))))) " ")))))
(add-hook 'find-file-hook 'doom-modeline-update-buffer-file-icon) (add-hook 'find-file-hook 'doom-modeline-update-buffer-file-icon)
(add-hook 'after-save-hook 'doom-modeline-update-buffer-file-icon) (add-hook 'after-save-hook 'doom-modeline-update-buffer-file-icon)