mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-07 13:23:15 +00:00
Show keybindings to set khoj search type in echo area to assist user
This commit is contained in:
@@ -80,6 +80,16 @@
|
|||||||
(define-key kmap (kbd "C-x i") '(lambda () (interactive) (setq khoj--search-type "image")))
|
(define-key kmap (kbd "C-x i") '(lambda () (interactive) (setq khoj--search-type "image")))
|
||||||
kmap))
|
kmap))
|
||||||
|
|
||||||
|
(defvar khoj--keybindings-help-message
|
||||||
|
"
|
||||||
|
Set Search Type
|
||||||
|
-------------------------
|
||||||
|
C-x m | markdown
|
||||||
|
C-x o | org-mode
|
||||||
|
C-x l | ledger/beancount
|
||||||
|
C-x i | images
|
||||||
|
")
|
||||||
|
|
||||||
(defun khoj--extract-entries-as-markdown (json-response query)
|
(defun khoj--extract-entries-as-markdown (json-response query)
|
||||||
"Convert json response from API to markdown entries"
|
"Convert json response from API to markdown entries"
|
||||||
;; remove leading (, ) or SPC from extracted entries string
|
;; remove leading (, ) or SPC from extracted entries string
|
||||||
@@ -252,6 +262,7 @@
|
|||||||
(lambda ()
|
(lambda ()
|
||||||
;; Add khoj keybindings for configuring search to minibuffer keybindings
|
;; Add khoj keybindings for configuring search to minibuffer keybindings
|
||||||
(khoj--make-search-keymap minibuffer-local-map)
|
(khoj--make-search-keymap minibuffer-local-map)
|
||||||
|
(message "%s" khoj--keybindings-help-message)
|
||||||
;; set current (mini-)buffer entered as khoj minibuffer
|
;; set current (mini-)buffer entered as khoj minibuffer
|
||||||
;; used to query khoj API only when user in khoj minibuffer
|
;; used to query khoj API only when user in khoj minibuffer
|
||||||
(setq khoj--minibuffer-window (current-buffer))
|
(setq khoj--minibuffer-window (current-buffer))
|
||||||
|
|||||||
Reference in New Issue
Block a user