diff options
author | Alan Pearce | 2019-09-27 16:25:11 +0200 |
---|---|---|
committer | Alan Pearce | 2019-09-27 16:25:11 +0200 |
commit | e6e57579b02658d171295b9224532309c06a2320 (patch) | |
tree | 7356ae95d4594feb0f4bbf230a14893267b9aca1 | |
parent | 48dffdc2664f86f486a2c94c1051202af97e2f15 (diff) | |
download | nixfiles-e6e57579b02658d171295b9224532309c06a2320.tar.lz nixfiles-e6e57579b02658d171295b9224532309c06a2320.tar.zst nixfiles-e6e57579b02658d171295b9224532309c06a2320.zip |
Emacs: parse ANSI colour codes in compilation (e.g. tsc) buffers
-rw-r--r-- | emacs/.emacs.d/main.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el index c7960ca8..88d0d556 100644 --- a/emacs/.emacs.d/main.el +++ b/emacs/.emacs.d/main.el @@ -610,6 +610,10 @@ _p_rev _u_pper _=_: upper/lower _r_esolve ;;;; typescript (custom-set-variables '(typescript-indent-level 2)) +(autoload 'ansi-color-apply-on-region "ansi-color") +(defun colorise-compilation-buffer () + (ansi-color-apply-on-region compilation-filter-start (point-max))) +(add-hook 'compilation-filter-hook #'colorise-compilation-buffer) ;;;; shell (general-add-hook 'sh-mode-hook |