Skip to content

Completions from non-imported modules #1327

Closed
@michaelpj

Description

@michaelpj

A feature I remember from Java IDEs that was very nice was that completion would offer options from modules that were not (yet) imported, but were available. Selecting that completion would also insert the appropriate import. When combined with auto-organizing imports this lets you almost ignore imports and just work from the completion prompt.

I think we could do this, although there's a risk that we might end up returning a really large number of completions! Completions from other modules in the package, would be nice, but doing it for dependencies too would be great. I would love to be able to just complete Map and have it imported!

(The LSP protocol supports this: CompletionItems have a list of additionalTextEdits which even calls out "adding an additional import at the top of the file" as a example usecase.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions