Commit Graph

168 Commits

Author SHA1 Message Date
f427c8a30e tweak: scroll-conservatively = 10
Forces the window to recenter if the cursor moves >=10 lines off-screen.
This makes some of our manual recentering elsewhere unnecessary.
2023-09-11 23:53:36 +02:00
c1c966c811 docs: assume ~/.config/emacs by default
From now on, our documentation will assume your Emacs config lives in
~/.config/emacs, by default, rather than ~/.emacs.d. Support for the
latter is not going away, it will simply be mentioned less in the
literature, as all supported versions of Emacs going forward (and future
versions of Doom) will support (and prefer) XDG conventions.

The user manual will be updated separately.

Close: #6965
Co-authored-by: gagbo <gagbo@users.noreply.github.com>
2023-02-25 20:47:28 -05:00
7a2a5afb97 refactor!(magit): remove magit-gitflow
BREAKING CHANGE: This commit removes the magit-gitflow package because:

- It is not considered a "universal" default. I.e. The majority of git
  users do not know of or use it, much less need it.
- The elisp configuration for it is trivial. It doesn't warrant
  Doom-specific support for it and is trivial enough for end-users to
  deploy themselves with minimal difficulty.

Close: #7015
2023-02-18 15:27:48 -05:00
398ee2cd94 fix(magit): evil keybinds for magit-worktree
For some reason, the transient-append-suffix adding magit-worktree back
to magit-dispatch — after its potential replacement by
magit-gitflow-popup — was having no effect. (It does when moved into
(after! magit-gitflow), so the issue must have something to do with when
transient-append-suffix is called.) magit-worktree wasn't appearing in
the magit-dispatch popup when magit-gitflow was enabled, nor was the '*'
keybind for magit-worktree in effect outside (or inside) the popup,
unlike '%' for magit-gitflow-popup.

Replace the ineffectual transient-append-suffix with a normal and visual
mode keybind for magit-worktree in magit-mode-map (and move the
unconditionally defined keybind for magit-gitflow-popup into (after!
magit-gitflow)). Also, append the magit-gitflow-popup transient suffix
to magit-worktree instead of replacing it, so that the latter still
appears in magit-dispatch (though under the original keybind 'Z' — which
isn't really an issue, since evil-collection-magit doesn't seem to
update the keybinds of any of the other commands accessible from
magit-dispatch — but also callable with '*').
2022-10-05 15:16:54 +02:00
9b73ce3ad8 fix(magit): remap magit-browse-thing to forge-browse-*
When using evil +everywhere, we disable the default forge bindings.
We must then explicitly remap magit-browse-thing, as it's just a
placeholder command (bound in multiple places).
2022-09-21 00:54:09 +02:00
aa54383b5d refactor: deprecate doom-etc-dir for doom-data-dir
doom-etc-dir will be renamed to doom-data-dir, to better reflect its
purpose, and align it with XDG_DATA_HOME (where it will be moved to in
v3, where Doom will begin to obey XDG directory conventions more
closely).
2022-08-14 20:43:35 +02:00
ad6a3d0f33 refactor: deprecate featurep! for modulep!
featurep! will be renamed modulep! in the future, so it's been
deprecated. They have identical interfaces, and can be replaced without
issue.

featurep! was never quite the right name for this macro. It implied that
it had some connection to featurep, which it doesn't (only that it was
similar in purpose; still, Doom modules are not features). To undo such
implications and be consistent with its namespace (and since we're
heading into a storm of breaking changes with the v3 release anyway),
now was the best opportunity to begin the transition.
2022-08-14 20:43:35 +02:00
0a3c123d72 fix(magit): {1-4} overriding evil keybinds
evil-collection-magit-section introduces some redundant keybinds on
number keys 1-4, so our hack to correct these keys needed an adjustment.

And by unbinding these keys at the source (magit-section-mode-map), we
don't have to do the same for each inheriting keymap (like
code-review-mode-map and magit-mode-map).

