git.fiddlerwoaroof.com
Browse code

feat(emacs): colorize compilation output

Ed Langley authored on 01/05/2020 22:00:53
Showing 1 changed files
... ...
@@ -788,3 +788,10 @@ With a prefix ARG invalidates the cache first."
788 788
   ;; Comment/uncomment this line to see interactions between lsp client/server.
789 789
   ;;(setq lsp-log-io t)
790 790
   )
791
+(progn
792
+  (require 'ansi-color)
793
+  (defun colorize-compilation-buffer ()
794
+    (toggle-read-only)
795
+    (ansi-color-apply-on-region compilation-filter-start (point))
796
+    (toggle-read-only))
797
+  (add-hook 'compilation-filter-hook 'colorize-compilation-buffer))