mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Auto merge of #13817 - WaffleLapkin:hide_adjustment_hints_outside_of_unsafe, r=Veykril
feat: Add an option to hide adjustment hints outside of `unsafe` blocks and functions As the title suggests: this PR adds an option (namely `rust-analyzer.inlayHints.expressionAdjustmentHints.hideOutsideUnsafe`) that allows to hide adjustment hints outside of `unsafe` blocks and functions:  Requested by `@BoxyUwU` <3
This commit is contained in:
commit
eb3963b22e
8 changed files with 182 additions and 7 deletions
|
@ -329,6 +329,8 @@ config_data! {
|
|||
inlayHints_closureReturnTypeHints_enable: ClosureReturnTypeHintsDef = "\"never\"",
|
||||
/// Whether to show inlay hints for type adjustments.
|
||||
inlayHints_expressionAdjustmentHints_enable: AdjustmentHintsDef = "\"never\"",
|
||||
/// Whether to hide inlay hints for type adjustments outside of `unsafe` blocks.
|
||||
inlayHints_expressionAdjustmentHints_hideOutsideUnsafe: bool = "false",
|
||||
/// Whether to show inlay type hints for elided lifetimes in function signatures.
|
||||
inlayHints_lifetimeElisionHints_enable: LifetimeElisionDef = "\"never\"",
|
||||
/// Whether to prefer using parameter names as the name for elided lifetime hints if possible.
|
||||
|
@ -1240,6 +1242,9 @@ impl Config {
|
|||
},
|
||||
AdjustmentHintsDef::Reborrow => ide::AdjustmentHints::ReborrowOnly,
|
||||
},
|
||||
adjustment_hints_hide_outside_unsafe: self
|
||||
.data
|
||||
.inlayHints_expressionAdjustmentHints_hideOutsideUnsafe,
|
||||
binding_mode_hints: self.data.inlayHints_bindingModeHints_enable,
|
||||
param_names_for_lifetime_elision_hints: self
|
||||
.data
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue