From 47b991a84e76ca743f3e5163cf93f6e86a31b302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20Dani=C3=ABl=20Maat?= Date: Wed, 14 Aug 2024 11:23:08 +0200 Subject: [PATCH] emacs: Add code coverage support --- home-config/dotfiles/emacs.d/config/features.el | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/home-config/dotfiles/emacs.d/config/features.el b/home-config/dotfiles/emacs.d/config/features.el index 5e0e4bf9..2880f6c1 100644 --- a/home-config/dotfiles/emacs.d/config/features.el +++ b/home-config/dotfiles/emacs.d/config/features.el @@ -244,6 +244,20 @@ :custom `(devdocs-data-dir . ,(expand-file-name "docsets" data-dir))) +;; ---------------------------------------------------------------------------------- +;; Code coverage +;; ---------------------------------------------------------------------------------- + +(leaf cov + :hook (prog-mode-hook . cov-mode) + :custom + (cov-lcov-patterns . '((lambda (dir name) + (expand-file-name "lcov.info" + (project-root (project-current dir)))))) + :custom-face + (cov-none-face . '((t (:foreground "red")))) + (cov-heavy-face . '((t (:foreground "green"))))) + ;; ---------------------------------------------------------------------------------- ;; Project management ;; ----------------------------------------------------------------------------------