clj-refactor.el
clj-refactor.el copied to clipboard
Friendlier cljr--prompt-user-for
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
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?
Thanks for the reply!
What does this look like for you?
By default it looks like this to me:
After M-x ido-everywhere
I don't get an improvement either. I also use https://github.com/katspaugh/ido-at-point , no luck.
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.
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.
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 https://github.com/DarwinAwardWinner/ido-completing-read-plus/issues/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.
Then perhaps the only actionable item would be to expand the README?