ebe4c60264
This reverts commit 29c78ce841
and all other fixes
that have been made afterwards.
The motivation is that use-package is seen by many as a replacement for
`require`. Is use-package always defer the loading of packages then is breaks
this use case, this does not respect POLA so even if it was making Spacemacs
loading faster (up to 3s faster on some startup on my machine) we just cannot
use it, it would be irresponsible. Spacemacs should be easy to use, loading
performance will come with time but it is not a priority.
41 lines
1.3 KiB
EmacsLisp
41 lines
1.3 KiB
EmacsLisp
;; see conditional package inclusion
|
|
(setq dash-packages
|
|
'(
|
|
(dash-at-point :toggle (spacemacs/system-is-mac))
|
|
(helm-dash :requires helm)
|
|
(counsel-dash :requires ivy)
|
|
(zeal-at-point :toggle (or (spacemacs/system-is-linux)
|
|
(spacemacs/system-is-mswindows)))))
|
|
|
|
(defun dash/init-helm-dash ()
|
|
(use-package helm-dash
|
|
:defer t
|
|
:init (spacemacs/set-leader-keys
|
|
"dh" 'helm-dash-at-point
|
|
"dH" 'helm-dash)
|
|
:config (dash//activate-package-docsets helm-dash-docset-newpath)))
|
|
|
|
(defun dash/init-counsel-dash ()
|
|
(use-package counsel-dash
|
|
:defer t
|
|
:init (spacemacs/set-leader-keys
|
|
"dh" 'counsel-dash-at-point
|
|
"dH" 'counsel-dash)
|
|
:config (dash//activate-package-docsets helm-dash-docset-newpath)))
|
|
|
|
(defun dash/init-dash-at-point ()
|
|
(use-package dash-at-point
|
|
:defer t
|
|
:init (spacemacs/set-leader-keys
|
|
"dd" 'dash-at-point
|
|
"dD" 'dash-at-point-with-docset)))
|
|
|
|
(defun dash/init-zeal-at-point ()
|
|
(use-package zeal-at-point
|
|
:defer t
|
|
:init (spacemacs/set-leader-keys
|
|
"dd" 'zeal-at-point
|
|
"dD" 'zeal-at-point-set-docset)
|
|
:config
|
|
;; This lets users seach in multiple docsets
|
|
(push '(web-mode . "html,css,javascript") zeal-at-point-mode-alist)))
|