Colorizes output of compilation

This commit is contained in:
2023-07-13 17:59:56 +02:00
parent 5bbc79033d
commit 6b4b3948b7

14
.emacs
View File

@@ -79,6 +79,14 @@
(straight-use-package-by-default t))
(use-package ansi-color
:config
(defun atu/colorize-compilation-buffer ()
(when (eq major-mode 'compilation-mode)
(ansi-color-apply-on-region compilation-filter-start (point-max))))
:hook
(compilation-filter . atu/colorize-compilation-buffer))
(use-package smart-tabs-mode
:config
(setq-default tab-width 4) ; or any other preferred value
@@ -166,6 +174,7 @@
)
:config
(projectile-mode +1)
(setq projectile-per-project-compilation-buffer t)
(projectile-register-project-type 'ng2 '("angular.json" "package.json" "tsconfig.json")
:project-file "angular.json"
:compile "npm install"
@@ -499,12 +508,11 @@
:after (projectile)
:config
(unbind-key "C-c C-d" go-mode-map)
;;(setq compile-command "go build && go test -coverprofile=cover.out && go tool cover -html cover.out -o /tmp/cover.html")
(defun go-compile-command ()
"returns a string to compile a go project"
(setq project-makefile (concat (file-name-as-directory (projectile-project-root)) "Makefile"))
(if (file-exists-p project-makefile)
(concat "make -C" (projectile-project-root))
"make"
"go build && go test && go vet"
)
)
@@ -563,7 +571,7 @@
:interpreter "html")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; docker
;; Docker
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(use-package dockerfile-mode