Fix #31: support input-method.

This commit is contained in:
Vincent Zhang 2018-09-28 16:27:52 +08:00
parent 92b5bf5c79
commit 52243514af

View file

@ -1043,13 +1043,28 @@ See `mode-line-percent-position'.")
((eq tag evil-replace-state-tag) 'doom-modeline-evil-replace-state)))))))
;;
;; input method
;;
(doom-modeline-def-segment input-method
"The current input method."
(cond
(current-input-method
(concat current-input-method-title " "))
((and (bound-and-true-p evil-mode)
(bound-and-true-p evil-input-method))
(concat
(nth 3 (assoc default-input-method input-method-alist))
" "))))
;;
;; Mode lines
;;
(doom-modeline-def-modeline 'main
'(workspace-number window-number bar evil-state matches " " buffer-info buffer-position " " selection-info)
'(global buffer-encoding major-mode process vcs flycheck))
'(global input-method buffer-encoding major-mode process vcs flycheck))
(doom-modeline-def-modeline 'minimal
'(bar matches " " buffer-info)
@ -1057,7 +1072,7 @@ See `mode-line-percent-position'.")
(doom-modeline-def-modeline 'special
'(window-number bar evil-state matches " " buffer-info-simple buffer-position " " selection-info)
'(global buffer-encoding major-mode process flycheck))
'(global input-method buffer-encoding major-mode process flycheck))
(doom-modeline-def-modeline 'project
'(window-number bar buffer-default-directory)