2022-03-28 15:03:21 +02:00
|
|
|
#+title: :ui vc-gutter
|
|
|
|
#+subtitle: Get your diff out of the gutter
|
|
|
|
#+created: June 26, 2018
|
|
|
|
#+since: 21.12.0
|
2021-10-16 01:29:57 +02:00
|
|
|
|
|
|
|
* Description :unfold:
|
|
|
|
This module displays a diff of the current file (against HEAD) in the fringe.
|
|
|
|
Supports Git, Svn, Hg, and Bzr.
|
|
|
|
|
|
|
|
** Maintainers
|
|
|
|
- [[doom-user:][@hlissner]]
|
|
|
|
|
|
|
|
[[doom-contrib-maintainer:][Become a maintainer?]]
|
|
|
|
|
|
|
|
** Module flags
|
2022-08-08 17:36:23 +02:00
|
|
|
- +pretty ::
|
2024-06-22 17:13:20 -04:00
|
|
|
Apply some stylistic defaults to the fringe that present the diff in the
|
|
|
|
fringe as thin bars, taking after the modern look of the git-gutter plugin in
|
|
|
|
VSCode and Sublime Text. However, this will look bad with themes that invert
|
|
|
|
the foreground/background of diff-hl's faces (like modus-themes does).
|
2021-10-16 01:29:57 +02:00
|
|
|
|
|
|
|
** Packages
|
2024-06-22 17:13:20 -04:00
|
|
|
- [[doom-package:diff-hl]]
|
2021-10-16 01:29:57 +02:00
|
|
|
|
2022-08-09 17:55:56 +02:00
|
|
|
** Hacks
|
|
|
|
- The VC gutter will be updated when pressing ESC, leaving insert mode (evil
|
|
|
|
users), or refocusing the frame or window where it is active.
|
2022-09-26 02:19:42 +08:00
|
|
|
- If [[doom-module:+pretty]] is enabled
|
2024-06-22 17:13:20 -04:00
|
|
|
- The fringes that diff-hl define will be replaced with a set of thin bars.
|
|
|
|
This achieves a slicker look closer to git-gutter's appearance in VSCode or
|
|
|
|
Sublime Text, but may look weird for themes that swap their faces'
|
|
|
|
:foreground and :background (like modus-themes).
|
2022-08-09 17:55:56 +02:00
|
|
|
- The fringes are moved to the outside of the margins (closest to the frame
|
|
|
|
edge), so they have some breathing space away from the buffer's contents.
|
2024-06-22 17:13:20 -04:00
|
|
|
- ~diff-hl-revert-hunk~ displays a preview popup of the hunk being reverted.
|
|
|
|
It takes up ~50% of the frame, by default, whether you're reverting 2 lines
|
|
|
|
or 20. Since this isn't easily customized, it has been advised to shrink
|
|
|
|
this popup to the side of its contents.
|
|
|
|
- ~diff-hl-revert-hunk~ will sometimes move the cursor to an unexpected
|
|
|
|
location (the bounds of hunks, is my guess), but this is not intuitive and
|
|
|
|
often unexpected. Cursor movements have been suppressed for it.
|
2021-10-16 01:29:57 +02:00
|
|
|
|
|
|
|
** TODO Changelog
|
|
|
|
# This section will be machine generated. Don't edit it by hand.
|
|
|
|
/This module does not have a changelog yet./
|
|
|
|
|
|
|
|
* Installation
|
|
|
|
[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]]
|
|
|
|
|
|
|
|
This module requires any of Git, Svn, Hg, and/or Bazaar to get gutter diffs in
|
|
|
|
projects version controlled by them.
|
|
|
|
|
|
|
|
* TODO Usage
|
|
|
|
#+begin_quote
|
2023-09-16 20:19:11 +02:00
|
|
|
This module has no usage documentation yet. [[doom-contrib-module:][Write some?]]
|
2021-10-16 01:29:57 +02:00
|
|
|
#+end_quote
|
|
|
|
|
|
|
|
* TODO Configuration
|
|
|
|
#+begin_quote
|
2023-09-16 20:19:11 +02:00
|
|
|
This module has no configuration documentation yet. [[doom-contrib-module:][Write some?]]
|
2021-10-16 01:29:57 +02:00
|
|
|
#+end_quote
|
|
|
|
|
|
|
|
* Troubleshooting
|
|
|
|
/There are no known problems with this module./ [[doom-report:][Report one?]]
|
|
|
|
|
|
|
|
* Frequently asked questions
|
|
|
|
/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]]
|
|
|
|
|
|
|
|
* TODO Appendix
|
|
|
|
#+begin_quote
|
2023-09-16 20:19:11 +02:00
|
|
|
This module has no appendix yet. [[doom-contrib-module:][Write one?]]
|
2021-10-16 01:29:57 +02:00
|
|
|
#+end_quote
|