diff --git a/doom-modeline-segments.el b/doom-modeline-segments.el index c24acdd..29f22ae 100644 --- a/doom-modeline-segments.el +++ b/doom-modeline-segments.el @@ -412,7 +412,11 @@ directory, the file name, and its state (modified, read-only or non-existent)." ((doom-modeline--active) 'doom-modeline-buffer-file) (t 'mode-line-inactive)))) + ;; +;; encoding +;; + (doom-modeline-def-segment buffer-encoding "Displays the encoding and eol style of the buffer the same way Atom does." (propertize @@ -432,6 +436,16 @@ directory, the file name, and its state (modified, read-only or non-existent)." 'local-map mode-line-coding-system-map)) +;; +;; indentation +;; + +(doom-modeline-def-segment indent-info + "Displays the indentation information." + (propertize (format " %s %d " + (if indent-tabs-mode "TAB" "SPC") tab-width) + 'face (if (doom-modeline--active) 'mode-line 'mode-line-inactive))) + ;; ;; remote host ;; diff --git a/doom-modeline.el b/doom-modeline.el index b9187ce..66638c9 100644 --- a/doom-modeline.el +++ b/doom-modeline.el @@ -87,7 +87,7 @@ (doom-modeline-def-modeline 'main '(bar workspace-name window-number modals matches buffer-info remote-host buffer-position parrot selection-info) - '(objed-state misc-info persp-name fancy-battery irc mu4e github debug lsp minor-modes input-method buffer-encoding major-mode process vcs checker)) + '(objed-state misc-info persp-name fancy-battery irc mu4e github debug lsp minor-modes input-method indent-info buffer-encoding major-mode process vcs checker)) (doom-modeline-def-modeline 'minimal '(bar matches " " buffer-info) @@ -95,7 +95,7 @@ (doom-modeline-def-modeline 'special '(bar window-number modals matches buffer-info-simple buffer-position parrot selection-info) - '(objed-state misc-info fancy-battery irc-buffers debug lsp minor-modes input-method buffer-encoding major-mode process checker)) + '(objed-state misc-info fancy-battery irc-buffers debug lsp minor-modes input-method indent-info buffer-encoding major-mode process checker)) (doom-modeline-def-modeline 'project '(bar window-number " " buffer-default-directory)