Ref: emacs-evil/evil-collection@e26c869735
Amend: 31519d393a
2022-06-17 21:52:18 +02:00
bab5bffa5d bump: :tools
SavchenkoValeriy/emacs-powerthesaurus@02c9d11a3f -> SavchenkoValeriy/emacs-powerthesaurus@810a25056c
Silex/docker.el@8d64cf4f84 -> Silex/docker.el@fbd896e313
alphapapa/magit-todos@60152d5c4e -> alphapapa/magit-todos@67fd80c2f1
bdarcus/citar@79512aefdf -> bdarcus/citar@ee98b94f7f
editorconfig/editorconfig-emacs@3c03cef311 -> editorconfig/editorconfig-emacs@1d4acc3ec7
emacsorphanage/quickrun@78317951cd -> emacsorphanage/quickrun@c680f5137c
joaotavora/eglot@83a61f673a -> joaotavora/eglot@fd9a5646d1
magit/forge@5586863f98 -> magit/forge@eed613db88
magit/magit@4e29d5827c -> magit/magit@b4be194de1
millejoh/emacs-ipython-notebook@6063cee7fb -> millejoh/emacs-ipython-notebook@e04e1e19c6
tkf/emacs-request@3336eaa97d -> tkf/emacs-request@c769cf33f2
vedang/pdf-tools@72ef774320 -> vedang/pdf-tools@326552eef7
zx2c4/password-store@eea24967a0 -> zx2c4/password-store@c4d8a1d815
2022-03-31 19:25:50 +02:00
09b3004abe feat(magit): add evil keybinds for code-review
Add the two main keybindings expected in the README of code-review: `r`
for a transient menu with all actions and `RET` to add or edit a
comment. Both should only be enabled while in a `*Code Review*` buffer.

Ref: https://github.com/wandersoncferreira/code-review
2022-03-19 16:18:58 +01:00
aac2c65826 tweak(magit): shrink right fringe
The right fringe isn't used for anything, so it was wasted space.

Also applies to org-roam's backlinks buffer.
2022-02-14 21:24:46 +01:00
8cbfbce394 fix(magit,org): show fringe in org-roam side window
Otherwise, the fringe (and its nice magit chevrons) aren't visible to
org-roam users.
2022-02-06 03:27:08 +01:00
f491dd9e7b fix(magit): gate code-review behind +forge
code-review requires forge, therefore it shouldn't be available if
+forge isn't enabled on the :tools magit module.

Ref: 2d3a68df49
Fix: #5935
2022-01-03 19:13:09 +01:00
1a0fd1b7ec fix(magit): unbind M-1 etc. for code-review
code-review is built on magit-sections so it will have the same default
bindings for M-1, M-2 etc. To be consistent with the rest of doom, those
should be used for switching workspace and z1, z2 etc should be used for
toggling outlines in a magit-sections buffer.

This only affects users with :editor (evil +everywhere) enabled.

Amend: 2d3a68df49
2022-01-03 18:10:17 +01:00
45a55c0ec9 fix(magit): move code-review files to etc dir
These files were put directly in .emacs.d causing the repository to
appear dirty. This should follow the doom convention of putting the
files in the .local/etc dir.

Amend: 2d3a68df49
2021-12-16 15:05:28 +01:00
2d3a68df49 feat(magit): replace github-review for code-review 2021-12-15 07:06:49 +00:00
1b0e1c2cd3 fix(magit): missing "N" keybind error on forge startup
An incompatibility between forge and evil-collection-forge causes this
error when starting Forge:

  Cannot insert ("N" "Forge" forge-dispatch) into magit-dispatch; o not
  found
2021-11-21 16:21:34 +01:00
cf1fa4eeba Fix #5297: don't defer lv incrementally on magit
transient no longer depends on it.
2021-07-26 02:57:33 -04:00
6824b9270d tools/magit: larger fringe in magit-mode
Since Doom sets a small fringe by default, magit's fringe indicators are
obscured, so we increase it only while a magit-mode buffer is visible.
2021-05-22 22:31:39 -04:00
195ad0fec6 Fix #5003: rethink +magit/quit
Changes +magit/quit to behave more like canonical
magit-mode-bury-buffer, but after burying/killing the last magit buffer
for the current repo, kill all the other buried ones too.

Also binds Q in magit to kill all magit buffers for the current repo.
2021-05-07 14:17:04 -04:00
9d643b14ed Revise comments 2021-04-29 13:25:48 -04:00
3e425ab2f2 tools/magit: reveal point if in invisible region
When visiting a file from magit.

Fix #4895
2021-04-21 21:45:04 -04:00
2cf91badf8 Enable disabling of magit-gitflow
Disabling magit-gitflow breaks magit-dispatch due to the unconditional
application of `transient-replace-suffix`.

With this change it is possible to disable magit-gitflow by adding the
following to your private Doom configuration:

    (package! magit-gitflow :disable t)
2021-02-24 21:52:11 +00:00
d17616e835 TAB = toggle section in magit-process-mode 2020-12-02 22:32:04 -05:00
87d8457927 magit: fix mismatched paren in parent
"Fix blacklisted evil-collection-magit keybinds" had one too many
closing parens.
2020-11-29 14:51:08 -07:00
2828281af7 Fix blacklisted evil-collection-magit keybinds
Now that evil-magit's been moved to evil-collection, its keybinds are
subject to our blacklist. There must be a better way to exclude
evil-collection modules from the blacklist.
2020-11-29 15:19:21 -05:00
c1bdd63dcd Bump evil-collection
emacs-evil/evil-collection@52b6479 -> emacs-evil/evil-collection@05ed92a

