`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` |
The [quick-start](https://www.spacemacs.org/doc/QUICK_START.html) starts with
explaining that users can build their own layers. Instead it should start by
showing how easy and straightforward it is to use one of the existing layer,
then continue about the possibility of creating personal layers (the
quick-start guide is a logical place to visit first for a newcomer). It is only
a small detail, but it can make a substantial difference for people who peek
into the quick-start guide and decide if it is worth the trouble to switch to
Spacemacs (Many newcomers think that even only trying another editor, is
probably not worth it because they are already using vim).
A guide that starts explaininging that you can build your own layers in
Spacemacs that exists of a directory containing at a packages.el file, is not a
quick-start guide.
### 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>
- Conform to standard ELISP file practice.
- Rearranged the top-level forms s.t. Variables and constants are declared at top.
- Added section markers and documentations.
- Use three or more `;` as a section header. They work well with built-in outline-mode. `M-j` and `M-k` is the binding to quickly navigate between them.
- Optionally use `^L` (form-feed) as a divider for the ELISP file. It's rendered as a horizontal divider. And it works with `backward-page` (`C-x [`) and `forward-page` (`C-x ]`)
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