From 4a8d2c098d88da6f36f3cf95f424b471987c5daa Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 9 Jan 2021 16:07:41 +0300 Subject: Better highlight for fixtures --- crates/ide/src/syntax_highlighting/injection.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/ide/src/syntax_highlighting/injection.rs') diff --git a/crates/ide/src/syntax_highlighting/injection.rs b/crates/ide/src/syntax_highlighting/injection.rs index de2180b04..008d5ce24 100644 --- a/crates/ide/src/syntax_highlighting/injection.rs +++ b/crates/ide/src/syntax_highlighting/injection.rs @@ -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); -- cgit v1.2.3