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
The code changed here wants to distinguish the cases of whether `arg` is a list
with one set of args to `spacemacs|diminish` or a list of a list of such args.
It used to look at the second element of `args` to make that distinction.
Consequently, if you want to specify a list of a list of args for
`:spacediminish`, you'd have to have at least two such lists of args in the list.
However in
38f582d785
a usage with a list of just one list of args was introduced.
This fixes changes the detection so that it looks at the first element of `arg`.
If that's a list, `arg` is assumed to be a list of lists of args to
`spacemacs|diminish`. If it's not, it's assumed to be just a list of args to
`spacemacs|diminish`. That works well because the first argument to
`spacemacs|diminish` is a symbol.
Fixes#14726
for it has a lot of side effects by globally replacing
-+- in the entire markdown buffer. Up to now markdown
has its own table insert function available via
`SPC i T` which is to be prefered.
In addition there seems to be no active
binding for `orgtbl-mode` in markdown making it very
unlikely that someone is still using it within markdown-mode.
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.
In the scheme REPL, RET is bound to `geiser-repl--maybe-send` which most times
sends the input instead of inserting a newline. Therefore this separate
keybinding for that will always insert the newline is required.
Also the geiser-doc-mode is a read-only mode which should get evilified to
unshadow the convenient evil-like default Emacs keybindings.
Remove `C-o` keybinding from helm-bookmarks.
Add `S-RET` keybinding to open file/buffer/bookmark in other window for
helm-files helm-buffers and helm-bookmarks.
Advantage: Consistent behavior. It is pretty cumbersome to use the persistent
action provided by helm to open files/buffers/bookmarks in the other window.
`xref-find-definitions` is an interactive function that requires one argument `identifier`. You either need to `call-interactively`, or better yet, call it by forwarding the `sym-name` as the `identifier`.
Emacs mode is clearly better than vim mode, because j and k keys are already
bound to down/up motion. In addition as the tree mode is traversed, the
matching code pops up on the left in emacs mode but not in vim mode.
`lsp-use-upstream-bindings` set to `t` then Spacemacs will bind all
`lsp-command-map` behind `SPC m`, `,` and `M-m`. This way the bidings will be
managed by upstream `lsp-mode` which is documented at
https://emacs-lsp.github.io/lsp-mode/page/keybindings/.
Spacemacs only replaces the prefix `s-l` with `SPC m`. For example:
| lsp binding | Spacemacs binding |
|-------------+-------------------------------------|
| `s-l w s` | `SPC m w s` or `, w s` or `M-m w s` |
### Added workspace action messages
`SPC l w` followed by a number key `0-9`
or `SPC l w s` single window workspace
>Workspace 2 created
`SPC l w 1` from another workspace
>Workspace switched to 1
`SPC l w 1` from the same workspace
>Already on Workspace 1
`SPC l w c` clones the current workspace to the next free slot
>Workspace 1 cloned to 3
`SPC l w d` close the current workspace
Workspace 3 closed
### And
Open the Spacemacs home buffer when creating a new workspace
with the number keys. Previously it opened the scratch buffer.
I'm not sure how best to start doing this, but the branch over at
timor:spacemacsOS has moved ahead a bit. I've grown used to a lot of these
changes, and would like to see them moved to the main develop branch. But, the
pull request (formed by merging in CestDiego:spacemacs/SpacemacsOS in #3321)
started diverging.
Again, I'm not sure how to approach moving together these two changes. Maybe
@timor can help somehow??
This at the least moves in some little things from Timor's branch:
- Can enable exwm-systemtray with `exwm-enable-systray`
- Can enable running XDG autostart applications (only in XDG_USER_HOME/autostart
for now) with `exwm-autostart-xdg-applications`
- Support for reading `.desktop` files and XDG autostart.
- Can specify additional code appended to exwm-init hook with `exwm-custom-init`
---
This PR also fixed some other existing issues, and improved documentation.
Co-authored-by: timor <timor.dd@googlemail.com>
Co-authored-by: Benjamin Yang <be11ng@users.noreply.github.com>
problem
Trying to clone a workspace `SPC l w c`
Does create a new workspace,
but it just shows the scratch buffer.
notes
In addition to fixing the cloning.
Show a minibuffer message:
Workspace: 1, cloned to Workspace: 2
To make it clear that the cloning worked.
Because the only visible difference, is that
one of the left side mode line numbers changed.
- Labelled `elixir-backend` as safe local variable.
- Added local variable hooks of elixir mode:
- `spacemacs//elixir-setup-backend`
All other setup functions are already added to local variable hook.
See: https://github.com/syl20bnr/spacemacs/issues/14653
`first` and `list-length` are aliases for `car` and `cl-list-length`
respectively. Using these aliases causes emacs to error with a `symbol's function
definition is void` error, but using their real names causes no error.
Replaced them with `car` and `length`.
* Add Emacs Window Manager (EXWM) Layer
The time has come of SpacemacsOS
* set window manager name to EXWM
* update copyright notice
* start server when EXWM is active
When using EXWM, Emacs should be ready to receive clients but the final choice
should be the user's in their shell configuration.
* respect Spacemacs naming conventions and layer organization
* leave keyboard remapping to users
* add EXWM states for Evil
* add support for helm-exwm when helm is in use
* use both exwm-randr and exwm-systemtray
* set up workspaces to match displays by default
* use ido-config instead of the deprecated workaround
When using helm-exwm, its sources distinguish title and class automatically. It
is only necessary to keep the buffer name updated when the window title changes.
When using ido, rename differently for different applications.
* add bindings for common X keys
* use standard prefix commands where available
Spacemacs already has prefix commands for controlling windows.
These are directly available in exwm-state as well as in exwm-insert-state
through leader
* remove most keybindings as they are available directly in exwm-state
* enable exwm directly in the layer configuration
It is safe to enable it here as an existing window manager will simply fail with
a warning.
* add user-configurable variables for RandR and workspaces
By default, create as many workspaces as there are displays and assign them in
RandR order.
* fix naming convention for variables
* use helm for launching applications when possible
* fix conditional helm-exwm leader keys
* remove redundant function
EXWM provides the equivalent
* conform to naming convention for Spacemacs
* separate prefix commands into those for major mode and global
* remove all default bindings
* improve readability
* clean up bindings
* remove obsolete comments
Co-authored-by: M. Domenzain <luis.domenzain@parrot.com>
Racket describe mode comes with its own keybinding (i.e. `q` for quit).
Additionally it contains links, so this PR binds `o` to `link-hint-open-link`
(`ace-link` does not support this mode)
* core-customization: improved SAFE variable handling
- SAFE can either be a function or t.
- When it's t, use a default validation function
`(lambda (val) (validate-value val TYPE t))`
- When it's a function, use the supplied function.
* Fixed bugs in go and groovy layer
In almost any cases, it's better to supply `t` instead of a function, to
`SAFE` argument of `spacemacs|defc`.
For example,
```elisp
(spacemacs|defc go-use-gocheck-for-testing nil
"If using gocheck for testing when running the tests -check.f will be used instead of -run to specify the test that will be ran. Gocheck is mandatory for testing suites."
'boolean nil #'booleanp)
```
If its value is nil, it evaluate to `nil`, which means that `nil` is not
a safe value for `go-use-gocheck-for-testing` local variable.
But clearly it is.
* core-customization: improved SAFE variable handling
- Added a function `spacemacs-customization//get-variable-validator`.
This function is designed to be used with `safe-local-variable`
property of spacemacs custom variables.
See details in the docstring.
```elisp
(put 'FOO 'safe-local-variable
(apply-partially 'spacemacs-customization//get-variable-validator
'FOO))
```
- This is better than a lambda since `apply-partially` returns a compiled
function. (Though the performace gain may be tiny.)
- This is better than simply calling `validate-value`, because it returns
nil when value is nil. But sometimes nil is a valid value.
Co-authored-by: Lucius Hu <lebensterben@users.noreply.github.com>
With this fix it is now possible to select different backends in
different project using the directory variables mechanism of Emacs
(the file .dir-local.el)
- Labelled `go-backend` and `go-format-on-save` as safe local variable.
- Added local variable hooks of go mode:
- `spacemacs//go-setup-backend`
- `spacemacs//go-setup-eldoc`
- `spacemacs//go-setup-format`
See: https://github.com/syl20bnr/spacemacs/issues/14653
Eww was wrongly classified as web-service.
It can now be found under tools hence the global
binding was changed from `SPC a w e` to
`SPC a t e`.
Also I have removed parts of the documentation
still refering to this layer not being part of
Spacemacs.
Fixes: vim layer key binding of "J" in dired mode #14614https://github.com/syl20bnr/spacemacs/issues/14614
problem
The evil collection binds "J" to `dired-go-to-file`
It overrides the Spacemacs `helm` and `ivy` equivalent commands.
`spacemacs/helm-find-files' has fuzzy matching and other features
`spacemacs/counsel-find-file' has more `M-o' actions
And the `ivy` layer uses the `spacemacs/helm-find-files` command.
solution
Move the Spacemacs definitions of "J",
after the evil collection dired keys have been setup
from: `spacemacs-bootstrap/packages.el`
to: `spacemacs-evil/init-evil-collection`
And use `spacemacs/counsel-find-file` in the `ivy` layer.
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.
The configuration for various scheme implementations has been split out of the
geiser package, breaking the current layer support for the implementations.
This commit adds a simple fix for the scheme implementations support.
Anybody is free to improve the code, but at least the layer will be fixed.
make bindings stick to minor modes of helm/counsel-gtags-mode not major mode. so
the bindings will only be in force when ggtags-mode is enabled.
deprecate functions spacemacs/counsel-gtags-define-keys-for-mode and
spacemacs/helm-gtags-define-keys-for-mode that add ggtags bindings to major
mode. Next step is to remove these function calls from client layers.
currently toggle `:if` for meghanada with `use-package` only tells `use-package`
not to load `meghanada` but spacemacs still downloads `meghanada`.
also we shouldn't care about emacs 25 anymore.
- Replaced `dos.el` with `bat-mode`
- `dos.el` is superseded by `bat-mode`
- `dos.el` is localised package
- `bat-mode` is a built-in mode
- Added `bmx-mode`
- `bmx-mode` provided syntax highlighting, code-navigation and refactoring
capabilities on top of `bat-mode`
- Introduced a new command cargo-process-outdated
- Certain commands are known to change Cargo.toml and needs to reload workspace,
wrapper functions that automatically reload workspace are added.
- spacemacs/cargo-process-add
- spacemacs/cargo-process-rm
- spacemacs/cargo-process-outdated
- Added a layer variable for rust layer, cargo-process-reload-on-modify,
which toggle the aforementioned behaviour.
- Added a new utility function in LSP layer, which returns server ID associated
with current project.
- spacemacs//lsp-client-server-id
- Rearranged keybindings for rust layers (see table below for details)
Commands wrapped with auto-reload functionality:
|Command |Binding |
|-------------------------|-------------|
|`cargo-process-repeat` |`SPC m c .` |
|`cargo-process-add` |`SPC m c a` |
|`cargo-process-rm` |`SPC m c r` |
|`cargo-process-upgrade` |`SPC m c U` |
Commands with new bindings:
|Command |Old Binding |New Binding |
|-----------------------------------|------------|------------|
|`cargo-process-search` |`SPC m c s` |`SPC m c /` |
|`cargo-process-fmt` |`SPC m c f` |`SPC m c =` |
|`cargo-process-current-file-tests` |`SPC m c o` |`SPC m t b` |
|`cargo-process-current-test` |`SPC m c t` |`SPC m t t` |
|`cargo-process-test` |`SPC m t` |`SPC m t a` |
* Point org-journal to dalanicolai's fork (temporarily)
The Spacemacs for using org-journal are written, assuming that some PR's by
dalanicolai get merged. As the merge takes more time than expected, we
temporarily point Spacemacs to use his fork.
Additionally, a subsequent commit that adds agenda usage recommendations also
assumes these org-journal PR's got merged.
* Add to docs agenda usage recommendations
The Emacs documentation is not very clear about the best way to use org-agenda,
especially regarding integration of the diary into org. This commit adds most
sensible configuration recommendations.
- fix/improve docs for org-wild-notifier
- document how to use agenda (recommendations)