Dash layer
Table of ContentsClose
1. Description¶
This layer integrates offline API browsers into Emacs. It provides one for macOS, Linux and Windows.
2. Install¶
To use this configuration layer, add it to your ~/.spacemacs
. You will need to
add dash
to the existing dotspacemacs-configuration-layers
list in this
file.
3. Configuration¶
By default, the dash layer will initialize all installed docsets to be active in all buffers. To disable this and opt-in to specific docsets for specific buffers, set:
(dash :variables dash-autoload-common-docsets nil)
To change the location of the installed docsets, set:
(dash :variables helm-dash-docset-newpath "~/.docsets")
4. Word at point¶
dash-at-point
and zeal-at-point
will search for the word at point in the respective offline API browser.
The result will be displayed in the offline browser's UI.
However having to leave emacs to have a look at the search results may be a bit awkward.
To help with this it is also possible to integrate the search results directly in helm
, ivy
or consult
and show the details in a browser. To do so helm-dash can be used for helm
, counsel-dash for ivy
and consult-dash
for consult
.
To get them working it is necessary to set dash-docs-docset-newpath
to the location of your docsets.
(dash :variables dash-docs-docset-newpath "~/.local/share/Zeal/Zeal/docsets")
For more details please check dash-at-point-usage or zeal-at-point.
5. Key bindings¶
Key binding | Description |
---|---|
SPC a r z d |
Lookup thing at point in Dash or Zeal |
SPC a r z D |
Lookup thing at point in Dash or Zeal within a specified Docset |
SPC a r z h |
Lookup thing at point in helm/counsel/consult-dash |
SPC a r z H |
Lookup in helm/counsel/consult-dash within a specified Docset |