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.
Add key bindings to refactor namespace forms for existing functions in CIDER.
"ran" 'clojure-insert-ns-form
"raN" 'clojure-insert-ns-form-at-point
"run" 'clojure-update-ns
The evil state foreground color on the mode-line was set to
the mode-line background color.
This caused problems with some themes.
[FEATURE REQUEST] Darker option for mode-line color codes #13731
Solution:
Set the evil state foreground color to the darker of the
mode-line face foreground or background colors.
* Sending <kbd>Esc</kbd> to vterm using `vterm--self-insert` results in `1;5u`,
using `vterm-send-escape` instead.
* <kbd>Ret</kbd> is not sent by `vterm--self-insert`, using `vterm-send-return`
instead.
A few of the layer's keybindings are shadowed when using the LSP backend:
- `F` - format buffer using stylish
- `hh` - lookup on Hoogle
- `gi` - navigate to imports
These are useful shortcuts to keep, so when the LSP backend is in use they are
rebound like this:
- `F` -> `S`
- `hh` -> `hg`
- `gi` -> `gl`
- `hH` -> `hG` (not one that is shadowed, but rebound to bind external and local
Hoogle lookups to similir shortcuts)
Popwin automatically configures pupo purposes
if properly configured. While I was checking
the existing configs I have found that the
settings will be ignored if the config is not
done via a post-config hook.
A quick search revealed a lot of popwin configs
which never had any effect.
This commit fixes these and with this also
restores the missing pupo configs.
refactor key bindings for applications to provide additional room for
applications and use lower case characters.
Move calc-dispatch to `SPC a *`
Relates to #13503
spacemacs/go-run-test-current-function() previously failed when point was
anywhere but at the end of the line on the first line of the test function to
run.
According to the README, `SPC a t v t` should start `vagrant-tramp-term`, but
instead, it seems to have been bound to `SPC a t v`. This means that it
overrode all of the other vagrant keybindings under the prefix `SPC a t v`.
The issue seems to have been a typo from commit e38c33f.
Relates to #13503.
User purposes are exclusively for user configs.
Layers shall set purpose extensions instead to allow
reconfiguration.
The existing layers have been refactored to use
extensions now. So this kind of hack is not longer
needed.
The purpose config was declared by using user mode purposes
which are reserved for user configuration.
I have also fixed the license header for config.el which did
not mention Sylvain Benner & Contributors.
In the old form the wrong type of extension
was added, this prevented any reconfiguration
of purpose allocations in the dotfile.
Now the right type of allocation is used
allowing users to overwrite the config easily.
How this is done is described in
the purpose layer.
spacemacs//fixup-window-configs is added as an `:around` advice for
`rename-buffer`. It should preserve `rename-buffer`'s return value,
which is the new name of the buffer.
f553b3622d indicated that Spacemacs no
longer uses `exec-path-from-shell`, and instead relies on
`spacemacs-env-vars-file` to make sure environment variables are
set correctly. This caused `gls` not to be used on macOS any more.
This commit re-enables support for automatically using `gls` in dired.
Fix#10957.
Fuel mode is responsible to connect to a Factor instance. This change extends
the Factor layer to handle a graphical listener process, to which fuel can
connect afterwards.
A major motivation is also to make it easier to develop with different Factor
versions, which can be specified with (project-/directory-specific) variables.
When starting a Factor listener in a certain location this way, the elisp code
for fuel/factor mode is reloaded from that location.
AUCTeX is weird: It reports major-mode as latex-mode (since TeX-latex-mode is
applied as an :override advice on the basic built-in latex-mode), but its mode
hook is LaTeX-mode-hook, not latex-mode-hook (which is only run by the built-in
latex-mode). Since bind-map uses the value of major-mode, we must pass
latex-mode to spacemacs|define-jump-handlers. But then
spacemacs//init-jump-handlers-latex-mode gets added to latex-mode-hook, which
never gets run. So we must manualy add it to LaTeX-mode-hook.
[latex] Use dumb-jump as primary jump handler
Otherwise, the default is used, which prioritizes evil-goto-definition over
dumb-jump-go. Dumb Jump tends to Just Work, while evil-goto-definition doesn't
handle LaTeX very well, at least not without a TAGS table.
[latex] Update CHANGELOG.develop
When mu4e layer is present org-store-link doesn't work immediately when you
start Emacs, unless you explicitly load mu4e.
It'd display "Please load mu4e before mu4e-org" message and do nothing.
Having an explicit dependency on lsp-treemacs for post-init-lsp-treemacs is no
longer necessary in the Scala layer, as lsp-metals superseeds it.
Removed lsp-metals-treeview-enable as it no longer exists.
This is a squash commit, it includes:
* Add go run and go test command variables
* Update go README for go-run-command and go-test-command
* Update CHANGELOG
As per the README, `SPC m s B' should put the REPL buffer in insert state, but
the keybinding as defined puts the racket file itself into insert state, not the
REPL. This means that on returning to the racket file buffer, the cursor is
left in insert state, which means it is easy to accidentally add unwanted text
into the file.
To fix this, a `with-current-buffer' wraps the `evil-insert-state', so that
insert state is enabled in the REPL buffer, not the file being edited.
The first time this is run, `racket-run-and-switch-to-repl' is asynchronous of
`evil-insert-state', so trying to get the Racket REPL buffer will error. To fix
this problem, we wrap the `with-current-buffer' with a check to determine that
the Racket REPL buffer is live. The first time the Racket REPL buffer is
created, the contents will not run, since the Racket REPL buffer will not yet be
live. This is fine, since we enter the REPL in insert state automagically.
This change does not need to be done to `spacemacs/racket-send-last-sexp-focus',
`spacemacs/racket-send-definition-focus', or
`spacemacs/racket-send-region-focus' since these functions follow all of their
racket-send functions with `(racket-repl)' before calling `evil-insert-state'.
flycheck-mix has been removed by the package author as being
obsolete with proper lsp and alchemist support. Therefore
the layer also has been cleared of it as it cannot longer
be found on Melpa.
Mustache is the preferred templating in modern versions of CFEngine and it's
nice to have syntax highlighting when working with templates.
Now, when the CFEngine layer is in use, files ending in .mustache will be opened
in mustache-mode.
Helm v3.3 no longer uses ido to get buffer list. So the change perp-mode makes
to ido won't affect helm anymore. Hence helm buffer list commands such as
helm-mini and helm-buffer-list will shows all buffers regardless of current
layout. Also `SPC l l` crashes with new helm.
This PR fixes them. We use the new helm variable helm-buffer-list-reorder-fn
to filter buffers. Because we compose this value users are still able to
customize this variable.
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
As of Scala 2.13, Unicode arrows are deprecated:
* https://github.com/scala/scala/pull/7540
* https://github.com/scala/scala-dev/issues/585
* https://github.com/scala/bug/issues/11210
Using one will give a deprecation warnings like so:
> The unicode arrow `⇒` is deprecated, use `=>` instead. If you still wish to
> display it as one character, consider using a font with programming ligatures
> such as Fira Code.
As such the Scala layer's version slick capability to replace ASCII arrows with
Unicode ones is no longer useful, and I have removed it.
Based on my tests it doesn't seem that there is a need for a more graceful way
to deprecate this: i.e. nothing fails if there is extra junk in `:variables`.
Before the decision which linter to run before golangci-lint has been
taken by the layer. However this can also directly be done by the
checkers.
Also golangci-lint did run even when the previous checker still reported
errors. With this it is only called if the previous checker is satisfied.
All thanks goes to Tommi Komulainen.
Flycheck-golangci was not properly conigured which resulted in
not replacing disabled standard linters like go-test.
In addition there seems to be an issue in the current golangci
build causing the linter to fail. In this case spacemacs now
shows at least basic errors from go-build. When they are fixed
the linter should be able to work normally again.
From the author of mu4e, org-mu4e.el is not supported anymore. Load the
supported org functionality from mu4e-org.el instead.
mu4e author -- "org-mu4e.el has been obsoleted in mu4e 1.4.x... the supported
parts are in mu4e-org.el now. And there's currently no real expectation you can
load those separately (it might work)."
I believe by separately means loading mu4e-org w/o having loaded mu4e.
A BEGIN_SRC block in the documents had no language specified
which would break CI.
I have also changed the eldoc setup to run each time the mode is
entered instead of only in the initially loaded buffer.