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
'help-echo (format "Major-mode: `%s'" major-mode)
'display '(raise 0)
'face (cond (buffer-read-only 'doom-modeline-warning)
((buffer-modified-p) 'doom-modeline-buffer-modified)
((and buffer-file-name
(not (file-exists-p buffer-file-name)))
'doom-modeline-urgent)
((buffer-narrowed-p) 'doom-modeline-warning)))
'face '(:height 1.1
:family (all-the-icons-icon-family-for-mode major-mode)
:inherit))
" ")))))
(add-hook 'find-file-hook 'doom-modeline-update-buffer-file-icon)
(add-hook 'after-save-hook 'doom-modeline-update-buffer-file-icon)