diff options
author | Martin Polden <mpolden@mpolden.no> | 2020-12-01 19:48:51 +0100 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2020-12-01 19:48:51 +0100 |
commit | 5fc1c54ee641656d6ee8ee062444b22e0a3e90b2 (patch) | |
tree | ce0adc4cc95dd678bcf2b143c7bb83b4532e591f /lisp/init-appearance.el | |
parent | 9286c21fb82f900c3db725502a003d71dcb0466d (diff) |
appearance: Render ANSI colors in compilation buffer
Diffstat (limited to 'lisp/init-appearance.el')
-rw-r--r-- | lisp/init-appearance.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/init-appearance.el b/lisp/init-appearance.el index bc3a286..5b10870 100644 --- a/lisp/init-appearance.el +++ b/lisp/init-appearance.el @@ -29,6 +29,14 @@ ;; highlight trailing whitespace in prog-mode (add-hook 'prog-mode-hook (lambda () (setq-local show-trailing-whitespace t))) +;; render ansi colors in compilation buffer +(defun colorize-compilation-buffer () + (when (eq major-mode 'compilation-mode) + (ansi-color-apply-on-region compilation-filter-start (point-max)))) + +(use-package ansi-color + :hook ((compilation-filter . colorize-compilation-buffer))) + ;; disable word wrapping (setq-default truncate-lines t) |