2015-04-19 03:40:24 +00:00
|
|
|
;; see conditional package inclusion
|
2016-05-30 02:39:21 +00:00
|
|
|
(setq dash-packages
|
|
|
|
'(
|
|
|
|
(helm-dash :toggle (configuration-layer/package-usedp 'helm))
|
2016-06-20 07:13:20 +00:00
|
|
|
(counsel-dash :toggle (configuration-layer/package-usedp 'ivy))
|
2016-05-30 02:39:21 +00:00
|
|
|
))
|
2015-01-14 06:54:44 +00:00
|
|
|
|
2015-03-14 03:16:40 +00:00
|
|
|
(cond
|
2015-11-30 15:00:45 +00:00
|
|
|
((spacemacs/system-is-mac)
|
|
|
|
(push 'dash-at-point dash-packages))
|
|
|
|
((or (spacemacs/system-is-linux)
|
|
|
|
(spacemacs/system-is-mswindows))
|
|
|
|
(push 'zeal-at-point dash-packages)))
|
2015-06-12 20:59:07 +00:00
|
|
|
|
2016-05-30 02:39:21 +00:00
|
|
|
(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
|
2016-06-20 07:13:20 +00:00
|
|
|
(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)
|
|
|
|
(defun counsel-dash-at-point ()
|
|
|
|
"Counsel dash with selected point"
|
|
|
|
(interactive)
|
|
|
|
(counsel-dash
|
|
|
|
(if (use-region-p)
|
|
|
|
(buffer-substring-no-properties (region-beginning) (region-end))
|
|
|
|
(substring-no-properties (or (thing-at-point 'symbol) "")))))
|
|
|
|
:config
|
2016-06-05 07:14:04 +00:00
|
|
|
(dash//activate-package-docsets helm-dash-docset-newpath)))
|
2015-03-10 08:05:43 +00:00
|
|
|
|
2015-01-14 06:54:44 +00:00
|
|
|
(defun dash/init-dash-at-point ()
|
|
|
|
(use-package dash-at-point
|
2015-03-14 03:16:40 +00:00
|
|
|
:defer t
|
2015-01-14 06:54:44 +00:00
|
|
|
:init
|
2015-03-14 03:16:40 +00:00
|
|
|
(progn
|
2015-11-18 00:38:05 +00:00
|
|
|
(spacemacs/set-leader-keys "dd" 'dash-at-point)
|
|
|
|
(spacemacs/set-leader-keys "dD" 'dash-at-point-with-docset))))
|
2015-03-10 08:05:43 +00:00
|
|
|
|
2015-06-12 20:59:07 +00:00
|
|
|
(defun dash/init-zeal-at-point ()
|
|
|
|
(use-package zeal-at-point
|
2015-03-14 03:16:40 +00:00
|
|
|
:defer t
|
2015-03-10 08:05:43 +00:00
|
|
|
:init
|
2015-11-18 00:38:05 +00:00
|
|
|
(spacemacs/set-leader-keys
|
2015-06-12 20:59:07 +00:00
|
|
|
"dd" 'zeal-at-point
|
|
|
|
"dD" 'zeal-at-point-set-docset)
|
2015-03-10 08:05:43 +00:00
|
|
|
:config
|
2015-06-12 20:59:07 +00:00
|
|
|
;; This lets users seach in multiple docsets
|
|
|
|
(push '(web-mode . "html,css,javascript") zeal-at-point-mode-alist)
|
|
|
|
))
|