tweak(vertico): use setq-default to set completion-in-region-function
Corfu makes completion-in-region-function a local variable in buffers where it is enabled, so when this form is evaluated in one of those said buffers (such as opening a file with Emacs before accessing the minibuffer), completion-in-region-function will just be set locally there.
This commit is contained in:
parent
41921f5f07
commit
7c676c83bc
1 changed files with 7 additions and 7 deletions
|
@ -27,13 +27,13 @@ overrides `completion-styles' during company completion sessions.")
|
||||||
:config
|
:config
|
||||||
(setq vertico-resize nil
|
(setq vertico-resize nil
|
||||||
vertico-count 17
|
vertico-count 17
|
||||||
vertico-cycle t
|
vertico-cycle t)
|
||||||
completion-in-region-function
|
(setq-default completion-in-region-function
|
||||||
(lambda (&rest args)
|
(lambda (&rest args)
|
||||||
(apply (if vertico-mode
|
(apply (if vertico-mode
|
||||||
#'consult-completion-in-region
|
#'consult-completion-in-region
|
||||||
#'completion--in-region)
|
#'completion--in-region)
|
||||||
args)))
|
args)))
|
||||||
;; Cleans up path when moving directories with shadowed paths syntax, e.g.
|
;; Cleans up path when moving directories with shadowed paths syntax, e.g.
|
||||||
;; cleans ~/foo/bar/// to /, and ~/foo/bar/~/ to ~/.
|
;; cleans ~/foo/bar/// to /, and ~/foo/bar/~/ to ~/.
|
||||||
(add-hook 'rfn-eshadow-update-overlay-hook #'vertico-directory-tidy)
|
(add-hook 'rfn-eshadow-update-overlay-hook #'vertico-directory-tidy)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue