Back to dash-at-point! (and zeal-at-point)
This commit is contained in:
parent
7963c48600
commit
9e7749cf1d
28 changed files with 58 additions and 120 deletions
17
core/defuns/defuns-docs.el
Normal file
17
core/defuns/defuns-docs.el
Normal file
|
@ -0,0 +1,17 @@
|
|||
;;; defuns-docs.el
|
||||
|
||||
;;;###autoload (autoload 'doom:docs-lookup "defuns-docs" nil t)
|
||||
(evil-define-command doom:docs-lookup (&optional bang input)
|
||||
"Look up INPUT (otherwise the current selection) in Dash or Zeal."
|
||||
(interactive "<!><a>")
|
||||
(let ((docset (unless bang (dash-at-point-guess-docset)))
|
||||
(query input))
|
||||
(when (evil-visual-state-p)
|
||||
(setq query (concat (buffer-substring-no-properties (region-beginning) (region-end))
|
||||
" " query)))
|
||||
(when (or (not query) (zerop (length query)))
|
||||
(setq query (thing-at-point 'symbol)))
|
||||
(doom-docs-lookup query docset)))
|
||||
|
||||
(provide 'defuns-docs)
|
||||
;;; defuns-docs.el ends here
|
Loading…
Add table
Add a link
Reference in a new issue