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.
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.
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.
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.
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
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.
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
Before M-1 M-2 M-3 M-4 were bound by magit to show fixed numbers
of details. Now these bindings are available with 1 2 3 4 instead.
The M-X bindings are now used for quick switching of windows as in the
rest of spacemacs.
Usage of the `:if` keyword with `use-package` does not prevent Spacemacs form
installing the package, it only prevents the loading in run-time. This commit
employs the `:toggle` feature of the configuration layer system to prevent the
unneeded packages from being installed in the first place.
This further improves upon 31324f68bb
counsel-git find a file in the current git repository. "gff" is
currently bound to magit-find-file. While counsel-git seemingly performs the
same functionality as magit-find-file, they are substantially different:
magit-find-file is not intended to find a file, contrary to what the
name indicates. See https://github.com/magit/magit/issues/3967 for
explanation. This is why we need another key binding for counsel-git.
Delete integration code for git-link and git-timemachine, which is
superseded by upstream changes to git-link committed in August 2016:
433ba1dba7
* CHANGELOG.develop: Add an entry for this change.
* layers/+source-control/git/funcs.el (spacemacs/git-link-copy-url-only):
Replace call to spacemacs/git-link with a call to git-link.
(spacemacs/git-link-commit-copy-url-only): Replace call to
spacemacs/git-link-commit with a call to git-link-commit.
(spacemacs/git-link, spacemacs/git-link-commit): Delete functions.
* layers/+source-control/git/packages.el (git/init-git-link): Replace
binding to spacemacs/git-link with a binding to git-link.
Use a dynamic hint for the smerge transient state in order to show the
current and total numbers of conflicts, and make the full hint toggleable.
* CHANGELOG.develop: Add an entry for this change.
* layers/+source-control/version-control/config.el
(spacemacs--smerge-ts-full-hint-toggle): New variable.
* layers/+source-control/version-control/funcs.el
(spacemacs//smerge-ts-hint): New function. Return a string indicating the
index of the current conflict and the total number of conflicts detected by
smerge-mode. If spacemacs--smerge-ts-full-hint-toggle is true, append the
smerge transient state's full hint.
(spacemacs//smerge-ts-toggle-hint): Toggle showing the full hint for the
smerge transient state.
* layers/+source-control/version-control/packages.el
(version-control/init-smerge-mode): Define the transient state in :init so
we can use spacemacs|transient-state-format-hint. Use
spacemacs//smerge-ts-hint to display a dynamic hint. Bind the ? key to
spacemacs//smerge-ts-toggle-hint.
Context:
When using org files, one normally tends to add Github code links to an
algorithm/bug explanation so that readers are able to follow along with a PR
change.
The current `<SPC> g l L` command gets us the URL to the current branch; given
the code is in flux, the link becomes non-sensical rather quickly, loosing value
when trying to build a document with explanations about the code.
This PR allows us to get the Permalink (e.g. link associated to the commit, not
the branch); using this, the URL contents will never change with new commits
submitted to the repository.
Changes:
* Add two new functions with associated keybindings:
- `<SPC> g l p` maps to `spacemacs/git-permalink`
- `<SPC> g l P` maps to `spacemacs/git-permalink-copy-url-only`
* The above changes rely on mechanisms of `git-link`, so no new code needs to
be introduced
There was a edge case with the declaration of the `lsp` layer in `layers.el`
files.
The `hy` layer depends on the `python` layer which in turn depends on the `lsp`
layer if and only if the `python-backend` layer variable is set to `lsp`.
When the `hy` layer was declared first then it declares the `python` layer
without its layer variables, thus the `lsp` layer was not declared because the
`python-backend` variable was not set.
The fix is to gather all the layer dependencies and resolve them only after all
the used layers have been declared.
* new function `configuration-layer/declare-layer-dependencies`
* replace all calls to `configuration-layer/declare-layer` by the new function
except for distribution layers (we declare layer dependencies right away in
distribution layers)