-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Allow toggling code lens positions #13218
Comments
Relevant code is here (minus the config part) rust-analyzer/crates/ide/src/annotations.rs Lines 123 to 134 in b7e8b9a
For this new case we should just take the range of the whole node instead of the name, that should make editors place it above the comments and attributes. This should as stated be done with a config flag toggling the behavior, with the current behavior staying the default. |
I'm working on this one but am running into an issue regarding how to configure this feature. I figured it would be best to add a new enum configuration value. I've called this I'm not exactly sure where to put the Rust enum definition at, however. I need access to this type in both the
Does anyone have opinions? |
usually we define the enum twice, once in IDE as the actual used thing, and the second time just for deserializing purposes in the config module in rust-analyzer, and then we map between the two. Thre should be some enum in config.rs doing this already. |
Currently code lenses are positioned between doc comments/attributes and the item they're decorating, like this
But I personally would rather it be above the doc comments and attributes, so an option to toggle their position would be awesome
The text was updated successfully, but these errors were encountered: