scalameta / metals-feature-requests

Issue tracker for Metals feature requests
37 stars 4 forks source link

Allow to filter out static methods from java classes #382

Open ghostbuster91 opened 7 months ago

ghostbuster91 commented 7 months ago

Is your feature request related to a problem? Please describe.

I find it confusing that in java static methods are returned as a part of completions on an instance of an object. I know that in java it is possible to call static method on an instance of an object though this is considered a bad practice.

I would like static methods not to be reported in completions when writing java.

Describe the solution you'd like

Add a feature flag that if set would not report static methods on java classes when writing a java file. Static methods would only be reported on the class. Otherwise the behavior remains the same.

Describe alternatives you've considered

Leave it as it is since this is allowed in java.

Additional context

No response

Search terms

java, completions, static