Skip to content

[Request] Auto-Import Priority #4217

@rhystedstone

Description

@rhystedstone

I've been using VSCode for Java development for the past 5 years, and I keep having the friction when working with an API - there's no (obvious) way to prioritise one package over another.

I'd like an option to provide a list of type filter-strings which organise the imports based upon those filters - like how java.completion.filteredTypes operates:

All types whose fully qualified name matches the selected filter strings will be ignored in content assist or quick fix proposals and when organizing imports. For example 'java.awt.*' will hide all types from the awt packages.

Simply put, if I put org.bukkit at the top of the entry, then suggestions from org.bukkit.* should be at the top of the import list, so you can just hit [Enter], rather than having to select the correct option.
I.e. I only use, and will probably only use the second option, yet there's no way to prioritise that package:
Image

As I've mentioned, I'm aware of filteredTypes, but I don't want these types filtered in-case I want to use them later-on. Being able to prioritise types, such as an importPriority option, would allow this problem to be fixed in-general, for any project, rather than having to set filteredTypes for every project individually.

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