Replace alist helm sources with proper helm sources (#15364)

This commit is contained in:
Dan Kessler 2022-04-04 14:51:01 -04:00 committed by GitHub
parent 6774f37fc1
commit d79b12e7b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 32 deletions

View file

@ -817,6 +817,7 @@ Other:
default (thanks to Daniel Nicolai) default (thanks to Daniel Nicolai)
- Add evil-jump-backward/forward (=C-o=/=C-i=) keybindings to - Add evil-jump-backward/forward (=C-o=/=C-i=) keybindings to
evil-evilified-state-map (thanks to Daniel Nicolai) evil-evilified-state-map (thanks to Daniel Nicolai)
- Improve helm completion in spacemacs-help (thanks to @dankessler)
*** Distribution changes *** Distribution changes
- Refactored =spacemacs-bootstrap=, =spacemacs-ui=, and =spacemacs-ui-visual= - Refactored =spacemacs-bootstrap=, =spacemacs-ui=, and =spacemacs-ui-visual=
layers: layers:

View file

@ -170,24 +170,24 @@
(defun helm-spacemacs-help//layer-source () (defun helm-spacemacs-help//layer-source ()
"Construct the helm source for the layer section." "Construct the helm source for the layer section."
`((name . "Layers") (helm-build-sync-source "Layers"
(candidates . ,(sort (configuration-layer/get-layers-list) 'string<)) :candidates (sort (configuration-layer/get-layers-list) 'string<)
(candidate-number-limit) :candidate-number-limit 99999999
(keymap . ,helm-spacemacs-help--layer-map) :keymap helm-spacemacs-help--layer-map
(action . (("Open README.org" :action '(("Open README.org"
. helm-spacemacs-help//layer-action-open-readme) . helm-spacemacs-help//layer-action-open-readme)
("Open packages.el" ("Open packages.el"
. helm-spacemacs-help//layer-action-open-packages) . helm-spacemacs-help//layer-action-open-packages)
("Open config.el" ("Open config.el"
. helm-spacemacs-help//layer-action-open-config) . helm-spacemacs-help//layer-action-open-config)
("Open funcs.el" ("Open funcs.el"
. helm-spacemacs-help//layer-action-open-funcs) . helm-spacemacs-help//layer-action-open-funcs)
("Open layers.el" ("Open layers.el"
. helm-spacemacs-help//layer-action-open-layers) . helm-spacemacs-help//layer-action-open-layers)
("Install Layer" ("Install Layer"
. helm-spacemacs-help//layer-action-install-layer) . helm-spacemacs-help//layer-action-install-layer)
("Open README.org (for editing)" ("Open README.org (for editing)"
. helm-spacemacs-help//layer-action-open-readme-edit))))) . helm-spacemacs-help//layer-action-open-readme-edit))))
(defvar helm-spacemacs-help--layer-map (defvar helm-spacemacs-help--layer-map
(let ((map (make-sparse-keymap))) (let ((map (make-sparse-keymap)))
@ -202,16 +202,16 @@
"Keymap for Spacemacs Layers sources") "Keymap for Spacemacs Layers sources")
(defun helm-spacemacs-help//package-source () (defun helm-spacemacs-help//package-source ()
"Construct the helm source for the packages." (helm-build-sync-source "Packages"
`((name . "Packages") :candidates (helm-spacemacs-help//package-candidates)
(candidates . ,(helm-spacemacs-help//package-candidates)) :candidate-number-limit 99999999
(candidate-number-limit) :action '(("Go to configuration function"
(action . (("Go to configuration function" . helm-spacemacs-help//package-action-goto-config-func)
. helm-spacemacs-help//package-action-goto-config-func) ("Describe"
("Describe" . helm-spacemacs-help//package-action-describe)
. helm-spacemacs-help//package-action-describe) ("Recompile"
("Recompile" . helm-spacemacs-help//package-action-recompile))))
. helm-spacemacs-help//package-action-recompile)))))
(defun helm-spacemacs-help//package-candidates () (defun helm-spacemacs-help//package-candidates ()
"Return the sorted candidates for package source." "Return the sorted candidates for package source."
@ -279,10 +279,10 @@
result)) result))
(defun helm-spacemacs-help//dotspacemacs-source () (defun helm-spacemacs-help//dotspacemacs-source ()
`((name . "Dotfile") (helm-build-sync-source "Dotfile"
(candidates . ,(helm-spacemacs-help//dotspacemacs-candidates)) :candidates (helm-spacemacs-help//dotspacemacs-candidates)
(candidate-number-limit) :candidate-number-limit 99999999
(action . (("Go to variable" . helm-spacemacs-help//go-to-dotfile-variable))))) :action '(("Go to variable" . helm-spacemacs-help//go-to-dotfile-variable))))
(defun helm-spacemacs-help//dotspacemacs-candidates () (defun helm-spacemacs-help//dotspacemacs-candidates ()
"Return the sorted candidates for all the dospacemacs variables." "Return the sorted candidates for all the dospacemacs variables."