Emacs consult interface to dash-docs-el
Go to file
ravi af9f263935 Merge pull request 'Adapt to new consult command builder format' (#4) from rahguzar/consult-dash:master into master
Reviewed-on: #4
2023-05-29 14:19:49 +00:00
.gitignore Initial version of consult-dash extracted from my .emacs.d. 2022-04-15 21:36:13 -05:00
LICENSE Add license 2022-04-20 19:05:41 -05:00
Readme.org Automatic embark integration (following, e.g., consult-vertico) 2022-06-05 13:31:21 -05:00
consult-dash.el Adapt to new consult command builder format 2023-02-18 12:21:38 +01:00


Consult interface to dash docs

consult-dash provides a consult interface to dash documentation. The easiest way to install is to add consult-dash.el to your emacs lisp path.

The only interface provided is the function consult-dash, which should be bound to a key sequence. If the default search term should be derived from the symbol at point, please use the normal consult method to customize consult-dash prompts:

  (consult-customize consult-dash :initial (thing-at-point 'symbol))

Support for embark is automatically enabled when embark is loaded.

The following is an example use-package declaration:

  (use-package consult-dash
    :bind (("M-s d" . consult-dash))
    ;; Use the symbol at point as initial search term
    (consult-customize consult-dash :initial (thing-at-point 'symbol)))

Buffer-local values of docsets to search can be set by customizing the buffer-local variable consult-dash-docsets in a mode hook. The following is an example intended to placed inside a python mode hook:

  (when (functionp 'consult-dash)
    (setq-local consult-dash-docsets '("Python 2" "Python 3" "NumPy")))

Please see dash documentation for more details on installing docsets.

Known limitations

The current implementation works only on Unix-like systems, since it uses a shell command sequence to concatenate search commands for each docset. Patches to support other systems, or a better method for searching in sequence, are welcome. Please see the functions consult-dash--builder-one-docset and consult-dash--builder in the source for details.