refactor!(vc-gutter): drop git-gutter for diff-hl

BREAKING CHANGE: This removes git-gutter as an implementation for the
`:ui vc-gutter` module, leaving only the diff-hl implementation. There
are no longer any +git-gutter or +diff-hl flags for this module. Users
don't have to do anything to keep the vc gutter, unless they prefer
git-gutter for any reason (in which case they'll need to install and set
it up themselves).

This has been planned for some time, because of a roadmap goal for Doom
to lean into native/built-in functionality where it's equal or better
than the third party alternatives. diff-hl relies on the built-in vc.el
library instead of talking to git directly (thus expanding support to
whatever VCS's vc.el supports, and not git alone), which also means it
can take advantage of its caching and other user configuration for
vc.el. Overall, it is faster and lighter.

What I've also been waiting for was a stage-hunk command, similar to
git-gutter:stage-hunk, which arrived in dgutov/diff-hl@a0560551cd and
dgutov/diff-hl@133538973b, and have evolved since.

Ref: dgutov/diff-hl@a0560551cd
Ref: dgutov/diff-hl@133538973b
Ref: https://github.com/orgs/doomemacs/projects/5/views/1?pane=issue&itemId=58747789
This commit is contained in:
Henrik Lissner 2024-06-22 17:13:20 -04:00
parent 0aede16322
commit b405225b90
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
16 changed files with 69 additions and 191 deletions

View file

@ -64,8 +64,8 @@ are great, but this file exists to add demos for Doom's API and beyond.
(after! helm ...)
;; An unquoted list of package symbols (i.e. BODY is evaluated once both magit
;; and git-gutter have loaded)
(after! (magit git-gutter) ...)
;; and diff-hl have loaded)
(after! (magit diff-hl) ...)
;; An unquoted, nested list of compound package lists, using any combination of
;; :or/:any and :and/:all

View file

@ -82,7 +82,7 @@ and Emacs states, and for non-evil users.")
;; 1. Quit active states; e.g. highlights, searches, snippets, iedit,
;; multiple-cursors, recording macros, etc.
;; 2. Close popup windows remotely (if it is allowed to)
;; 3. Refresh buffer indicators, like git-gutter and flycheck
;; 3. Refresh buffer indicators, like diff-hl and flycheck
;; 4. Or fall back to `keyboard-quit'
;;
;; And it should do these things incrementally, rather than all at once. And it

View file

@ -641,8 +641,8 @@ is:
(after! (:and package-a package-b ...) BODY...)
(after! (:and package-a (:or package-b package-c) ...) BODY...)
- An unquoted list of package symbols (i.e. BODY is evaluated once both magit
and git-gutter have loaded)
(after! (magit git-gutter) BODY...)
and diff-hl have loaded)
(after! (magit diff-hl) BODY...)
If :or/:any/:and/:all are omitted, :and/:all are implied.
This emulates `eval-after-load' with a few key differences:

View file

@ -242,7 +242,7 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
;;; Fringes
;; Reduce the clutter in the fringes; we'd like to reserve that space for more
;; useful information, like git-gutter and flycheck.
;; useful information, like diff-hl and flycheck.
(setq indicate-buffer-boundaries nil
indicate-empty-lines nil)