-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Placing the cursor on self
in a function without self
argument highlights the entire file
#9365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Annoying enough to be a broken window :-) this happens because self is then considered to refer to the current module. |
So basically we want to just highlight the identifier instead of the module? If yes should this be for modules in general or just |
I think a good middle-ground would be to highlight only the module's name in its declaration, instead of the whole module. |
Well we already do that for inline modules, I think a good solution would be to just filter the delcaration if it doesnt have a focus range in the |
We might want to move the highlighting logic from rust-analyzer/handlers.rs to a method of Analysis. Re-using Analysis methods to implement different features in handlers is a bit of an anti-pattern. |
To expand of this, it is yet another example of my favorite story -- each abstraction has two sides, implementor's side, and user's side. It's very easy to use part of the user's side when implementing an abstraction, and that leads to some non-trivial misery. In this case, |
Ye, I rebuild this on top of the |
The text was updated successfully, but these errors were encountered: