This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/contrib/dash/packages.el
syl20bnr e7d2532cc8 Refactor dash layer
Rename variable dash/helm-dash-docset-newpath to
dash-helm-dash-docset-path
2015-03-13 23:16:40 -04:00

32 lines
1.1 KiB
EmacsLisp

(defvar dash-packages '() ;; see conditional package inclusion below
"List of all packages to install and/or initialize. Built-in packages
which require an initialization must be listed explicitly in the list.")
(cond
((system-is-mac) (push 'dash-at-point dash-packages))
((system-is-linux) (push 'helm-dash dash-packages)))
(defun dash/init-dash-at-point ()
(use-package dash-at-point
:defer t
:init
(progn
(evil-leader/set-key "dd" 'dash-at-point)
(evil-leader/set-key "dD" 'dash-at-point-with-docset))))
(defun dash/init-helm-dash ()
(use-package helm-dash
:defer t
:init
(progn
(evil-leader/set-key "dd" 'helm-dash-at-point)
(evil-leader/set-key "dD" 'helm-dash))
:config
(progn
(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))))