aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/syntax_highlighting
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/syntax_highlighting')
-rw-r--r--crates/ra_ide/src/syntax_highlighting/html.rs4
-rw-r--r--crates/ra_ide/src/syntax_highlighting/injection.rs4
-rw-r--r--crates/ra_ide/src/syntax_highlighting/tags.rs2
3 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting/html.rs b/crates/ra_ide/src/syntax_highlighting/html.rs
index 191c586a3..2a27c81dd 100644
--- a/crates/ra_ide/src/syntax_highlighting/html.rs
+++ b/crates/ra_ide/src/syntax_highlighting/html.rs
@@ -19,7 +19,7 @@ pub(crate) fn highlight_as_html(db: &RootDatabase, file_id: FileId, rainbow: boo
19 ) 19 )
20 } 20 }
21 21
22 let ranges = highlight(db, file_id, None, false, None); 22 let ranges = highlight(db, file_id, None, false, false);
23 let text = parse.tree().syntax().to_string(); 23 let text = parse.tree().syntax().to_string();
24 let mut prev_pos = TextSize::from(0); 24 let mut prev_pos = TextSize::from(0);
25 let mut buf = String::new(); 25 let mut buf = String::new();
@@ -64,7 +64,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
64 64
65.lifetime { color: #DFAF8F; font-style: italic; } 65.lifetime { color: #DFAF8F; font-style: italic; }
66.comment { color: #7F9F7F; } 66.comment { color: #7F9F7F; }
67.documentation { color: #00CC00; } 67.documentation { color: #629755; }
68.injected { opacity: 0.65 ; } 68.injected { opacity: 0.65 ; }
69.struct, .enum { color: #7CB8BB; } 69.struct, .enum { color: #7CB8BB; }
70.enum_variant { color: #BDE0F3; } 70.enum_variant { color: #BDE0F3; }
diff --git a/crates/ra_ide/src/syntax_highlighting/injection.rs b/crates/ra_ide/src/syntax_highlighting/injection.rs
index bd38cdb6f..8c724af5b 100644
--- a/crates/ra_ide/src/syntax_highlighting/injection.rs
+++ b/crates/ra_ide/src/syntax_highlighting/injection.rs
@@ -150,9 +150,7 @@ 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 153 for mut h in analysis.with_db(|db| super::highlight(db, tmp_file_id, None, true, true)).unwrap()
154 .with_db(|db| super::highlight(db, tmp_file_id, None, true, Some(HighlightTag::Operator)))
155 .unwrap()
156 { 154 {
157 // Determine start offset and end offset in case of multi-line ranges 155 // Determine start offset and end offset in case of multi-line ranges
158 let mut start_offset = None; 156 let mut start_offset = None;
diff --git a/crates/ra_ide/src/syntax_highlighting/tags.rs b/crates/ra_ide/src/syntax_highlighting/tags.rs
index f5ab73865..7f8e91e8d 100644
--- a/crates/ra_ide/src/syntax_highlighting/tags.rs
+++ b/crates/ra_ide/src/syntax_highlighting/tags.rs
@@ -33,6 +33,7 @@ pub enum HighlightTag {
33 Module, 33 Module,
34 NumericLiteral, 34 NumericLiteral,
35 Operator, 35 Operator,
36 Punctuation,
36 SelfKeyword, 37 SelfKeyword,
37 SelfType, 38 SelfType,
38 Static, 39 Static,
@@ -84,6 +85,7 @@ impl HighlightTag {
84 HighlightTag::Module => "module", 85 HighlightTag::Module => "module",
85 HighlightTag::NumericLiteral => "numeric_literal", 86 HighlightTag::NumericLiteral => "numeric_literal",
86 HighlightTag::Operator => "operator", 87 HighlightTag::Operator => "operator",
88 HighlightTag::Punctuation => "punctuation",
87 HighlightTag::SelfKeyword => "self_keyword", 89 HighlightTag::SelfKeyword => "self_keyword",
88 HighlightTag::SelfType => "self_type", 90 HighlightTag::SelfType => "self_type",
89 HighlightTag::Static => "static", 91 HighlightTag::Static => "static",