When ligatures are enabled globally emacs gets pined at 100% CPU. In #13967
there were some ligatures that were highlighted but enabling this only in
prog-mode so emacs dose not get pined at 100% when just enabling with
(unicode-fonts-enable-ligatures t). In #14178 it was highlighted that "\\" had
an issue in the `init.el` so this has been removed
- "//" Issues with doom mode line
- ".." "..." Issues with helm find file
- "--" Issues with magit
The eglot configuration for automatically starting a server instance when
opening a file is incorrect and thus tries to start the server twice which leads
to more problems down the line. Also the company-backend is not properly setup
so auto-completion does not work reliably when using lsp or eglot.
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.
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
We should always define the 2 flycheck initialization functions:
Spacemacs will call them as needed only when enabling syntax checking.
Previously flycheck wasn't getting activated at all.
Only activate `flycheck-ocaml` when a `.merlin` file is present.
It would work when there isn't but there is a high chance that you will
get a lot of errors displayed because it could not find any of the used
modules (`.merlin` specifies module paths).
OCaml projects usually do have a `.merlin` file
(either hand crafted or generated by the build system).
Signed-off-by: Edwin Török <edwin@etorok.net>
lang/ocaml: add merlin-eldoc and merlin-imenu support
This displays the type and documentation of thing under point
and highlights occurrences automatically when idle. Could be achieved by appropriate use of
keyboard shortcuts already set up by this module.
However `merlin-eldoc` can also display the expected type of function call parameters,
which merlin itself wouldn't.
`merlin-imenu` allows jumping to top level modules/functions/etc. bound
by default to `SPC j i`.
Signed-off-by: Edwin Török <edwin@etorok.net>
lang/ocaml: add merlin-iedit multiple cursor refactoring
bound to `, r e`.
Signed-off-by: Edwin Török <edwin@etorok.net>
fixup! lang/ocaml: add merlin-iedit multiple cursor refactoring
fixup! lang/ocaml: fix flycheck-ocaml activation
fixup! lang/ocaml: add merlin-eldoc and merlin-imenu support
biblio-/core is pulled in by multiple packages in this
layer already and their package declarations was empty.
Users can access the functionality biblio offers
from helm-bibtex.
The spacemacs analogue of cider-load-buffer-and-switch-to-repl-buffer
doesn't accept an argument to set the namespace while you are switching
to the repl buffer. This adds support for an argument, invokable with
the universal argument, for setting up the namespace as well. This will
eliminate an extra `(in-ns ...)` or `, s n` call as long as you invoke
`, s B` prefixed by the universal argument: `SPC u , s B`.
Missing parentheses around:
"\\.ron\\'" . ron-mode
in the line:
:mode "\\.ron\\'" . ron-mode
Updated the rust readme to mention the .ron support.
And added a changelog.develop entry.
* alphabetize slack keybindings
Alphabetization makes it easier...
- to read the list
- to add new keybindings (because there's an obvious place)
- to merge this file (because insertions won't all happen at the end)
* Add more slack keybindings
T 'slack-all-threads
u 'slack-all-unreads
* Update documentation and changelog for slack keybindings
Also alphabetized the keybindings in the slack README
Co-authored-by: Damon Wang <damon.wang@gmail.com>
* [ESS] Fix: remove obsolete variables in ESS
- use ess-offset-continued to replace the obsolete variables (from ESS 15.04):
ess-first-continued-statement-offset
ess-continued-statement-offset
- remove ess-expression-offset
no such variable now
* [ESS] fix: keep ess-default-style instead of ess-style
- keep the original ess-default-style instead of ess-style
since ess-default-style will be obsolete till ESS 19.04
while current ESS version is 18.10
`literate-haskell-mode` was renamed to `haskell-literate-mode` in this commit:
7ccb1ab0cc
Even though a deprecated alias was added, it broke Spacemacs' keybindings, which
were still all bound w.r.t. the old name.
When Spacemacs' fancy logic works well, it is breathtaking. Sometimes, however,
you may need a way to reach in for something a little more raw: in this case,
going straight to `next-error` rather than `spacemacs/next-error`.
I chose `cn`/`cN` because:
* They seem to be unused thus far
* It makes sense to put these keybinding under compile, since they are
associated with Emac's base functionality for compilation.
* The analogous Ex commands are `:cn` and `:cN`. They work this way even in
Spacemacs (but I am trying to wean myself off Ex mode, since I see the
Spacemacs keybindings as far superior most scenarios).
* `cp` was already taken, so `cN` had to be used for going back.
Fixes#13815.
outshine layer: Add "Features:" section to the README
outorg: use `a O` instead of `a o o` as a prefix
outshine: add transient state
outshine layer: (re)document keybindings, add imenu keybinding
outshine layer: fix outorg mode keybinding documentation
address review comments
README.org
Buffer formatting, first paragraph
The apostrophes before: yapf and black
caused the org emphasis verbatim equal signs to be visible.
config.el
python-formatter variable docstring
An apostrophe instead of a backtick, before the possible value: lsp
caused it to be shown with the default docstring color.
After the latest change the list of bindings
has been changed to a dynamic form which
is not only slow but very hard to maintain.
I have replaced the list with the original one
and replaced the fixed line with backquote notation
to keep it static.
* Issue
* It could not correctly bind a prefix.
* where `dotspacemacs-emacs-command-key` is modified,
* it continuously binds a `M-x` prefix to `SPC`
* `SPC` always looks as `M-x`
* Solution
* `SPC`, hard coded `string`, was modified to `dotspacemacs-emacs-command-key`
* Expectation
* When a `SPC` prefix is bound, it should be displayed as the registered name.
Some modes have compilation-mode as parent mode but the ansi coloring
scheme is breaking their highlighting.
i.e. https://github.com/Wilfred/ag.el/issues/124
Fix this by applying ansi-colors only when the major mode is
compilation-mode.
Signed-off-by: Loys Ollivier <loys.ollivier@gmail.com>
Back in commit ac3752ffd, the binding for `vterm` was updated to fit in with the
rest of the `shell` layer bindings (under `SPC a t s v`). However, the `README`
was not updated to match. This commit updates the `README` for the `shell`
layer.
Relates to #13503.
After using Java mode, Gradle keybindings infect or even clobber keybindings of
any subsequently used major-mode. For example, the critical Agda major mode
keybinding of `l` as `agda2-load` gets with a Gradle menu!
The cause, found by @duianto, is that `emacs-gradle-mode` sets itself to a
[global](e4d665d578/gradle-mode.el (L176-L183))
minor mode. The docs for `define-minor-mode` say about `:global:`
> If non-nil specifies that the minor mode is not meant to be
> buffer-local, so don't make the variable MODE buffer-local.
> By default, the mode is buffer-local.
I don't know why `gradle-mode` is doing this; presumably there is some reason or
need for it. But the author of that package hasn't been on GitHub since 2017,
and the last update of the package itself is from early 2015.
To seal the deal, `gradle-mode` hasn't been working anyway (at least, I've never
got it to work). I've been running Gradle by launching a terminal within Emacs.
Fixes#13750.