aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/syntax_highlighting
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-05-24 15:20:22 +0100
committerGitHub <[email protected]>2020-05-24 15:20:22 +0100
commitd959c913eaeae36b9e04c7b5ee8b341f6c5b678b (patch)
tree0bee9dbb6794748dc3aebce59292cbf466010af2 /crates/ra_ide/src/syntax_highlighting
parent7e862626cc892662c3c95ba393483ac89c07e31a (diff)
parent1895888aec1c87096809057b19a602e1cec9ada6 (diff)
Merge #4556
4556: More highlighting improvements r=matthewjasper a=matthewjasper * Separate `true` and `false` from keywords (this matches the Textmate grammar). * Handle more cases in `highlight_name_by_syntax`. Co-authored-by: Matthew Jasper <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/syntax_highlighting')
-rw-r--r--crates/ra_ide/src/syntax_highlighting/html.rs1
-rw-r--r--crates/ra_ide/src/syntax_highlighting/tags.rs2
2 files changed, 3 insertions, 0 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting/html.rs b/crates/ra_ide/src/syntax_highlighting/html.rs
index ff0eeeb52..edfe61f39 100644
--- a/crates/ra_ide/src/syntax_highlighting/html.rs
+++ b/crates/ra_ide/src/syntax_highlighting/html.rs
@@ -76,6 +76,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
76.type_param { color: #DFAF8F; } 76.type_param { color: #DFAF8F; }
77.attribute { color: #94BFF3; } 77.attribute { color: #94BFF3; }
78.numeric_literal { color: #BFEBBF; } 78.numeric_literal { color: #BFEBBF; }
79.bool_literal { color: #BFE6EB; }
79.macro { color: #94BFF3; } 80.macro { color: #94BFF3; }
80.module { color: #AFD8AF; } 81.module { color: #AFD8AF; }
81.variable { color: #DCDCCC; } 82.variable { color: #DCDCCC; }
diff --git a/crates/ra_ide/src/syntax_highlighting/tags.rs b/crates/ra_ide/src/syntax_highlighting/tags.rs
index 33e6619ec..09652a5b1 100644
--- a/crates/ra_ide/src/syntax_highlighting/tags.rs
+++ b/crates/ra_ide/src/syntax_highlighting/tags.rs
@@ -15,6 +15,7 @@ pub struct HighlightModifiers(u32);
15#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] 15#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
16pub enum HighlightTag { 16pub enum HighlightTag {
17 Attribute, 17 Attribute,
18 BoolLiteral,
18 BuiltinType, 19 BuiltinType,
19 ByteLiteral, 20 ByteLiteral,
20 CharLiteral, 21 CharLiteral,
@@ -60,6 +61,7 @@ impl HighlightTag {
60 fn as_str(self) -> &'static str { 61 fn as_str(self) -> &'static str {
61 match self { 62 match self {
62 HighlightTag::Attribute => "attribute", 63 HighlightTag::Attribute => "attribute",
64 HighlightTag::BoolLiteral => "bool_literal",
63 HighlightTag::BuiltinType => "builtin_type", 65 HighlightTag::BuiltinType => "builtin_type",
64 HighlightTag::ByteLiteral => "byte_literal", 66 HighlightTag::ByteLiteral => "byte_literal",
65 HighlightTag::CharLiteral => "char_literal", 67 HighlightTag::CharLiteral => "char_literal",