Skip to content
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

No support for completing functions and variables from eval #24

Closed
ashton314 opened this issue Apr 29, 2021 · 3 comments
Closed

No support for completing functions and variables from eval #24

ashton314 opened this issue Apr 29, 2021 · 3 comments
Labels
question Further information is requested

Comments

@ashton314
Copy link

Selectrum will complete function and variable names after pressing TAB from the eval-expression (M-:) prompt. Are there any plans on supporting this function? Am I maybe just missing some config?

@minad
Copy link
Owner

minad commented Apr 29, 2021

You mean completion-at-point. This has already been asked in #18. You can use the default completion buffer, consult-completion-in-region or Corfu.

Personally I am using Corfu in regular buffers and the default completion in the minibuffer, but I am rarely completing in the M-: prompt. More often, I type expressions in the *scratch* buffer. Maybe I will switch to Corfu for the minibuffer too, which works since I changed Corfu to use child frames.

I am not a big fan of consult-completion-in-region and selectrum-completion-in-region, which both transfer the completion at point to the minibuffer. But this is specifically the functionality you are asking for - the completion at point in the minibuffer starts another recursive minibuffer session.

@minad minad added the question Further information is requested label Apr 29, 2021
@minad minad closed this as completed Apr 29, 2021
@ashton314
Copy link
Author

Understandable. Thanks for the detailed answer!

I like using M-: for toggling variables on a one-time-basis when I'm trying stuff out, so I end up using this a fair amount. I'll stick with vertico for the time being and I'll see whether or not I get used to it; I like how simple and streamlined it is. You've put together some really nice stuff here! Thanks!

@minad
Copy link
Owner

minad commented Apr 29, 2021

Yes, if you want to have the exact behavior of Selectrum you can use consult-completion-in-region (this replicates the Selectrum functionality as also mentioned in the readme). So at least this feature is not missing from Vertico. Note that there is set-variable, which I am using for your particular use case. set-variable is better since you directly get completion and see the current value in Marginalia 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants