From 05866ce30fe41354a15d4fb00f230f362101e8db Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 16 May 2021 21:15:55 -0400 Subject: [PATCH] ui/modeline: don't show encoding unless nondefault --- modules/ui/modeline/config.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/ui/modeline/config.el b/modules/ui/modeline/config.el index 9183364f019..c75c9ab8974 100644 --- a/modules/ui/modeline/config.el +++ b/modules/ui/modeline/config.el @@ -22,7 +22,14 @@ doom-modeline-persp-name nil doom-modeline-minor-modes nil doom-modeline-major-mode-icon nil - doom-modeline-buffer-file-name-style 'relative-from-project) + doom-modeline-buffer-file-name-style 'relative-from-project + ;; Only show file encoding if it's non-UTF-8 and different line endings + ;; than the current OSes preference + doom-modeline-buffer-encoding 'nondefault + doom-modeline-default-eol-type + (cond (IS-MAC 2) + (IS-WINDOWS 1) + (0))) ;; Fix modeline icons in daemon-spawned graphical frames. We have our own ;; mechanism for disabling all-the-icons, so we don't need doom-modeline to do