mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Add name_range field to FileSymbol
This contains the syntax range of the name itself, allowing NavigationTarget to properly set the focus_range. This should make it so that when using symbol based navigation, we should always focus on the name, instead of the full range.
This commit is contained in:
parent
7046b16275
commit
c565ec2d6e
2 changed files with 17 additions and 7 deletions
|
@ -67,7 +67,7 @@ impl NavigationTarget {
|
|||
name: symbol.name.clone(),
|
||||
kind: symbol.ptr.kind(),
|
||||
full_range: symbol.ptr.range(),
|
||||
focus_range: None,
|
||||
focus_range: symbol.name_range,
|
||||
container_name: symbol.container_name.clone(),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue