ALEImport always applies first suggestion ignoring everything else.
When running ALEImport the LSP can return multiple options to import but ALE simply takes and applies the first one. Would be better if ALE instead shows an auto-complete menu and allows the user to select which item to import.
Tested this with eclipselsp on a project that uses Joda Time that has its own implementations of LocalDate and LocalDateTime classes. When calling ALEImport on either of those classes the system.time.LocalDate gets imported without giving the option to the user to select org.joda.time.LocalDate instead.
Checking the code this seems to be fixable by modifying these parts:
- https://github.com/dense-analysis/ale/blob/master/autoload/ale/completion.vim#L377 logic here seems to only open the completion popup if the source is ale-manual or ale-automatic. The ale-import source used when calling ALEImport is not considered.
- https://github.com/dense-analysis/ale/blob/master/autoload/ale/completion.vim#L9 Seems the popup menu only displays in insert mode. ALEImport is invoked in normal mode so the menu won't appear.
On my limited testing I was unable to get the popup shown by modifying these parts of the code. I did verify that eclipselsp is indeed returning multiple completion items with additional text edits for the possible imports but ALE refuses to show the popup.
I've marked it as an enhancement. It would be good to show a menu if there's more than one to pick from.