Browse Dash docsets inside emacs
It doesn't require Dash app.
If you're looking for dash.el, the list library, please go to dash.el
It's available on MELPA.
m-x package-install helm-dash RET
Helm-dash uses the same docsets as Dash. You can install them with
m-x helm-dash-install-docsetfor the official docsets or
m-x helm-dash-install-user-docsetfor user contributed docsets (experimental).
To install a docset from a file in your drive you can use
m-x helm-dash-install-docset-from-file'. That function takes as input atgz
file that you obtained, starting from a folder named.docset`, with the command:
tar --exclude='.DS_Store' -cvzf .tgz .docset
as explained here.
m-x helm-dash RETwill run helm with your active docsets loaded. Typing substrings of what you search will find-as-you-type.
m-x helm-dash-at-point RETis like helm-dash, but it will prefill the search input with the symbol at point.
helm-dash-reset-connectionswill clear the connections to all sqlite db's. Use it in case of errors when adding new docsets. The next call to
helm-dashwill recreate them.
helm-dash-docsets-pathis the prefix for your docsets. Defaults to ~/.docsets
helm-dash-min-lengthtells helm-dash from which length to start searching. Defaults to 3.
helm-dash-browser-funcis a function to encapsulate the way to browse Dash' docsets. Defaults to browse-url. For example, if you want to use eww to browse your docsets, you can do:
(setq helm-dash-browser-func 'eww).
helm-dash-enable-debuggingis non-nil stderr from sqlite queries is captured and displayed in a buffer. The default value is
t. Setting this to
nilmay speed up queries on some machines (capturing stderr requires the creation and deletion of a temporary file for each query).
`helm-dash-common-docsets' is a list that should contain the docsets to be active always. In all buffers.
Different subsets of docsets can be activated depending on the buffer. For the moment (it may change in the future) we decided it's a plain local variable you should setup for every different filetype. This way you can also do fancier things like project-wise docsets sets.
(defun go-doc () (interactive) (setq-local dash-docs-docsets '("Go")))
(add-hook 'go-mode-hook 'go-doc)
To narrow the search to just one docset, type its name in the beginning of the search followed by a space. If the docset contains spaces, no problemo, we handle it :D.
sqlite queries. Provisionally, we're executing shell-commands directly. Our idea is come back to use esqlite when some issues will be fixed.
helm-dash has been tested only in linux. We've been notified that it doesn't work in Mac, so we ask for elisp hackers who own something that runs Mac OSX if they could take a look at it.
bug on mac osx's browse-url which can't open urls with #. If you find this issue, and want to debug, great, otherwise, you can use eww or w3 or w3m which will work just fine
make sure you don't have sqlite3 .mode column but .mode list (the default). check your .sqliterc
(setq browse-url-browser-function 'browse-url-generic browse-url-generic-program "/path/to/firefox") (setq helm-dash-browser-func 'browse-url-generic)
We ♥ feedback, issues or pull requests. Feel free to contribute in helm-dash.
We're trying to add tests to the project, if you send a PR please consider add new or update the existing ones.
Install Cask if you haven't already, then:
$ cd /path/to/helm-dash $ cask
Run all tests with: