Bind 'SPC h d S' to text search; expand ivy/helm file-search API
This commit is contained in:
parent
e8aa293bc0
commit
b144a3862a
4 changed files with 38 additions and 14 deletions
|
@ -196,7 +196,7 @@ selection of all minor-modes, active or not."
|
|||
(find-file (expand-file-name "index.org" doom-docs-dir)))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom/help-search (&optional initial-input)
|
||||
(defun doom/help-search-headings (&optional initial-input)
|
||||
"Search Doom's documentation and jump to a headline."
|
||||
(interactive)
|
||||
(doom-completing-read-org-headings
|
||||
|
@ -212,6 +212,25 @@ selection of all minor-modes, active or not."
|
|||
x)
|
||||
(doom--help-modules-list))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom/help-search (&optional initial-input)
|
||||
"Preform a text search on all of Doom's documentation."
|
||||
(interactive)
|
||||
(funcall (cond ((featurep! :completion ivy)
|
||||
#'+ivy-file-search)
|
||||
((featurep! :completion helm)
|
||||
#'+helm-file-search)
|
||||
((rgrep
|
||||
(read-regexp
|
||||
"Search for" (or initial-input 'grep-tag-default)
|
||||
'grep-regexp-history)
|
||||
"*.org" doom-emacs-dir)
|
||||
#'ignore))
|
||||
:query initial-input
|
||||
:args '("-g" "*.org")
|
||||
:in doom-emacs-dir
|
||||
:prompt "Search documentation for: "))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom/help-news-search (&optional initial-input)
|
||||
"Search headlines in Doom's newsletters."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue