From 53a5f116254500fe1883a4179b0154f219ef59b2 Mon Sep 17 00:00:00 2001 From: Daniel Mendler Date: Thu, 14 Nov 2024 16:37:03 +0100 Subject: README: Document buffer-local completion styles settings --- README.org | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 -- cgit v1.0