You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
There are certain packages from which I never want to make an import, even though they are on my class path. For example, Akka has various *.javadsl and *.scaladsl packages, intended for use with java and scala. Obviously, if I'm using metals, I'm programming in scala and never want the javadsl version.
Other common names, like Logger or Node often appear in multiple packages. Being able to exclude that packages that I never want to import makes the interface easier to use: sometimes there is only one surviving option and I do not have to choose. Even if there are multiple options, fewer of them mean that the one that I want is likely easier to get to.
Describe the solution you'd like
The ability to specify a list of regular expressions to metals would be ideal. When metals attempts to find possible imports, and import that matches one of the regexes would be filtered out.
One corner case to consider is what to do if all of the matches are filtered out. In that case, I think returning no results would be best, but I can see the argument for returning the full, unfiltered list.
Describe alternatives you've considered
I use metals via lsp-metals in emacs. The filtering could be implemented there, but if it is added in metals, then people who use it via another interface would also benefit.
Additional context
No response
Search terms
filter import package
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
There are certain packages from which I never want to make an import, even though they are on my class path. For example, Akka has various
*.javadsl
and*.scaladsl
packages, intended for use with java and scala. Obviously, if I'm using metals, I'm programming in scala and never want thejavadsl
version.Other common names, like
Logger
orNode
often appear in multiple packages. Being able to exclude that packages that I never want to import makes the interface easier to use: sometimes there is only one surviving option and I do not have to choose. Even if there are multiple options, fewer of them mean that the one that I want is likely easier to get to.Describe the solution you'd like
The ability to specify a list of regular expressions to metals would be ideal. When metals attempts to find possible imports, and import that matches one of the regexes would be filtered out.
One corner case to consider is what to do if all of the matches are filtered out. In that case, I think returning no results would be best, but I can see the argument for returning the full, unfiltered list.
Describe alternatives you've considered
I use metals via
lsp-metals
in emacs. The filtering could be implemented there, but if it is added in metals, then people who use it via another interface would also benefit.Additional context
No response
Search terms
filter import package
The text was updated successfully, but these errors were encountered: