emacs-devel
[Top][All Lists]
Advanced

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

Re: Add user customization fido-completion-styles


From: Tassilo Horn
Subject: Re: Add user customization fido-completion-styles
Date: Tue, 02 Jun 2020 17:40:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

João Távora <joaotavora@gmail.com> writes:

Hi João,

>> Users of fido-mode (like me) may want to customize the completion
>> style it uses, so add a variable to allow them to do so.
>>
>> For instance, I really like using the “initials” style so “vlm”
>> quickly completes visual-line-mode, and then falling back to
>> flex. There are also neat packages like orderless
>> (https://github.com/oantolin/orderless) which add a new
>> completion-style, which folks may want to plug-in and use. Anyway, it
>> seems like it ought to be customizable.
>
> Actually, it is, just not with custom.  These two lines should do the trick:
>
>   (add-hook 'icomplete-minibuffer-setup-hook 'my-flex-styles)
>   (defun my-flex-styles () (setq-local completion-styles '(initials flex)))
>
> Or just use a lambda, which is even shorter.  I'd like to avoid a
> duplicate version of completion-styles customization vars.  

I guess fido-mode sets `completion-styles' locally in order to achieve
ido-like defaults, right?  But as a user with customized
`completion-styles' and `completion-category-overrides', I wish there
was a simple way to just use them with fido, too.  Especially, I can't
see how I could figure out the right category override.  Is the
completion metadata accessible in icomplete-minibuffer-setup-hook?

I would like to use fido (more than icomplete) because the keybindings
suite my intuition but I'd like to keep my completion styles and
overrides as I have them.

Bye,
Tassilo



reply via email to

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