Problem:
When the restart-emacs package is being updated.
The update packages restart message, still shows the (SPC q r) key binding even
though it doesn't work.
Cause:
The member function compared a string against a list of symbols.
A possible improvement:
Explain that the key binding won't work this time.
Before:
Emacs has to be restarted to actually install the new version of the packages (SPC q r).
After:
Emacs has to be restarted to actually install the new version of the packages
(SPC q r) won't work this time, because the restart-emacs package is being updated.
* [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
Many new users (quite logically) assume that the additional-packages list
behaves like installing a layer, so they assume the file is also loaded
automatically. This commit adds info about the requirement to also load the
package with load/require/use-package in the user-config section of the dotfile.
Added "configuration-layer//system-package?" based on package-delete
(pretty much a direct partial copy-paste) so that
"configuration-layer//package-delete" can check if package is a
system package
No crash on spacemacs boot (with unused system-package present).
Though right now "configuration-layer//package-delete" only ignores system
packages instead of reporting them. Not entierly what @nbraud proposed,
but insufficient err-logging is a significantly smaller issue.
Fixes#11160
The new variable was not following the naming conventions.
The file was not initialised in core-dotspacemacs.el.
The file was not part of the .spacemacs.template.
Spacemacs allows to define layers declaratively like so:
dotspacemacs-configuration-layers
`(,(when (eq system-type 'darwin) 'osx))
The problem - in Linux that would add a nil element into the list, which then
makes it unable to run dotspacemacs/sync-configuration-layers <SPC f e R>, the
tests won't pass.
time-date.el requires cl-lib under Emacs 27 and above. Then the around advice
spacemacs//timed-require and spacemacs//load-timer of require will cause
recursive load under emacs 27 and above. The load sequences is: requiring cl-lib
uses autoload function time-since which loads time-date.el and then time-date.el
requires cl-lib.
The solution to break this recursive load sequence is to load time-date.el
before adding the around advice spacemacs//timed-require and
spacemacs//load-timer to require.
The original idea was to have a warning when
use-package-inject-hooks is set to nil however
having a warning in that macro caused too much
negative side effects and also does not cover
all cases.
Therefore it is to be removed.
In my first commit I did not add the warning message properly.
Basically the macro should emit code to create a warning if
the generated code is run and the predicate is not fulfilled.
However in my last commit it did run the code during macro
expansion which would do the testing there which is not
what I wanted.
spacemacs|use-package-add-hook is generating code which
is dependent on use-package-inject-hooks being non-nil.
If this happens now a big warning is written to the log
informing users of a potential issue or problem caused
by their user-config.
In a terminal, when a modes mode line name is diminished,
to two characters, and the first one is a unicode character,
then the second character overlaps the right side of the first character.