Allow us to put fields before trait methods in autocompletion
I'm using rust-analyzer in a bevy game project.
Most of my structs derive from Reflect, which adds a lot of trait-methods that spam the autocompletion for me, and hide the actually relevant fields:
I never use the Reflect methods in my own code, I only derive from it so that Bevy (and other core packages) can benefit from it.
IDK how common it for general rust projects to encounter this issue, but from what I've seen it will always happen when working with bevy.
I see 2 solutions for this:
- Make fields appear at the start of the list, alongside methods defined on the object itself, instead of alongside trait methods.
- Allow us to hide methods of a specific trait from the list, or move them to the end.
I could see a world in which some first-class methods are defined in a trait, and you would also not want these methods to get hidden behind all of the unimportant
Reflectmethods.
(keywords: order)
I think the first solution you outlined provides substantial utility to the whole Rust ecosystem. For most code bases I work in, fields and inherent methods probably represent the majority of what I access by a fair amount.