diff options
author | David Robillard <d@drobilla.net> | 2023-01-30 11:25:48 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-01-30 11:30:35 -0500 |
commit | 069c3e2a734166a7a0f6c1528e6bee0a5e75fc11 (patch) | |
tree | 6c263f0706a84d61f8f242ba51c0dada9150385e /emacs | |
parent | 2328210c5b109c7d495a68bd8cac25f2d084b7fd (diff) | |
download | dotfiles-069c3e2a734166a7a0f6c1528e6bee0a5e75fc11.tar.gz dotfiles-069c3e2a734166a7a0f6c1528e6bee0a5e75fc11.tar.bz2 dotfiles-069c3e2a734166a7a0f6c1528e6bee0a5e75fc11.zip |
Add shell and compilation mode ANSI coloriazation hooks
Disabled because the compilation mode one is too sketchy, but handy to have
around to manually evaluate when working with shitty build tools.
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/.emacs.d/init.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index 6da1cc1..c3b75e4 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -535,6 +535,18 @@ (add-hook 'doc-view-mode-hook 'my-doc-view-hook) (add-hook 'pdf-view-mode-hook 'my-doc-view-hook) +;; Shell + +(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on) +(add-to-list 'comint-output-filter-functions 'ansi-color-process-output) + +;; Compilation + +(defun colorize-compilation-buffer () + (let ((inhibit-read-only t)) + (ansi-color-apply-on-region (point-min) (point-max)))) + +;; (add-hook 'compilation-filter-hook 'colorize-compilation-buffer) ;; Associations |