From b3a16897411fc7a01ece357b509154b4fd7b302f Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sun, 10 Mar 2024 08:43:16 +0100 Subject: [PATCH] Simplify completion styles by with overrides for certain categories The default completion style is now to use orderless by default, but certain categories can benefit from additional completions (e.g., file and partial-completion). It's quite hard to determine the appropriate completion categories, though. Does Org have a dedicated one? --- init.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/init.el b/init.el index 2009d13..e6606b4 100644 --- a/init.el +++ b/init.el @@ -2091,8 +2091,13 @@ Note that this workaround is incomplete, as explained in this comment." extended-command-suggest-shorter t completions-detailed t completion-cycle-threshold 10 - completion-styles '(orderless basic substring initials partial-completion) - completion-category-defaults nil) + completion-styles '(orderless basic) + completion-category-defaults nil + ;; Via https://protesilaos.com/emacs/dotemacs, with additional changes + completion-category-overrides '((file (styles . (basic partial-completion orderless))) + (bookmark (styles . (basic substring orderless))) + (imenu (styles . (basic substring orderless))) + (kill-ring (styles . (emacs22 orderless))))) (use-package helm :ensure t