Intro
Helm is gaining lots of traction lately in the emacs environment (there are over 50 helm-* packages is the melpa now). It's a find-as-yo-type helper which provides an easy way to act on the selections.
Dash is a mac osX app which lets you browse what they call docsets. Docsets contain an sqlite db and some html with the documentation of a given topic.
helm-dash
The basic usage is pretty simple:
- helm-dash-install-package will give you the available docsets in the official repo (we'll choose Redis for testing).
- Add the docset to either the global variable helm-dash-common-docsets.
(setq helm-dash-common-docsets '("Redis")) - execute the interactive command helm-dash
- Type some letters that match a redis command you want to look for (push, for example)
- Press RET when you are on the command you want. Your favourite browser should open pointing to the documentation.
buffer-local docsets
For further configuration, we allow per-buffer sets of docsets. Let's say you want the GoLang docset available, but just in go-mode buffers. Install Go docset, and evaluate the following elisp:
(defun go-doc ()
(interactive)
(setq-local helm-dash-docsets '("Go")))
(add-hook 'go-mode-hook 'go-doc)
Then, when you open a go buffer, helm-dash will search both Redis and Go.
Here's a demo of the basic usage. (Mind that the video is not setting the variables accordingly because they were already set)
Try it, patch it, or talk about it, we'd love to hear your comments and improve it.
The package has been developed and tested under linux.It should work on Mac OSX but it hasn't been tested there.If you find any issue on Mac, please, Pull Request :)