spacemacs/layers/+tools
thanhvg e3b6464649
[core][tide][lsp] improve spacemacs/set-leader-keys-for-minor-mode and apply it to tide and lsp layers (#14141)
* [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
2020-11-21 07:34:55 +01:00
..
ansible update copyright to 2020 2020-09-23 21:25:01 +02:00
bm update copyright to 2020 2020-09-23 21:25:01 +02:00
cfengine update copyright to 2020 2020-09-23 21:25:01 +02:00
chrome update copyright to 2020 2020-09-23 21:25:01 +02:00
cmake documentation formatting: Fri Aug 28 21:26:14 UTC 2020 2020-08-28 23:41:29 +02:00
command-log update copyright to 2020 2020-09-23 21:25:01 +02:00
conda update copyright to 2020 2020-09-23 21:25:01 +02:00
dap update copyright to 2020 2020-09-23 21:25:01 +02:00
debug update copyright to 2020 2020-09-23 21:25:01 +02:00
docker update copyright to 2020 2020-09-23 21:25:01 +02:00
dotnet update .org tags 2019-07-03 11:32:58 +03:00
elasticsearch documentation formatting: Mon Jan 27 22:19:54 UTC 2020 2020-01-27 23:35:09 +01:00
fasd [fasd] Fix bug in fasd-find-directory-only 2020-09-14 18:34:38 +02:00
finance update copyright to 2020 2020-09-23 21:25:01 +02:00
geolocation update copyright to 2020 2020-09-23 21:25:01 +02:00
imenu-list update copyright to 2020 2020-09-23 21:25:01 +02:00
import-js update copyright to 2020 2020-09-23 21:25:01 +02:00
ipython-notebook [ipython] Fix bindinding for RET in transient state 2020-09-08 20:56:52 +02:00
kubernetes update copyright to 2020 2020-09-23 21:25:01 +02:00
languagetool [layers/+tools/languagetool] Allow HTTP server instead of binary 2020-10-15 23:12:41 +02:00
lsp [core][tide][lsp] improve spacemacs/set-leader-keys-for-minor-mode and apply it to tide and lsp layers (#14141) 2020-11-21 07:34:55 +01:00
meson documentation formatting: Sat Jun 20 21:17:28 UTC 2020 2020-06-20 23:38:28 +02:00
nginx update copyright to 2020 2020-09-23 21:25:01 +02:00
node update copyright to 2020 2020-09-23 21:25:01 +02:00
pandoc update copyright to 2020 2020-09-23 21:25:01 +02:00
pass [pass] Fix travis-ci error on internal link 2020-10-02 22:15:35 +02:00
prettier update copyright to 2020 2020-09-23 21:25:01 +02:00
prodigy update copyright to 2020 2020-09-23 21:25:01 +02:00
puppet update copyright to 2020 2020-09-23 21:25:01 +02:00
quickurl update copyright to 2020 2020-09-23 21:25:01 +02:00
ranger [ranger] Add nil to ranger-enter-with-minus possible values 2020-10-31 14:43:09 +01:00
rebox update copyright to 2020 2020-09-23 21:25:01 +02:00
restclient update copyright to 2020 2020-09-23 21:25:01 +02:00
sailfish-developer update copyright to 2020 2020-09-23 21:25:01 +02:00
salt update copyright to 2020 2020-09-23 21:25:01 +02:00
shell Remove eshell obsolete variable 2020-11-12 22:33:06 +01:00
sphinx update copyright to 2020 2020-09-23 21:25:01 +02:00
systemd update copyright to 2020 2020-09-23 21:25:01 +02:00
tern [tern] Remove unmaintained package company-tern 2020-07-03 01:18:40 +02:00
terraform [terraform] Revise terraform lsp support 2020-06-22 21:27:12 +02:00
tide [core][tide][lsp] improve spacemacs/set-leader-keys-for-minor-mode and apply it to tide and lsp layers (#14141) 2020-11-21 07:34:55 +01:00
tmux update copyright to 2020 2020-09-23 21:25:01 +02:00
transmission update copyright to 2020 2020-09-23 21:25:01 +02:00
vagrant Fix links 2020-10-03 21:52:09 +03:00
web-beautify update copyright to 2020 2020-09-23 21:25:01 +02:00
xclipboard update copyright to 2020 2020-09-23 21:25:01 +02:00