[compleseus] improve M-n

This commit is contained in:
Thanh 2022-07-04 22:50:40 -06:00 committed by Maxi Wolff
parent 58f021b3f3
commit 4357030100
2 changed files with 11 additions and 0 deletions

View file

@ -191,6 +191,14 @@ targets."
(remq #'spacemacs/embark-which-key-indicator embark-indicators))) (remq #'spacemacs/embark-which-key-indicator embark-indicators)))
(apply fn args))) (apply fn args)))
(defun spacemacs/minibuffer-default-add-function ()
"See `minibuffer-default-add-function'"
(with-selected-window (minibuffer-selected-window)
(delete-dups
(delq nil
(list (thing-at-point 'symbol)
(thing-at-point 'list)
(thing-at-point-url-at-point))))))
(defun spacemacs/consult-jump-in-buffer () (defun spacemacs/consult-jump-in-buffer ()
"Jump in buffer with `consult-imenu' or `consult-org-heading' if in org-mode" "Jump in buffer with `consult-imenu' or `consult-org-heading' if in org-mode"

View file

@ -236,6 +236,9 @@
;; You may want to use `embark-prefix-help-command' or which-key instead. ;; You may want to use `embark-prefix-help-command' or which-key instead.
;; (define-key consult-narrow-map (vconcat consult-narrow-key "?") #'consult-narrow-help) ;; (define-key consult-narrow-map (vconcat consult-narrow-key "?") #'consult-narrow-help)
;; Make M-n as smart as ivy and helm equivalents
(setq minibuffer-default-add-function 'spacemacs/minibuffer-default-add-function)
;; Optionally configure a function which returns the project root directory. ;; Optionally configure a function which returns the project root directory.
(setq consult-project-root-function (setq consult-project-root-function
(lambda () (lambda ()