nit(vc-gutter): reformat annotated comments
This commit is contained in:
parent
48369fb654
commit
3ae8c520d5
1 changed files with 18 additions and 19 deletions
|
@ -19,10 +19,10 @@
|
|||
(setq-default fringes-outside-margins t)
|
||||
|
||||
;; STYLE: Redefine fringe bitmaps to take up only half the horizontal space in
|
||||
;; the fringe. This way we avoid overbearingly large diff bars without having
|
||||
;; to shrink the fringe and sacrifice precious space for other fringe
|
||||
;; the fringe. This way we avoid overbearingly large diff bars without
|
||||
;; having to shrink the fringe and sacrifice precious space for other fringe
|
||||
;; indicators (like flycheck or flyspell).
|
||||
;; TODO Extract these into a package with faces that themes can target.
|
||||
;; REVIEW: Extract these into a package with faces that themes can target.
|
||||
(if (not (modulep! +diff-hl))
|
||||
(after! git-gutter-fringe
|
||||
(define-fringe-bitmap 'git-gutter-fr:added [224]
|
||||
|
@ -54,7 +54,7 @@
|
|||
;; FIX: To minimize overlap between flycheck indicators and git-gutter/diff-hl
|
||||
;; indicators in the left fringe.
|
||||
(after! flycheck
|
||||
;; let diff have left fringe, flycheck can have right fringe
|
||||
;; Let diff-hl have left fringe, flycheck can have right fringe
|
||||
(setq flycheck-indication-mode 'right-fringe)
|
||||
;; A non-descript, left-pointing arrow
|
||||
(define-fringe-bitmap 'flycheck-fringe-bitmap-double-arrow
|
||||
|
@ -101,8 +101,8 @@ is deferred until the file is saved. Respects `git-gutter:disabled-modes'."
|
|||
;; UX: Disable in Org mode, as per syl20bnr/spacemacs#10555 and
|
||||
;; syohex/emacs-git-gutter#24. Apparently, the mode-enabling function for
|
||||
;; global minor modes gets called for new buffers while they are still in
|
||||
;; `fundamental-mode', before a major mode has been assigned. I don't know why
|
||||
;; this is the case, but adding `fundamental-mode' here fixes the issue.
|
||||
;; `fundamental-mode', before a major mode has been assigned. I don't know
|
||||
;; why this is the case, but adding `fundamental-mode' here fixes the issue.
|
||||
(setq git-gutter:disabled-modes '(fundamental-mode image-mode pdf-view-mode))
|
||||
:config
|
||||
(set-popup-rule! "^\\*git-gutter" :select nil :size '+popup-shrink-to-fit)
|
||||
|
@ -130,9 +130,8 @@ is deferred until the file is saved. Respects `git-gutter:disabled-modes'."
|
|||
(advice-add #'magit-stage-file :after #'+vc-gutter-update-h)
|
||||
(advice-add #'magit-unstage-file :after #'+vc-gutter-update-h)
|
||||
|
||||
;; FIX: stop git-gutter:{next,previous}-hunk from jumping to random hunks.
|
||||
(defadvice! +vc-gutter--fix-linearity-of-hunks-a (diffinfos is-reverse)
|
||||
"FIX: `git-gutter:next-hunk' and `git-gutter:previous-hunk' sometimes
|
||||
jumping to random hunks."
|
||||
:override #'git-gutter:search-near-diff-index
|
||||
(cl-position-if (let ((lineno (line-number-at-pos))
|
||||
(fn (if is-reverse #'> #'<)))
|
||||
|
@ -191,7 +190,7 @@ is deferred until the file is saved. Respects `git-gutter:disabled-modes'."
|
|||
(add-hook 'magit-post-refresh-hook #'diff-hl-magit-post-refresh))
|
||||
|
||||
;; FIX: The revert popup consumes 50% of the frame, whether or not you're
|
||||
;; reverting 2 lines or 20. This fix resizes the popup to match its contents.
|
||||
;; reverting 2 lines or 20. This resizes the popup to match its contents.
|
||||
(defadvice! +vc-gutter--shrink-popup-a (fn &rest args)
|
||||
:around #'diff-hl-revert-hunk-1
|
||||
(letf! ((refine-mode diff-auto-refine-mode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue