Commit Graph

189 Commits

Author SHA1 Message Date
d60d639efe fix(magit): Remove +magit-optimize-process-calls-h 2025-06-10 21:23:00 +02:00
a45ce1e14d fix(magit): do less on magit-refresh-buffer
Inhibit recentf-cleanup and projectile caching, and silence it's logging
on refresh-buffer. The former can potentially be slow and isn't
necessary on top of invalidating the cache, and the latter is noise.
2025-04-13 06:52:24 -04:00
b2f8529683 fix(magit): projectile-invalidate-cache in wrong buffer
Also prevents projectile prompting in non-projects.
2025-04-13 02:50:09 -04:00
fb0dc4cc85 refactor(lib): doom-debug-mode: make verbosity selective
Now `doom-debug-mode` manipulates `doom-log-level` if you activate it
with a prefix arg, setting it to 1 by default, reducing its verbosity
and cutting down on noise in the logs.
2025-04-11 12:17:44 -04:00
0150f879ea feat(magit): introduce +magit-auto-revert option
Provides more control over our auto-reverting feature, and changes its
behavior to only target non-remote buffers by default, because reverting
remote buffers could be tremendously slow.

This could be later improved to treat TRAMP buffers with local
methods (like sudo) as local buffers.

Fix: #8354
2025-04-10 18:34:49 -04:00
42fba948f6 fix(magit): use messages instead of modeline 2025-04-09 16:12:18 -04:00
f98eb3824f revert: refactor(magit): reduce pollution of global namespace
This refactor was premature. It still worked, but only by accident.

This is not a *full* revert; +magit--pos has been renamed for clarity.

Revert: d4c02bcd08
2025-04-04 00:50:45 -04:00
d4c02bcd08 refactor(magit): reduce pollution of global namespace 2025-04-02 06:37:12 -04:00
919e658436 fix(magit): magit-uniquify-buffer-names = nil
This prevents naming collisions between projects that resolve to the
same name (e.g. foo/bar/src and baz/foo/src both resolve to the same
project name: "src"), causing Magit to destructively reuse magit
bufffers across projects (which is especially disruptive if you use
workspaces and are using magit in both, in unrelated projects that
happen to have the same name).
2025-04-02 06:19:11 -04:00
635f0a3eec refactor(magit): magit-credential-cache-daemon-socket: remove hack
This is handled upstream now and is no longer needed.
2025-04-02 06:12:44 -04:00
653b465c74 refactor: doom-switch-frame-hook
Redesign this hook around `after-focus-change-function`, along with
debouncing, to prevent it from triggering too aggressively (due to
misbehaving desktop environments, elisp packages that tinker with frame
focus, or accidental (and rapid) focus changes by the user).

`doom-switch-{window,buffer}-hook` have also been simplified, and
`doom-switch-window-hook` now will not trigger when focusing another
frame (only when you switch windows *within* any one frame).

This also fixes diff-hl not updating when refocusing an Emacs frame.
2025-04-02 03:17:29 -04:00
8afc08a7a8 bump: :tools direnv lsp magit
emacs-lsp/lsp-mode@4cddd2d99d -> emacs-lsp/lsp-mode@7c0df125c1
emacs-straight/eglot@8711f483be -> emacs-straight/eglot@6a9e0c76b9
magit/forge@1c904090df -> magit/forge@9db4d386a1
magit/magit@28d272ce0b -> magit/magit@bf58615a03
purcell/envrc@116cb75ee1 -> purcell/envrc@4ca2166ac7

Fix: #8325
2025-04-01 15:31:54 -04:00
17a870fef8 fix(magit): reload related buffers after git ops
And when refocusing a frame.
2025-03-30 16:10:22 -04:00
1e1fd5c8e4 fix(magit): evil-collection-magit-section overrides
These fixes for evil-collection-magit-section weren't being applied
since 2f7f37d49b, but any combination of `after!` (or
`{with-}eval-after-load`) will convolute load order for users trying to
rebind their own keys on top of ours *and* evil-collection's, and using
`evil-collection-setup-hook` for this is clumsy, so I must resort to
advice.

Amend: 2f7f37d49b
2025-03-25 18:11:35 -04:00
65a5e50d1c fix(magit): transient: window config jank
With the combination of a bad value for
`transient-display-buffer-action` and a non-nil
`transient-show-during-minibuffer-read`, transient may jumble up
adjacent popup/side windows, particularly those belonging to plugins
with their own popup management and dedicated side windows (i.e.
`display-buffer-alist` rules) like Helm or Doom's popups.

Fix: #8319
Fix: #8235
Co-authored-by: tarsius <tarsius@users.noreply.github.com>
2025-03-25 18:11:18 -04:00
39fe608cfc fix(magit): restore previous default transient visibility
Fix: #8194
2025-02-21 15:15:09 -05:00
07eae64509 refactor(vc): move git-commit to magit module
`git-commit` is no longer distributed with `magit` and no longer
declares its dependencies, causing "file missing: with-editor" and
similar errors for folks who don't have magit installed. Also, VC's
commit workflows don't utilize the mode, so there's no reason to keep it
in this module.

Ref: magit/magit@c170fcf399
Ref: #8003
2024-09-09 18:08:28 -04:00
0893edefae refactor!(magit): remove magit-todos
BREAKING CHANGE: Removes magit-todos from the magit module. I've always
thought my choice to include it as a 'reasonable default' in this module
was a bit dubious. Given how trivial the config is, I leave it to users
to install if they want it, instead.
2024-08-19 16:21:45 -04:00
e66a863e07 fix(magit): don't recursively open process buffers 2024-08-15 14:02:03 -04:00
47fce87d86 fix(magit): forge-browse-dwim -> forge-browse
Renamed upstream

Ref: magit/forge@ba752a4e9b
2024-06-03 16:14:57 -04:00
7afc21a652 fix(magit): remove lazy emacsqlite build hack
This was resolved upstream some time ago and is now a source of
errors (void-variable emacsql-sqlite-executable errors) if forge were
ever bumped (which it was, yesterday, in 1a05e2f).

Ref: magit/forge@398ca3a17a
Amend: 1a05e2fa64
2024-02-05 19:13:46 -05:00
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