feat: Add binding mode inlay hints

This commit is contained in:
Lukas Wirth
2022-05-14 14:26:08 +02:00
parent 06448c5548
commit 6b696fced8
12 changed files with 201 additions and 41 deletions

View File

@@ -254,6 +254,8 @@ config_data! {
/// The path structure for newly inserted paths to use.
imports_prefix: ImportPrefixDef = "\"plain\"",
/// Whether to show inlay type hints for binding modes.
inlayHints_bindingModeHints_enable: bool = "false",
/// Whether to show inlay type hints for method chains.
inlayHints_chainingHints_enable: bool = "true",
/// Whether to show inlay type hints for return types of closures with blocks.
@@ -997,6 +999,7 @@ impl Config {
ReborrowHintsDef::Never => ide::ReborrowHints::Never,
ReborrowHintsDef::Mutable => ide::ReborrowHints::MutableOnly,
},
binding_mode_hints: self.data.inlayHints_bindingModeHints_enable,
param_names_for_lifetime_elision_hints: self
.data
.inlayHints_lifetimeElisionHints_useParameterNames,