Commit graph

306 commits

Author SHA1 Message Date
Lin Sun 151ca61df5
[version-control] Switch default version control diff tool to git-gutter
Switch default version control diff tool to git-gutter for original default
git-gutter+ has bugs and no maintain for years.
2021-09-29 21:30:13 +02:00
Maxi Wolff e5a180e78d
[vc] Make smerge ts use emacs version specific functions
this affects smerge-next vs smerge-vc-next-conflict, which
is only available from emacs 27 on, which will check for
conflicts in all open buffers.
2021-09-10 21:38:29 +02:00
Michael Peyton Jones f928c32eec
vc: use smerge-vc-next-conflict instead of smerge-next 2021-09-10 21:17:17 +02:00
Lucius Hu a9ba3b8fe0 git: restore layout when exiting magit buffer
closes https://github.com/syl20bnr/spacemacs/issues/14951

Co-authored-by: Richard Kim <emacs18@gmail.com>
2021-08-25 22:45:06 +02:00
duianto cf21402c5c Revert "Fix which-key entries: gr and gs in dired and magit"
This reverts commit ec57b21a92.

A which-key change caused issues with this fix.
And the fix doesn't seem to be needed anymore.

The correct which-key entries appear without the fix.
2021-06-23 17:33:36 +02:00
Maximilian Wolff af193f769f
[git] Update instructions for global-git-commit-mode 2021-06-09 11:38:15 +02:00
Lucius Hu f0cadad38f
fixup fixup fixup #14715 (#14827)
funcs.el is loaded after packages.el so `spacemacs//support-evilified-buffer-p` is undefined at this point.

