Add buffer-info-simple modeline segment

This commit is contained in:
Henrik Lissner 2017-06-12 14:31:12 +02:00
parent d9d049549f
commit 571b5c55d8
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -291,6 +291,11 @@ directory, the file name, and its state (modified, read-only or non-existent)."
(propertize file-path 'face `(:inherit ,faces))
file-path)))))
;;
(def-modeline-segment! buffer-info-simple
"Return the current buffer name only, but with fontification."
(propertize "%b" 'face (if (active) 'doom-modeline-buffer-file)))
;;
(def-modeline-segment! buffer-encoding
"Displays the encoding and eol style of the buffer the same way Atom does."
@ -545,7 +550,7 @@ with `evil-ex-substitute', and/or 4. The number of active `iedit' regions."
(media-info major-mode))
(def-modeline! special
(bar matches " %b %l:%c %p " selection-info)
(bar matches " " buffer-info-simple " %l:%c %p " selection-info)
(buffer-encoding major-mode flycheck))
(def-modeline! project