Open
Description
When working on a structure, ZLS offers completion for methods inside a non-method. What I mean by that is that if a function defined on a structure isn't a method (first parameter structure's type), it should not be able to access methods like:
Here, fn4
isn't a method and yet completion shows all methods with matching name.
If there is a way to identify the first parameter's type and notice that it's a method, we could even go a step further and show completion to "smart insert" methods like in Rust: