Doom: Display ANSI color codes in log files

This commit is contained in:
2020-06-14 11:12:00 -07:00
parent ad43cb6601
commit 40022ad61e
2 changed files with 531 additions and 0 deletions

View File

@@ -76,6 +76,16 @@
(setq-default eshell-cmpl-ignore-case t)
;; Show colors in log files
(add-load-path! ".")
(require 'tty-format)
(defun display-ansi-colors ()
(interactive)
(format-decode-buffer 'ansi-colors))
(add-hook 'find-file-hooks 'tty-format-guess)
(add-to-list 'auto-mode-alist '("\\.log\\'" . display-ansi-colors))
;; Here are some additional functions/macros that could help you configure Doom:
;;
;; - `load!' for loading external *.el files relative to this one