mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Remove hover inlay tooltips, replace them with location links
This commit is contained in:
parent
aafb0f1f8d
commit
60075a6625
15 changed files with 187 additions and 380 deletions
|
@ -7,7 +7,7 @@ use ide_db::RootDatabase;
|
|||
|
||||
use syntax::ast::{self, AstNode};
|
||||
|
||||
use crate::{InlayHint, InlayHintsConfig, InlayKind, InlayTooltip};
|
||||
use crate::{InlayHint, InlayHintsConfig, InlayKind};
|
||||
|
||||
pub(super) fn hints(
|
||||
acc: &mut Vec<InlayHint>,
|
||||
|
@ -44,7 +44,6 @@ pub(super) fn hints(
|
|||
range,
|
||||
kind: InlayKind::BindingModeHint,
|
||||
label: r.to_string().into(),
|
||||
tooltip: Some(InlayTooltip::String("Inferred binding mode".into())),
|
||||
});
|
||||
});
|
||||
match pat {
|
||||
|
@ -59,22 +58,11 @@ pub(super) fn hints(
|
|||
range: pat.syntax().text_range(),
|
||||
kind: InlayKind::BindingModeHint,
|
||||
label: bm.to_string().into(),
|
||||
tooltip: Some(InlayTooltip::String("Inferred binding mode".into())),
|
||||
});
|
||||
}
|
||||
ast::Pat::OrPat(pat) if !pattern_adjustments.is_empty() && outer_paren_pat.is_none() => {
|
||||
acc.push(InlayHint {
|
||||
range: pat.syntax().text_range(),
|
||||
kind: InlayKind::OpeningParenthesis,
|
||||
label: "(".into(),
|
||||
tooltip: None,
|
||||
});
|
||||
acc.push(InlayHint {
|
||||
range: pat.syntax().text_range(),
|
||||
kind: InlayKind::ClosingParenthesis,
|
||||
label: ")".into(),
|
||||
tooltip: None,
|
||||
});
|
||||
acc.push(InlayHint::opening_paren(pat.syntax().text_range()));
|
||||
acc.push(InlayHint::closing_paren(pat.syntax().text_range()));
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue