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.
Currently 'helm-ag-mode-jump-other-window is bound both to RET and to C-o (its
original default binding), while 'helm-ag-mode-jump isn't bound at all (its
original default binding is RET). This commit removes our customization so that
both 'helm-ag-mode-jump-other-window and 'helm-ag-mode-jump have bindings in the
mode.
The same change is also made for the analogous helm-grep functions, for the same
reason.
This layer helps quickly sorting Dired buffers in various ways, such as
time, size, etc.
I think the underlying package is useful and worth a place in spacemacs.
It has also been promoted by Pragmatic Emacs before (albeit long time
ago): http://pragmaticemacs.com/emacs/speedy-sorting-in-dired-with-dired-quick-sort/
Disclaimer: I'm the author of dired-quick-sort package
Add key binding to evaluate the current namespace form (very useful when
starting CIDER as it loads in clojure.core to enable the cider-clojure-docs
functions to work)
Add keybinding to reload all namespaces into the REPL process
Adjusted key bindings to be lower case under `en` sub-menu.
Declared key binding prefixes.
And updated the react layer documentation:
- Mentioned the additional key bindings in the javascript layer
- Added a link to the javascript layer
* [core][keybinng] improve minor mode binding
This commit added add a new function defun spacemacs/declare-prefix-for-minor-mode
and improved spacemacs/set-leader-keys-for-minor-mode.
`which-key` package recently introduced a new api
which-key-add-keymap-based-replacements which improves perfomance and allows
prefix and namings to be stored directly in keymap. This is a great improvement.
With this new api we now make change to spacemacs/declare-prefix-for-minor-mode
to manage prefix also. For example:
(spacemacs/set-leader-keys-for-minor-mode 'lsp-mode
"=" "format"
"=b" #'lsp-format-buffer)
Before we had to use another api to bind prefix
spacemacs/declare-prefix-for-mode which only works on major-mode. As lsp-mode is
a minor mode this api causes a lot of problems to which-key performance. An
example is https://github.com/syl20bnr/spacemacs/issues/12455 which led to my
hack in https://github.com/syl20bnr/spacemacs/pull/12474.
The improved spacemacs/set-leader-keys-for-minor-mode will take care of both
prefix and key naming for the minor mode. This will allows us to have a better
set up for dynamic minor modes such as lsp-mode, tide-mode etc.
Also another api is created to make prefix for minor mode:
spacemacs/declare-prefix-for-minor-mode.
Usage:
(spacemacs/declare-prefix-for-minor-mode 'tide-mode "E" "errors")"
* [tide] improve prefix
* [lsp] improve prefix
* [core] add z$ as Evil keybinding for set-selective-display
This is a feature whose equivalent I had looked for previously and not found. I
bumped into it in [this excellent
article](https://karthinks.com/software/batteries-included-with-emacs/) which is
a survey of "batteries included" parts of Emacs. He mentions Spacemacs (in a
positive light) in the article, but the article is a lot about what you can do
_without_ distributions like Spacemacs, Doom, or Prelude. As such, this seems
like an opportunity to make Spacemacs even better---i.e. by making these
relatively unknown batteries that are already present in Emacs more discoverable
in Spacemacs.
I put it in the folding menu `z` because that fits its usecase. I used `$`
because:
* the out-of-the-box Emacs keybindings is `C-x $`.
* the menu is already fairly saturated
* I didn't know what else to base the mnemonic on because
* I'm not aware of a Vim equivalent
* The name of the Emacs function itself is nondescriptive of its behavior
I couldn't find any keybinding documentation table to add it to. Please let me
know if I missed something.
* [core] DWIM in z$ as suggested by @lebensterben
It builds around graphql-mode
- Syntax highlight and graphql calls with graphql-mode
- Autocomplete with comapy-dabbrev
- Format buffer with prettier
- Go to definition with ahs
Having to manually press i after using any of these commands is annoying to say
the least. This commit affects the following commands:
- org-insert-drawer
- org-insert-heading
- org-insert-item
- org-insert-structure-template
Change to org-insert-heading also affects other commands that use it
internally (e.g. org-insert-subheading).
This avoids more problems found by @duianto.
Also:
* Use more descriptive variable names
* Print message explaining lack of narrowing in visual block mode
* Apply @duianto's fix to only activate visual selection it if it was active
previous to the creation of the indirect buffer
* Block use of visual block mode because of continuing problems in that mode,
and its questionable usefulness in this case
* Extract commonalities out of the narrowing functions
* Make the new keybindings into a list in the changelog for readability, per
@duianto
Based on http://xenodium.com/search-bash-history-with-emacs-helm/
Add new helm/ivy functions `spacemacs/helm-vterm-search-history`,
spacemacs/counsel-vterm-search-history to search bash history and insert to
vterm/shell
Bind this function to M-r for vterm
New layer variable spacemacs-vterm-history-file-locatition to customize bash file
Default is nil.
Also bind add counsel-shell-history to `, H` for shell-mode in the same
convention as helm counterpart.
[shell] wip
Searching for information about configuration layers is confusing because both
the overview and development info pages have the same title (try it with
google). Specifying those info pages title names and adding cross links makes
the docs friendlier.
Added 'ranger as an option to the variable: ranger-enter-with-minus
Changed the default value from: t to: 'deer.
Bound the key to evil-motion-state-map instead of evil-normal-state-map
so that - also works from the Spacemacs home buffer.
* Added `helm-ag-success-exit-status` when using `rg`
It's been advised by the upstream of `helm-ag` to set
`helm-ag-success-exit-status` to `'(0 2)`.
This commit adds this.
ref: https://github.com/emacsorphanage/helm-ag#helm-agel-with-other-searching-tools
Signed-off-by: Lucius Hu <lebensterben@users.noreply.github.com>
* Use `magit-status-setup-buffer` instead of `vcr-dir`
This is suggested by the package itself.
Ref: 4da1a53f2f/helm-ls-git.el (L184-L189)
Co-authored-by: Lucius Hu <lebensterben@users.noreply.github.com>
I chose to go this way rather than the other way because:
* Whenever you can avoid holding down a modifier key, great!
* It seems like the more specific should yield to the more general
This may be a controversial change, because it could break some folks' finger
memory. However I consider this a very unpleasant inconsistency that inhibits
the development of finger memory, so I thought I would at least suggest it as
the default for Spacemacs.
"SPC d" was used for documentation related keybindings, such as in `dash`
layer.
But it's now used for `dap` layer exclusively.
Removing this won't cause any issue as `dap` layer would correctly set
the keybindings once it's loaded.
* Bind typescript-format to "==" or "=" depending on backend
This fixes a problem when using 'lsp backend: the lsp layer binds its own
formatting functions under "=" as a prefix. The spacemacs/typescript-format
function which the typescript layer defines has advantages over these, mainly
it respects the typescript-fmt-tool variable (uses the formatting tool that
theuser specified).
This patch solves this by keybinding leader+"==" to the function when
typescript-backend is set to 'lsp and binding to leader+"=" in any other case.
* Fix an accidentally deleted keybinding in table in documentation
* use getter for backend variable
Co-authored-by: nanashi0x74 <rian.lindenberger@mpq.se>
This enables navigating up in the `ivy-reverse-i-search` list with `C-k`.
The same rebinding from `C-k` to `C-M-k` to kill a list entry,
is also done in the `ivy-switch-buffer`.
By default Ivy uses `find-file` which uses Emacs `abort-if-file-too-large`
function to check/warn before opening large files. That function however does
not take into account Spacemacs its `spacemacs-large-file-modes-list`. Instead
ivy should use `find-file-noselect` to skip Emacs it large file warning and let
it to Spacemacs its `spacemacs/check-large-file` function. Additionally [Emacs
tips on
comments](https://www.gnu.org/software/emacs/manual/html_node/elisp/Comment-Tips.html)
recommends to use 3 semicolons for comments that function as headings.
Fsharp-mode has recently undergone some major changes. FSAutocomplete is
no longer distributed with Fsharp-mode. Instead Eglot is used a language
server that pulls in FSAutocomplete. To get auto-completion working
again eglot-fsharp has to be required and an instance of Eglot has to be
started once an F# file is opened.
* Group `line-number` funcs under SPC t n
* Better name: absolute-line-numbers
Keep the old symbols around for backwards compatibility
Co-authored-by: Rostislav Svoboda <Rostislav.Svoboda@gmail.com>
- Added documentation for the following minor modes:
- lsp-headerline-breadcrumb-mode
- lsp-lens-mode
- lsp-modeline-diagnostics-mode
- lsp-modeline-code-actions-mode
- Added description of Code Lens feature.
- Added description of default values of any variablese introduced in the
commit.
- Added a section to brief mention the DAP integration of lsp-mode, which
leads users the DAP layer for more details.
- Re-formatted the document, inline codes are quoted by '~' instead of '='.
The PR fixes an issue where spacemacs is in a bad state after upgrading. I
suppose what happens is that `evil-set-undo-system` is invoked before `evil` is necessarily the correct version.
org-jira is typically used from org major mode - new keybindings add a more
convenient way of invoking its functions.
The new org-jira submenu is available under "mj" - using the same pattern as
org-trello.
Add org-roam support along with keybindings under new menu prefix "SPC a o r".
Assign layer search keybinding ("SPC a o /") to helm-org-rifle, falling back to
previously assigned function (org-occur-in-agenda-files) when using ivy.
Creating another keybinding for org-occur-in-agenda-files is not necessary,
as it can be accessed with another existing keybinding ("SPC a o o /").
problem:
The following error messages are shown.
When trying to move, select or swap the current buffer,
to a window nr greater than the total number of open windows.
For example:
With only one window open.
`SPC b 2`
>ad-Advice-select-window: Wrong type argument: window-live-p, nil
In the Buffer Transient State (`SPC b .`):
- `C-2` (`spacemacs/buffer-transient-state/winum-select-window-2`)
>Wrong type argument: window-valid-p, #<window 12>
- `2` (`spacemacs/buffer-transient-state/move-buffer-window-no-follow-2`)
>Wrong type argument: window-live-p, #<window 14>
- `M-2` (`spacemacs/buffer-transient-state/swap-buffer-window-no-follow-2`)
>Wrong type argument: stringp, nil
Solution:
Show a descriptive message, if the target window nr is greater than the number
of open windows. And ignore the LV buffer (hydra).
Helm already has spacemacs/resume-last-search-buffer bound to it and is in my
muscle memory. spacemacs/resume-last-search-buffer doesn't work with ivy, so
just use ivy-resume.
Spacemacs uses spacemacs/swiper functions that use the less sophisticated
spacemacs//counsel-current-region-or-symbol instead of ivy's native
ivy-thing-at-point function. This commit removes those spacemacs functions and
rebinds the shortcuts to their better native equivalents.
problem:
The internal link:
- See [[info:auth#The Unix password store][its info page]] for more details on using it.
Caused an issues with travis-ci:
https://travis-ci.org/github/syl20bnr/spacemacs/jobs/732236190#L332
error: Link "info:auth#The Unix password store" has unknown type "info"
Solution:
Linked to the same page in the online manual.
New command added to CIDER in version 0.26 to evaluate the list around the
current point, different to evaluate sexp around point which also evaluates
symbols.
https://github.com/clojure-emacs/cider/pull/2881
Resolves#13948
problem:
The p key tries to paste in the read-only magit buffer,
instead of calling magit-push.
After toggling text-mode on and off (C-t or \),
because evil-mc-mode becomes enabled when text-mode is enabled.
* [core] Fix evil keybindings when a link is selected in Custom-mode
This uses a separate keymap bound directly to the widget and circumvents the
existing evil keybindings.
This fixes the bug found by @duianto, which he posted
[here](https://github.com/syl20bnr/spacemacs/pull/13949#issuecomment-694685304).
* [core] Fix q and u to work everywhere in a Custom-mode buffer
* [markdown] Anchor auto-mode-alist entries
A file named foo.mkd.patch should use diff-mode, not markdown-mode.
* [markdown] Simplify regexp in mode specifiers
Putting k in brackets here has no effect.
Looks like the provided hook statement
is not working properly with this package.
I have replaced it with the recommended
way defined in the package itself and
now it seems to work.
tab is reserved by the auto-completion layer and
shall never be overwriten in a layer. This moves
emmet-expand to a similar binding which was
originally used by emmet for non evil users.
This treats evil and non evil users alike and
avoid conflicts with company key bindings.
Still a layer changing the meaning of tab is
a bad idea, this key is reserved for auto-completion-layer.
We should add an alternative binding for it but this commit
focuses on removing the conflicts with company popup scrolling
first.
`fasd-find-file` incorrectly interprets a prefix argument of value 1
as equivalent to nil ([issue][0]).
Work around this bug by just passing another positive number instead.
We choose 2.
[0]: https://framagit.org/steckerhalter/emacs-fasd/-/issues/14
When the corrupted `elc` file is detected
`cider-jack-in-lein-plugin` has a nil value
value added already which causes `cider` to fail.
This commit removes such a row in that case.
It seems to happen from time to time that sayid is not
properly compiled after the installation. In this case
the variable `sayid-version` is `nil` causing
nRepl to fail.
This commit tries to work around this problem by
reinstalling the package if this corruption is detected.
This normally fixes the issue described in #13906.
In the documentation, it says this performs execute cell and goto next, while
the code was just executing the cell.
This desync could be fixed in either direction, but executing and going to next
feels more ergonomic while in the transient state, since we're jumping around
running rather than editing in that mode, so I've fixed it to do that.
This runs the default spacemacs elisp formatter on buffer save, with no
functional changes. I have further changes I'd like to integrate, but first
want to sweep this large but no-op diff forward.
Microsoft has released pyright language server for python. It boasts better
performance than the old Microsoft language server for python. This commit adds
supports for pyright language server in python layer
* Switch from nabero's ron mode to my own custom ron-mode (hosted on MELPA)
* Replace depreciated perl6-mode withraku-mode
* Remember to update the init function
* Add RTags shortcuts for trees and dead functions
The change will add 3 shortcuts for dependency, references trees and for finding dead functions.
* Additions of some key bindings