aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/syntax_highlighting/injection.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/syntax_highlighting/injection.rs')
-rw-r--r--crates/ra_ide/src/syntax_highlighting/injection.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting/injection.rs b/crates/ra_ide/src/syntax_highlighting/injection.rs
index 9d82b4009..bd38cdb6f 100644
--- a/crates/ra_ide/src/syntax_highlighting/injection.rs
+++ b/crates/ra_ide/src/syntax_highlighting/injection.rs
@@ -150,7 +150,10 @@ pub(super) fn highlight_doc_comment(
150 let (analysis, tmp_file_id) = Analysis::from_single_file(text); 150 let (analysis, tmp_file_id) = Analysis::from_single_file(text);
151 151
152 stack.push(); 152 stack.push();
153 for mut h in analysis.with_db(|db| super::highlight(db, tmp_file_id, None, true)).unwrap() { 153 for mut h in analysis
154 .with_db(|db| super::highlight(db, tmp_file_id, None, true, Some(HighlightTag::Operator)))
155 .unwrap()
156 {
154 // Determine start offset and end offset in case of multi-line ranges 157 // Determine start offset and end offset in case of multi-line ranges
155 let mut start_offset = None; 158 let mut start_offset = None;
156 let mut end_offset = None; 159 let mut end_offset = None;
@@ -172,6 +175,7 @@ pub(super) fn highlight_doc_comment(
172 h.range.end() + end_offset.unwrap_or(start_offset) - h.range.start(), 175 h.range.end() + end_offset.unwrap_or(start_offset) - h.range.start(),
173 ); 176 );
174 177
178 h.highlight |= HighlightModifier::Injected;
175 stack.add(h); 179 stack.add(h);
176 } 180 }
177 } 181 }