summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2024-11-14 16:37:03 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2024-11-14 16:37:03 +0100
commit53a5f116254500fe1883a4179b0154f219ef59b2 (patch)
tree5f51a8f9899181cf58bc569ba54b85f9491bea4e
parent3f468e9f355bb4e9a3e48d6323a51cc64eee3cc2 (diff)
README: Document buffer-local completion styles settings
-rw-r--r--README.org16
1 files changed, 16 insertions, 0 deletions
diff --git a/README.org b/README.org
index 14cd9ff..038fb81 100644
--- a/README.org
+++ b/README.org
@@ -255,6 +255,22 @@ source code for further details.
completion-styles '(orderless-fast basic))
#+end_src
+** Buffer-local/Corfu-only completion settings
+
+Sometimes it makes sense to use separate completion style settings for
+minibuffer completion and in-buffer Corfu completion. For example inside the
+minibuffer you may prefer Orderless completion, while for Corfu prefix
+completion is sufficient. Such a configuration is possible by setting the
+~completion-styles~ variables buffer-locally, as follows:
+
+#+begin_src emacs-lisp
+(add-hook 'corfu-mode-hook
+ (lambda ()
+ (setq-local completion-styles '(basic)
+ completion-category-overrides nil
+ completion-category-defaults nil)))
+#+end_src
+
** Completing in the minibuffer
Corfu can be used for completion in the minibuffer, since it relies on child