emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/consult 93e06d6 1/2: consult-completion-in-region: Add


From: ELPA Syncer
Subject: [elpa] externals/consult 93e06d6 1/2: consult-completion-in-region: Add example configuration (See #350)
Date: Sat, 3 Jul 2021 10:57:07 -0400 (EDT)

branch: externals/consult
commit 93e06d687154e17cc1a38a4bc647126d2bc8c756
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    consult-completion-in-region: Add example configuration (See #350)
---
 README.org | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/README.org b/README.org
index d71a99b..e79a175 100644
--- a/README.org
+++ b/README.org
@@ -364,9 +364,18 @@ their descriptions.
    =completion-in-region-function=. Selectrum already comes with its own 
function
    similar to =consult-completion-in-region=. Note that
    =consult-completion-in-region= is not useful if the default =*Completions*=
-   UI is used. Furthermore you may prefer to see the completions directly in 
the
-   buffer as a small popup. In that case you can either use the 
[[https://github.com/minad/corfu][Corfu]] or the
-   [[https://github.com/company-mode/company-mode][Company]] package.
+   UI is used.
+   #+begin_src emacs-lisp
+     ;; Use `consult-completion-in-region' if Vertico is enabled.
+     (add-hook 'vertico-mode-hook (lambda ()
+                                    (setq completion-in-region-function
+                                          (if vertico-mode
+                                              #'consult-completion-in-region
+                                            #'completion--in-region))))
+   #+end_src
+   Instead of =consult-completion-in-region=, you may prefer to see the
+   completions directly in the buffer as a small popup. In that case, I 
recommed
+   either the [[https://github.com/minad/corfu][Corfu]] or the 
[[https://github.com/company-mode/company-mode][Company]] package.
  - =consult-theme=: Select a theme and disable all currently enabled
    themes. Supports live preview of the theme while scrolling through the
    candidates.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]