diff options
Diffstat (limited to 'crates/ide/src/syntax_highlighting.rs')
-rw-r--r-- | crates/ide/src/syntax_highlighting.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ide/src/syntax_highlighting.rs b/crates/ide/src/syntax_highlighting.rs index f2d4da78d..9bed329d8 100644 --- a/crates/ide/src/syntax_highlighting.rs +++ b/crates/ide/src/syntax_highlighting.rs | |||
@@ -13,7 +13,7 @@ mod html; | |||
13 | mod tests; | 13 | mod tests; |
14 | 14 | ||
15 | use hir::{Name, Semantics}; | 15 | use hir::{Name, Semantics}; |
16 | use ide_db::RootDatabase; | 16 | use ide_db::{RootDatabase, SymbolKind}; |
17 | use rustc_hash::FxHashMap; | 17 | use rustc_hash::FxHashMap; |
18 | use syntax::{ | 18 | use syntax::{ |
19 | ast::{self, HasFormatSpecifier}, | 19 | ast::{self, HasFormatSpecifier}, |
@@ -27,7 +27,7 @@ use crate::{ | |||
27 | format::highlight_format_string, highlights::Highlights, | 27 | format::highlight_format_string, highlights::Highlights, |
28 | macro_rules::MacroRulesHighlighter, tags::Highlight, | 28 | macro_rules::MacroRulesHighlighter, tags::Highlight, |
29 | }, | 29 | }, |
30 | FileId, HlMod, HlTag, SymbolKind, | 30 | FileId, HlMod, HlTag, |
31 | }; | 31 | }; |
32 | 32 | ||
33 | pub(crate) use html::highlight_as_html; | 33 | pub(crate) use html::highlight_as_html; |
@@ -72,7 +72,7 @@ pub(crate) fn highlight( | |||
72 | } | 72 | } |
73 | }; | 73 | }; |
74 | 74 | ||
75 | let mut hl = highlights::Highlights::new(range_to_highlight); | 75 | let mut hl = highlights::Highlights::new(root.text_range()); |
76 | traverse(&mut hl, &sema, &root, range_to_highlight, syntactic_name_ref_highlighting); | 76 | traverse(&mut hl, &sema, &root, range_to_highlight, syntactic_name_ref_highlighting); |
77 | hl.to_vec() | 77 | hl.to_vec() |
78 | } | 78 | } |