1
0
Fork
You've already forked consult-dash
0
forked from ravi/consult-dash
Emacs consult interface to dash-docs-el
  • Emacs Lisp 100%
Find a file
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
consult-dash.el Adapt to new consult command builder format 2023年02月18日 12:21:38 +01: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 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))
 :config
 ;; 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.