[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/orderless b355ef6d38 3/3: Merge pull request #65 from n
From: |
ELPA Syncer |
Subject: |
[elpa] externals/orderless b355ef6d38 3/3: Merge pull request #65 from narendraj9/patch-1 |
Date: |
Sun, 23 Oct 2022 13:58:01 -0400 (EDT) |
branch: externals/orderless
commit b355ef6d386134f16eafe17051e9fafcfbea9cad
Merge: 6b86527b30 531372bd54
Author: Omar AntolĂn Camarena <omar.antolin@gmail.com>
Commit: GitHub <noreply@github.com>
Merge pull request #65 from narendraj9/patch-1
Add note about custom styles for `company-capf'
---
README.org | 14 ++++++++++++++
orderless.texi | 13 +++++++++++++
2 files changed, 27 insertions(+)
diff --git a/README.org b/README.org
index f90b0a7399..e9c166d561 100644
--- a/README.org
+++ b/README.org
@@ -396,6 +396,20 @@ But there are a couple of points of discomfort:
#+end_src
(Aren't dynamically scoped variables and the advice system nifty?)
+
+If you would like to use different =completion-styles= with =company-capf=
instead, you
+can add this to your config:
+
+#+begin_src emacs-lisp
+ ;; We follow a suggestion by company maintainer u/hvis:
+ ;; https://www.reddit.com/r/emacs/comments/nichkl/comment/gz1jr3s/
+ (defun company-completion-styles (capf-fn &rest args)
+ (let ((completion-styles '(basic partial-completion)))
+ (apply capf-fn args))
+
+ (advice-add 'company-capf :around #'company-completion-styles)
+#+end_src
+
* Related packages
diff --git a/orderless.texi b/orderless.texi
index a5acd38337..80cfb5f4f1 100644
--- a/orderless.texi
+++ b/orderless.texi
@@ -466,6 +466,19 @@ face with this configuration:
(Aren't dynamically scoped variables and the advice system nifty?)
@end enumerate
+If you would like to use different @samp{completion-styles} with
@samp{company-capf} instead, you
+can add this to your config:
+
+@lisp
+;; We follow a suggestion by company maintainer u/hvis:
+;; https://www.reddit.com/r/emacs/comments/nichkl/comment/gz1jr3s/
+(defun company-completion-styles (capf-fn &rest args)
+ (let ((completion-styles '(basic partial-completion)))
+ (apply capf-fn args))
+
+(advice-add 'company-capf :around #'company-completion-styles)
+@end lisp
+
@node Related packages
@chapter Related packages