-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vertico not offering function completions for M-: eval-expression? #145
Comments
Completion-at-point/completion-in-region is an orthogonal concern to minibuffer completion. Therefore it is not provided here. There are many possible frontends for completion-at-point/completion-in-region, for example Corfu. From the perspective of vertico the canonical solution if you want to use the minibuffer is consult-completion-in-region. This is not a fix or a hack - consult-completion-in-region is the proper implementation for this feature. I should add - maybe you also tried Selectrum, which implements completion-in-region support via its selectrum-completion-in-region function. The two functions selectrum-completion-in-region and consult-completion-in-region are mostly equivalent, with the only difference that consult-completion-in-region is completion system agnostic (works with icomplete, vertico, etc). Therefore it fits the spirit of Consult and Vertico can get by without its own implementation. |
Thanks for explaining, @minad! I didn't realize that these were two different things because in both cases I am typing in the minibuffer (or so it seems) The code by @karthink from the above mentioned link works, apparently more-or-less in the same way selectrum installs itself for this case: (add-hook 'vertico-mode-hook (lambda ()
(setq completion-in-region-function
(if vertico-mode
#'consult-completion-in-region
#'completion--in-region)))) |
This is also documented in the README: https://github.com/minad/vertico#completion-at-point-and-completion-in-region |
@minad I now realize that, too. Problem was I didn't know this is used by |
That is correct. I read through the |
@dmitrym0 So with the changes from https://github.com/minad/vertico/pull/148/files and the more recent README version, what would you like to see there? @minad accepted my changes after this discussion, so if you have a suggestion that would've been helpful for "past you", I'd suggest to open a PR :) |
I spent some time thinking about it -- I couldn't come with anything better without overloading the already large README. This should be fine, thanks for the documentation :) |
When I switched from selectrum to vertico, I noticed that when I hit
M-:
to eval an expression, the tab completion of function names doesn't appear to use vertico at all. Instead a new window with a list of completion candidates pops up.Am I missing a setting? I looked for hints in the README and found that vertico doesn't seem to hook into this by default.
"Fixes" by other vertico users can be found e.g. here:
https://libredd.it/r/emacs/comments/opf1kk/switched_to_vertigo_consult_and_minibuffer/?sort=top
Is there a reason why this is not part of
vertico-mode
's setup of hooks?The text was updated successfully, but these errors were encountered: