This also defines the Spacemacs home buffer key bindings,
in the `emacs-startup-hook`.
Because the keys were being defined to early,
before the new value of: `dotspacemacs-show-startup-list-numbers`
was set in `.spacemacs`.
* Add :timeout for spacemacs|define-transient-state
This add a :timeout keyword for spacemacs|define-transient-state, it
make use of :timeout keyword defhydra according to
https://github.com/abo-abo/hydra/wiki/internals.
"The :timeout key starts a timer for the corresponding amount of seconds that disables the hydra. Calling any head will refresh the timer."
* Add idle for spacemacs|define-transient-state.
According to https://github.com/abo-abo/hydra/wiki/internals:
This key can delay the appearance of the hint.
Add :timeout and :idle in defhydra body to make it effect.
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` |
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`.