mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-24 03:50:24 +10:00
Minor updates.
This commit is contained in:
@@ -356,7 +356,7 @@ Requires `anzu', also `evil-anzu' if using `evil-mode' for compatibility with
|
||||
'((:eval
|
||||
(propertize
|
||||
(let ((buffer-file-name (buffer-file-name (buffer-base-buffer))))
|
||||
(or (when buffer-file-name
|
||||
(or (when (and (not (file-remote-p buffer-file-name)) buffer-file-name)
|
||||
(if-let (project (doom-project-root buffer-file-name))
|
||||
(let ((filename (or buffer-file-truename (file-truename buffer-file-name))))
|
||||
(file-relative-name filename (concat project "..")))))
|
||||
@@ -458,14 +458,17 @@ lines are selected, or the NxM dimensions of a block selection.")
|
||||
|
||||
;;; `+modeline-encoding'
|
||||
(def-modeline-var! +modeline-encoding
|
||||
'(:eval
|
||||
(concat (coding-system-eol-type-mnemonic buffer-file-coding-system)
|
||||
" "
|
||||
(let ((sys (coding-system-plist buffer-file-coding-system)))
|
||||
`(:eval
|
||||
(let ((sys (coding-system-plist buffer-file-coding-system))
|
||||
(eol (coding-system-eol-type-mnemonic buffer-file-coding-system)))
|
||||
(concat (unless (equal eol ,(if IS-WINDOWS "CRLF" "LF"))
|
||||
(concat " " eol " "))
|
||||
(if (memq (plist-get sys :category)
|
||||
'(coding-category-undecided coding-category-utf-8))
|
||||
"UTF-8"
|
||||
(upcase (symbol-name (plist-get sys :name))))))))
|
||||
(unless (string-match-p "utf-8" (symbol-name buffer-file-coding-system))
|
||||
"UTF-8 ")
|
||||
(concat (upcase (symbol-name (plist-get sys :name)))
|
||||
" "))))))
|
||||
|
||||
;; Clearer mnemonic labels for EOL styles
|
||||
(setq eol-mnemonic-dos "CRLF"
|
||||
@@ -491,7 +494,6 @@ lines are selected, or the NxM dimensions of a block selection.")
|
||||
vc-mode " "))
|
||||
" "
|
||||
+modeline-encoding
|
||||
" "
|
||||
(+modeline-checker ("" +modeline-checker " "))))
|
||||
|
||||
(def-modeline! 'project
|
||||
|
||||
Reference in New Issue
Block a user