mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
Better highlight for fixtures
This commit is contained in:
parent
62b17bac92
commit
4a8d2c098d
2 changed files with 6 additions and 2 deletions
|
@ -42,6 +42,10 @@ pub(super) fn highlight_injection(
|
|||
offset += TextSize::of(chunk);
|
||||
|
||||
if let Some(next) = text.strip_prefix(marker) {
|
||||
if let Some(range) = literal.map_range_up(TextRange::at(offset, TextSize::of(marker))) {
|
||||
hl.add(HlRange { range, highlight: HlTag::Keyword.into(), binding_hash: None });
|
||||
}
|
||||
|
||||
text = next;
|
||||
|
||||
let marker_len = TextSize::of(marker);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue