2015-04-19 03:40:24 +00:00
|
|
|
;; see conditional package inclusion
|
|
|
|
(setq dash-packages '())
|
2015-01-14 06:54:44 +00:00
|
|
|
|
2015-03-14 03:16:40 +00:00
|
|
|
(cond
|
|
|
|
((system-is-mac) (push 'dash-at-point dash-packages))
|
|
|
|
((system-is-linux) (push 'helm-dash dash-packages)))
|
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
|
|
|
|
(evil-leader/set-key "dd" 'dash-at-point)
|
|
|
|
(evil-leader/set-key "dD" 'dash-at-point-with-docset))))
|
2015-03-10 08:05:43 +00:00
|
|
|
|
|
|
|
(defun dash/init-helm-dash ()
|
|
|
|
(use-package helm-dash
|
2015-03-14 03:16:40 +00:00
|
|
|
:defer t
|
2015-03-10 08:05:43 +00:00
|
|
|
:init
|
2015-03-14 03:16:40 +00:00
|
|
|
(progn
|
2015-03-10 08:05:43 +00:00
|
|
|
(evil-leader/set-key "dd" 'helm-dash-at-point)
|
2015-03-14 03:16:40 +00:00
|
|
|
(evil-leader/set-key "dD" 'helm-dash))
|
2015-03-10 08:05:43 +00:00
|
|
|
:config
|
|
|
|
(progn
|
2015-03-14 03:16:40 +00:00
|
|
|
(defun dash//activate-package-docsets (path)
|
|
|
|
"Add dash docsets from specified PATH."
|
|
|
|
(setq helm-dash-docsets-path path
|
|
|
|
helm-dash-common-docsets (helm-dash-installed-docsets))
|
|
|
|
(message (format "activated %d docsets from: %s"
|
|
|
|
(length helm-dash-common-docsets) path)))
|
|
|
|
(dash//activate-package-docsets dash-helm-dash-docset-path))))
|