Skip to content

Commit

Permalink
feat(vc): make blamer obsolete
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Nov 22, 2023
1 parent efdf896 commit 625d1d4
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 27 deletions.
27 changes: 0 additions & 27 deletions modules/me-vc.el
Original file line number Diff line number Diff line change
Expand Up @@ -124,33 +124,6 @@
:custom
(diff-hl-draw-borders nil))

(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)))))

(use-package git-timemachine
:straight t
:init
Expand Down
42 changes: 42 additions & 0 deletions modules/obsolete/me-blamer.el
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

0 comments on commit 625d1d4

Please sign in to comment.