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

Friendlier cljr--prompt-user-for #430

Closed
vemv opened this issue Sep 19, 2018 · 6 comments · Fixed by #544
Closed

Friendlier cljr--prompt-user-for #430

vemv opened this issue Sep 19, 2018 · 6 comments · Fixed by #544

Comments

@vemv
Copy link
Member

vemv commented Sep 19, 2018

When e.g. cljr-slash asks me to disambiguate a libspec, the *Completions* buffer is kinda hidden (you're not aware of it until you hit TAB), so a newbie user may be inclined to type the whole thing by hand.

So, in cljr--prompt-user-for, I'd:

  • Make completing-read a customizable fn, and/or
  • Infer if IDO is loaded, in which case use ido-completing-read.

Sounds good?

Can contribute a PR if you indicate what approach to take.

Cheers - Victor

@expez
Copy link
Member

expez commented Sep 20, 2018

In general this sounds like a good idea.

I'm using a ton of other libraries to make my completion experience better, so this feature is working beautifully for me. When I hit /, and it needs disambiguation, I immediately get a completion popup provided by ido-vertical-mode. It looks very much like the example gif.

What does this look like for you?

@vemv
Copy link
Member Author

vemv commented Sep 20, 2018

Thanks for the reply!

What does this look like for you?

By default it looks like this to me:

image

After M-x ido-everywhere I don't get an improvement either. I also use https://github.com/katspaugh/ido-at-point , no luck.

@bbatsov
Copy link
Member

bbatsov commented Sep 20, 2018

I think it's an anti-pattern to use directly any functions from a completion package. Most of them tweak completing-read directly and by not using it, you're damaging the compatibility with the different completion packages. E.g. - I use ivy and it doesn't require any special functions to be used.

@vemv
Copy link
Member Author

vemv commented Sep 20, 2018

Interesting. What would be a proper IDO setup under that guideline?

Maybe the only thing I haven't tried in depth is https://github.com/DarwinAwardWinner/ido-completing-read-plus.

But it'd seem weird to me that an external package was needed to properly setup IDO. Also 1200 LOC / 567 commits seems scary for something which should be simple.

@bbatsov
Copy link
Member

bbatsov commented Sep 21, 2018

Yep, that's exactly what you need to be using. Unfortunately the core of ido is old and for some reason it doesn't implement the ability to hook into completing-read (it can only do this for buffer and filenames). See DarwinAwardWinner/ido-completing-read-plus#63 for details. I used this package for many years before I decided to replace ido with ivy, so I can vouch that it's solid.

@vemv
Copy link
Member Author

vemv commented Oct 2, 2018

Then perhaps the only actionable item would be to expand the README?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants