-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add config for disabling hover memory layout data #14758
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
Conversation
crates/rust-analyzer/src/config.rs
Outdated
hover_links_enable: bool = "true", | ||
/// Whether to show memory layout data on hover. | ||
hover_memory_layout_enable: bool = "true", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hover_memory_layout_enable: bool = "true", | |
hover_memoryLayout_enable: bool = "true", |
Let's treat this as one thing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, thank you. Fixed it.
} else { | ||
def.display(db).to_string() | ||
let label = match value_extractor(&def) { | ||
Some(value) if config.memory_layout => format!("{} // {value}", def.display(db)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately closure hover doesn't use label_and_layout_info_and_docs
, but it shows some layout info which needs to be disabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I missed that closures use a different implementation.
I've added an additional test for closures.
@bors r+ |
☀️ Test successful - checks-actions |
Requested in #14748 (comment)