moved it inside the `defun` block and it should work.
2021-06-05 15:16:43 +00:00
Lucius Hu d262103b5e
fixup! fixup! #14715 2021-06-05 09:53:23 -04:00
Lucius Hu 1d07f56aed
fixup #14715 (#14826) 2021-06-05 10:08:14 +00:00
Lyall Cooper 5cd56a4668
Only load evil-collection in vim or hybrid mode (#14825)
As described in #9169, when using the emacs editing style the comment inserted at the bottom of a git rebase shows the incorrect key bindings. This is apparently due to `evil-collection` (changing the `git-rebase-mode-hook`)[3ed92cadda/modes/magit/evil-collection-magit.el (L523-L524)].

We can fix the issue by only loading `evil-collection` if we're using an evil-style editing mode.

Closes #9169
2021-06-05 03:44:32 +00:00
Rahul Rameshbabu 8365979326 [perforce] Add p4-shelve and p4-unshelve commands with keybindings
Shelving and unshelving changelists are operations commonly used when
choosing Perforce as a VCS solution. Package consumed by the "perforce"
layer already provides "p4-shelve" and "p4-unshelve" commands that can
be exposed by the layer. Provide keybindings for these two commands as
well.
2021-05-27 22:39:43 +02:00
duianto 917ebbc4cb [version-control] Show bound but unlisted VCS TS key: d
In the VCS Transient State (`SPC g .`)
The key: `d` is bound to: `magit-ediff`
But `d` isn't shown in the VCS TS.
2021-05-17 22:10:11 +02:00
duianto b5fb7d5376 [base] Fix void spacemacs-evil-collection-allowed-list
problem
In the `spacemacs-base` distribution.

When the `git-enable-magit-todos-plugin`
layer variable is enabled.

Then the following message appears on startup:
>An error occurred while pre-configuring magit-todos in layer git (error: (void-variable spacemacs-evil-collection-allowed-list))

cause
The `spacemacs-evil-collection-allowed-list` variable
is assigned in the `git` layer.

But it's defined in the `spacemacs-evil` layer.

The `spacemacs-evil` layer isn't used by default
in the `spacemacs-base` distribution.

solution
Check that the `spacemacs-evil` layer is used
before adding to the variable.
2021-04-15 22:05:35 +02:00
emacspace 95a703b684 documentation formatting: Fri Apr 9 11:56:19 UTC 2021 2021-04-09 21:41:03 +02:00
Maximilian Wolff 9eac85fb6c [git] Add magit-todo to evil-collection configured packages
thanks goes to duianto for suggesting this move.
2021-04-08 20:46:39 +00:00
Lucius Hu dfb4c1c4cb git: Added magit-todos, improved docs, etc.
- Added `magit-todos` package, toggled by `git-enable-magit-todos-plugin`.
- Improved installation and loading of all magit-plugins:
  - All magit plugins are toggled by their corresponding layer variables
    PRE-INSTALLATION, instead of PRE-LOADING. That is, they are installed
    only when the toggle is non nil.
  - The `use-package` call is more specific now.
    - Hooks goes to `:hook`.
    - Removed `:defer` since it's implied by `:hook`, and it's actually not
      doing anything.
- Improved the documentation.
2021-04-08 20:41:24 +00:00
syl20bnr 97cd83e169 Apply GPLv3 terms explicitly to all elisp files 2021-03-25 22:59:32 -04:00
syl20bnr d55a9e2e67 Update header for year 2021 2021-03-25 22:59:32 -04:00
Ag Ibragimov 589c16b73a
git: adds orgit-forge so org links can be stored from forge topics (#14450)
* git: adds orgit-forge so org links can be stored from forge topics

* PR feedback

Suggested-by: Lucius Hu <lebensterben@users.noreply.github.com>
2021-03-14 00:26:38 +01:00
Ilya Grigoriev e8976832f8 Restore SPC gfd for magit-diff, set SPC gfm for magit-file-dispatch
Fixes https://github.com/syl20bnr/spacemacs/issues/14434
2021-02-28 20:55:53 +01:00
Ag Ibragimov e3434e8635 source-control: Change SPC gfd to magit-file-dispatch
SPC g f d  key should be more "contextual", allowing user to perform operations
associated with the current file
2021-02-23 14:43:17 +01:00
duianto b6aa0e651f [git] Remove unused evil-magit function
The only usage of the function: spacemacs//magit-evil-magit-bindings
was removed in the PR: [spacemacs-evil] add evil-collection #14200
2021-02-15 10:47:38 +01:00
duianto 3f7e69e0b1 [git][doc] Update magit bindings link
The evil-magit package has been deprecated and moved to:
https://github.com/emacs-evil/evil-collection/tree/master/modes/magit
2021-02-14 19:39:56 +01:00
duianto ec57b21a92 Fix which-key entries: gr and gs in dired and magit
problem:
pressing g shows the which-key entry:
r -> evil-mc

but it calls the expected commands:
revert-buffer (in dired)
magit-refresh

s -> evil-easymotion
but it calls the expected command:
magit-jump-to-staged

solution:
removing the gr and gs which-key entries,
shows the expected commands.
2021-01-30 11:59:18 +01:00
Thanh Vuong a6d364e0f2 [spacemacs-evil] add evil-collection
It is impossible to ignore `evil-collection` anymore. `evil-magit` has been
deprecated recently and moved to `evil-collection`.

It will save time and effort for both Spacemacs and Evil to share and contribute
to `evil-collection` imo.

However I strongly prefer Spacemacs binding scheme over evil-collection's one.
We should only pick what we need from `evil-collection`.

This PR add mechanism to embrace `evil-collection` and apply it to shell layer (`vterm`)
and git layer.
2021-01-30 01:11:07 +00:00
duianto 61ff12cbfc [base] Show a winum required message
problem:
key bindings that use the winum package,
don't work in the spacemacs-base distribution.

for example in the buffer transient state: SPC b .
{number}, C-{number} or M-{number}

shows messages like these:
Wrong type argument: commandp, winum-select-window-1
Symbol’s function definition is void: winum-get-window-by-number

cause:
the winum package is loaded in the spacemacs-navigation layer,
but the layer isn't used in the spacemacs-base distribution.

solution:
show the message:
This command requires the winum package,
winum is part of the spacemacs-navigation layer.
2021-01-09 08:40:32 +01:00
duianto 8839858d54 [git] Restore magit transient args between sessions
problem:
The Magit w (apply patches) arguments are not remembered between sessions.

cause:
Magit reads the transient files:
history.el, levels.el, and values.el
before Spacemacs has redirected them to the .cache directory.

solution:
Redirect the files before magit reads them.
2020-12-30 20:49:25 +01:00
duianto 62979df319 [git] Fix g magit-refresh for hybrid without evil navigation
This fixes g (magit-refresh), in the hybrid editing style when the variable:
hybrid-style-enable-evilified-state
is: nil

Thanks marienz for reporting the issue and for suggesting to check if the
editing style supports evil navigation.
https://github.com/syl20bnr/spacemacs/issues/14181#issuecomment-739251438
2020-12-06 16:44:49 +01:00
duianto 9c2a208b51 [git] Fix g for magit-refresh with emacs editing style
Fixes: <g> no longer works in Magit status screen #14181
2020-12-01 13:19:20 +01:00
Maximilian Wolff d69d2284f7 Fix undefined var during loading of magit 2020-11-28 07:41:05 +00:00
Maximilian Wolff be908875cb
Change newly added which-key bindings to use keymap api
The newly added bindings had side effects for
magit. This was caused by which-keys replacement
working on bindings which are identical between
various modes.

To fix this I have changed the api to use the newly
added keymap based replacements which avoid these
issues.

As a side effect they are a ton faster as which
key does not have to compare all available bindings
everytime it opens its help window.

I have also fixed some more missing which-key
description in magit status buffer.
2020-11-27 22:46:56 +01:00
emacspace c483818d7e documentation formatting: Sun Nov 22 08:56:33 UTC 2020 2020-11-24 22:22:17 +01:00
Maximilian Wolff 2298d8c141
Move remaining forge functions from github to git layer 2020-11-16 23:36:59 +01:00
Fabián Heredia Montiel b2cb7017e0
Move forge form github to git layer
Supports:
- Github (Both .com and enterprise on premises)
- Gitlab (Both .com and self-hosting)
- gogs / gitea
2020-11-16 23:36:59 +01:00
Maximilian Wolff 9c564b864f
[github] Make docs use pip instead of pip3
I have also added a note for users with distributions
still being on python2.
2020-11-14 09:28:46 +00:00
Daniel Nicolai 6c15706edf Add grip-mode to github layer 2020-11-14 09:47:36 +01:00
Keith Pinson e2718dd046
[git] Implement performance hack for MacOS from Magit Manual (#14070)
* [git] make finding of Git on MacOS more reliable per @tko
* [git] remove Darwin condition on finding git executable
2020-10-23 18:21:22 +02:00
Daniel Luna f266d0768a
Adding magit-delta option for magit 2020-09-27 14:21:50 +02:00
Ray 359b6f5466
Don't let magit-gitflow mode overwrite C-f key binding. (#13973)
* Don't let magit-gitflow mode overwrite `C-f` key binding.

* Describe changes in CHANGELOG.develop
2020-09-23 22:31:44 +02:00
Maximilian Wolff 25d6364bdb
[version control] Revise git-gutter+ refresh on Magit refresh
It was possible before, that the utility function
`spacemacs//git-gutter+-refresh-in-all-buffers`
was not defined but called in the package file.
2020-09-23 21:42:46 +02:00
ClarityStorm 497c23a0f1
Fix git-gutter+ refresh on Magit refresh (#13958) 2020-09-23 21:40:45 +02:00
Robert O'Connor 82ba73a1c0
update copyright to 2020 2020-09-23 21:25:01 +02:00
syl20bnr e3acd91118 [core] Rename spacemacs|require to spacemacs|require-when-dumping 2020-09-20 21:17:21 -04:00
Maximilian Wolff 9fd1f89867
Revert Fix git-gutter+ refresh on Magit refresh
this is causing errors in magit after staging a new
file and making a new commit.
2020-09-18 20:54:06 +02:00
Maximilian Wolff 1f869031ab
Replace lambda with named function in gitter refresh fix
Hooks should not include anonymous functions therefore
I have replaced it with a named function.

https://github.com/bbatsov/emacs-lisp-style-guide
2020-09-18 20:22:27 +02:00
ClarityStorm c23b17833c
Fix git-gutter+ refresh on Magit refresh 2020-09-18 20:15:23 +02:00
Codruț Constantin Gușoi 18bd126de4 Change browse-at-remote to "SPC go" sicne it is not github specific 2020-07-18 09:37:11 +02:00
tuh8888 ce5f278a2a [git] Allow multichar major mode leader key for exiting magit commit edits 2020-07-07 16:06:38 +02:00
duianto 0d29f15f6c [source-control] Add Git Blame Transient State
Minified hint:
Chunks: n N p P RET Commits: b r f e q

Full hint:
Chunks                   Commits                     Other
[p/P] prev /same commit  [b] adding lines            [c] cycle style
[n/N] next /same commit  [r] removing lines          [Y] copy hash
[RET] show commit        [f] last commit with lines  [B] magit-blame
                         [e] echo                    [Q] quit TS
                         [q] quit blaming
2020-06-07 18:09:18 +02:00
duianto 4e2ce45aa4 [version-control] Bind SPC g v I (vc-ignore) on startup 2020-05-10 21:18:35 +02:00