Add property sheet for syntax highlighting

This commit is contained in:
Max Brunsfeld 2018-12-17 09:57:27 -08:00
parent d3ed6c02ae
commit 521103931f
2 changed files with 5308 additions and 0 deletions

140
properties/highlights.css Normal file
View File

@ -0,0 +1,140 @@
@schema "tree-sitter-highlight-schema";
comment {
scope: 'comment';
}
tag_name,
nesting_selector,
universal_selector {
scope: 'tag';
}
sibling_selector > "~",
child_selector > ">",
adjacent_sibling_selector > "+" {
scope: 'operator';
}
attribute_selector > {
& > "=",
& > "^=",
& > "|=",
& > "~=",
& > "$=",
& > "*=" {
scope: 'operator';
}
}
attribute_selector > plain_value {
scope: 'string';
}
pseudo_element_selector > tag_name,
pseudo_class_selector > class_name {
scope: 'attribute';
}
class_name {
scope: 'property';
}
id_name {
scope: 'property';
}
namespace_name {
scope: 'property';
}
function_name {
scope: 'function';
}
property_name,
plain_value {
&:text('^--') {
scope: 'variable';
}
}
property_name {
scope: 'property';
}
attribute_name {
scope: 'attribute';
}
"@media",
"@import",
"@charset",
"@namespace",
"@supports",
"@keyframes",
at_keyword,
to,
from,
important {
scope: 'keyword';
}
string_value {
scope: 'string';
}
color_value {
scope: 'string.special';
}
integer_value,
float_value {
scope: 'number';
& > unit {
scope: 'type';
}
}
/* plain_value': [
{match:'^(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)$', scopes:'support.constant.color.w3c-standard'}
{match:'^(aliceblue|antiquewhite|aquamarine|azure|beige|bisque|blanchedalmond|blueviolet|brown|burlywood
|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan
|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange
|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise
|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen
|gainsboro|ghostwhite|gold|goldenrod|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki
|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow
|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray
|lightslategrey|lightsteelblue|lightyellow|limegreen|linen|magenta|mediumaquamarine|mediumblue
|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise
|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|oldlace|olivedrab|orangered
|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum
|powderblue|rebeccapurple|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell
|sienna|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|thistle|tomato
|transparent|turquoise|violet|wheat|whitesmoke|yellowgreen)$', scopes: 'support.constant.color.w3c-extended'}
'support.constant.property-value.css'
] */
feature_name {
scope: 'property';
}
color_value > "#",
id_selector > "#",
selectors > "," {
scope: 'punctuation.delimiter';
}
"and",
"or",
"not",
"only",
keyword_query,
binary_expression > "+",
binary_expression > "-",
binary_expression > "/",
binary_expression > "*" {
scope: 'operator';
}

5168
src/highlights.json vendored Normal file

File diff suppressed because it is too large Load Diff