-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
efdf896
commit 625d1d4
Showing
2 changed files
with
42 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
;;; me-blamer.el --- Blamer - show git blame information on each line -*- lexical-binding: t; -*- | ||
|
||
;; Copyright (C) 2022-2023 Abdelhak Bougouffa | ||
|
||
;; Author: Abdelhak Bougouffa (concat "abougouffa" "@" "fedora" "project" "." "org") | ||
|
||
;;; Commentary: | ||
|
||
;;; Code: | ||
|
||
(use-package blamer | ||
:straight t | ||
:hook (minemacs-first-file . global-blamer-mode) | ||
:custom | ||
(blamer-idle-time 0.3) | ||
(blamer-min-offset 60) | ||
(blamer-prettify-time-p t) | ||
(blamer-author-formatter "%s ") | ||
(blamer-datetime-formatter "[%s], ") | ||
(blamer-commit-formatter "“%s”") | ||
(blamer-avatar-folder (concat minemacs-cache-dir "blamer-avatars/")) | ||
:config | ||
(+nvmap! | ||
"gb" #'blamer-show-posframe-commit-info | ||
"gB" #'blamer-show-commit-info) | ||
|
||
;; Use 15% smaller font size for blamer's text | ||
(set-face-attribute 'blamer-face nil :height (max (truncate (* 0.85 (face-attribute 'default :height))) 1)) | ||
|
||
(with-eval-after-load 'me-writing-mode | ||
(defvar-local +blamer-was-active-p blamer-mode) | ||
(+add-hook! +writing-mode-enable | ||
(setq-local +blamer-was-active-p blamer-mode) | ||
(when +blamer-was-active-p (blamer-mode -1))) | ||
(+add-hook! +writing-mode-disable | ||
(when (bound-and-true-p +blamer-was-active-p) (blamer-mode 1))))) | ||
|
||
|
||
(provide 'obsolete/me-blamer) | ||
|
||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
;;; me-blamer.el ends here |