Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/highlight_related.rs')
-rw-r--r--crates/ide/src/highlight_related.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/ide/src/highlight_related.rs b/crates/ide/src/highlight_related.rs
index 3a519fe65a..3b639104ef 100644
--- a/crates/ide/src/highlight_related.rs
+++ b/crates/ide/src/highlight_related.rs
@@ -54,9 +54,10 @@ pub(crate) fn highlight_related(
let token = pick_best_token(syntax.token_at_offset(offset), |kind| match kind {
T![?] => 4, // prefer `?` when the cursor is sandwiched like in `await$0?`
- T![->] | T![|] => 3,
- kind if kind.is_keyword() => 2,
- IDENT | INT_NUMBER => 1,
+ T![->] => 4,
+ kind if kind.is_keyword() => 3,
+ IDENT | INT_NUMBER => 2,
+ T![|] => 1,
_ => 0,
})?;
// most if not all of these should be re-implemented with information seeded from hir