mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Merge #4775
4775: Add goto def for enum variant field r=matklad a=unexge Closes #4764. I'm not familiar with ra codebase, there might be better ways to do that 😄 Co-authored-by: unexge <unexge@gmail.com>
This commit is contained in:
commit
83fd0fb355
3 changed files with 57 additions and 24 deletions
|
@ -436,6 +436,7 @@ fn highlight_element(
|
|||
highlight_name(db, def) | HighlightModifier::Definition
|
||||
}
|
||||
Some(NameClass::ConstReference(def)) => highlight_name(db, def),
|
||||
Some(NameClass::FieldShorthand { .. }) => HighlightTag::Field.into(),
|
||||
None => highlight_name_by_syntax(name) | HighlightModifier::Definition,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue