Emacs: parse ANSI colour codes in compilation (e.g. tsc) buffers
Alan Pearce alan@alanpearce.eu
Fri, 27 Sep 2019 16:25:11 +0200
1 files changed, 4 insertions(+), 0 deletions(-)
jump to
M emacs/.emacs.d/main.el → emacs/.emacs.d/main.el
@@ -610,6 +610,10 @@ '(js-enabled-frameworks '(javascript))) ;;;; 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