evil-magit was ported to evil-collection

Half-addresses #4324
2020-11-27 22:20:31 -05:00
7ec623593e Fix magit in remote repos
And backport executable-find from Emacs 27.1 so we don't have to do
these version checks every time we use it.
2020-11-02 14:43:12 -05:00
4e82ee4397 Refactor doom-debug-mode
+ Add explain-pause-mode
+ Now reloads itself if doom-debug-variables is changed or when one of
  its variables becomes available.
+ doom-debug-variables now supports a cons cell entry where its CAR is
  the name of the variable and CDR is the value it should be set to when
  doom-debug-mode is active.
2020-08-21 01:26:24 -04:00
4ad9b764e1 tools/magit: only expand git path
On closer inspection it isn't necessary to expand the gitk and perl
executable paths, since a) gitk is a GUI application that doesn't get
called often enough (only once at a time) to warrant being optimized,
and b) magit uses it to set an envvar for git (so git itself handles
locating the executable internally -- much faster than Emacs can (esp
over TRAMP), so it only benefits us to expand magit-git-executable.
2020-08-15 12:31:59 -04:00
10edc92bce tools/magit: fix stringp error for missing executables 2020-08-15 12:18:26 -04:00
5755754702 tools/magit: expand executable paths in remote repos too
Remote repos can benefit from ahead-of-time expansion of these paths
too; so Emacs doesn't have to search the remote PATH on every call.
2020-08-15 05:29:59 -04:00
77f9cc53ae magit-revision-insert-related-refs = nil 2020-08-15 05:14:21 -04:00
e49b4a8123 tools/magit: speed up git calls in magit
But only for local repos.
2020-08-15 05:14:21 -04:00
95c5ebc01a Fix #3726: respect +magit-open-windows-in-direction
Also fixes an issue where `q` would not delete a magit-dedicated split
window (leaving duplicate magit-status windows about).
2020-08-11 13:48:12 -04:00
a16c40d493 tools/magit: split sub-windows to the side
When a log or diff buffer is opened from the magit status buffer, it
would display them in a random window (or split, if none were
available). This changes forces it to predictably open to the right of
the magit status window (using the next window over, if available).
2020-08-06 00:22:39 -04:00
af7f5d0fc7 tools/magit: merge Forge jumps with evil-magit 2020-07-28 01:38:47 +02:00
ccccb9761c tools/magit: map Forge jumps in evil-mode 2020-07-28 00:02:59 +02:00
72c03965cc Bump :editor evil
emacs-evil/evil@25fc5c6 -> emacs-evil/evil@017b442
emacs-evil/evil-collection@e065da3 -> emacs-evil/evil-collection@3e62b6b
emacs-evil/evil-surround@1c34944 -> emacs-evil/evil-surround@346d4d8
redguardtoo/evil-nerd-commenter@1bd2de5 -> redguardtoo/evil-nerd-commenter@87734b9

Some functionality has been upstreamed into evil-collection and thus
removed from their respective modules.

Closes #3577
2020-07-17 19:40:19 -04:00
cc36ff1223 tools/magit: map zt/zb motions in magit-mode 2020-06-27 23:48:29 +02:00
58fa2b1c7d Fix projectile-vc not working on remotes
Mentioned in #3437
2020-06-24 18:44:04 -04:00
e1118f4754 Add gitflow as %, moving worktree to *
- Adds `magit-gitflow-popup` as `%` keybinding in the `magit-dispatch`, mirroring the keybinding in `magit-mode-map`.
- The existing binding `magit-worktree` is moved to `*`
2020-06-19 21:14:37 +00:00
41d5be12a0 Gravatars now opt-in. Magit README updated. 2020-06-19 00:36:30 +05:30
ca4ed2c5fa magit: Enable goto-address-mode in process buffer
This way, URL returned by remote are clicable.
2020-06-04 14:07:51 +02:00
830e1289aa Bind SPC g G -> magit-status-here
And recenter after invoking it.
2020-05-24 16:32:19 -04:00
93d188e6bc Resolve magit-git-executable to absolute path
For minor performance gain for macOS/Windows users. Shouldn't make a
difference on Linux.
2020-05-21 01:31:51 -04:00
916ef0fbbe Rename unmap! to undefine-key!
unmap! gives the false impression that it is related or similar to map!,
but it isn't.
2020-04-23 23:56:17 -04:00
fe3f3d91c3 tools/magit: gate forge behind flag & add README #1166 2020-04-23 23:56:17 -04:00
b78fc4eb76 Minor refactor & reformatting across the board 2020-04-08 15:30:10 -04:00
2ceac53421 Prevent scrolling on magit refresh & toc-org 2020-04-04 01:27:41 -04:00