forked from scopatz/nanorc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjsx.nanorc
70 lines (55 loc) · 2.77 KB
/
jsx.nanorc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
### JavaScript XML files (derived from JavaScript)
syntax "JSX" "\.jsx$"
header "^#!.*\/(env +)node"
comment "//"
## Default
color white "^.+$"
## HTML tags
color orange start="<" end=">"
## HTML Attributes
color magenta "[[:space:]](abbr|accept(-charset)?|accesskey|action|[av]?link|alt|archive|axis|background|(bg)?color|border)="
color magenta "[[:space:]](cell(padding|spacing)|char(off|set)?|checked|cite|class(id)?|compact|code(base|tag)?|cols(pan)?)="
color magenta "[[:space:]](content(editable)?|contextmenu|coords|data|datetime|declare|defer|dir|enctype)="
color magenta "[[:space:]](for|frame(border)?|headers|height|hidden|href(lang)?|hspace|http-equiv|id|ismap)="
color magenta "[[:space:]](label|lang|longdesc|margin(height|width)|maxlength|media|method|multiple)="
color magenta "[[:space:]](name|nohref|noresize|noshade|object|on(click|focus|load|mouseover|keypress)|profile|readonly|rel|rev)="
color magenta "[[:space:]](rows(pan)?|rules|scheme|scope|scrolling|shape|size|span|src|standby|start|style|summary|pattern)="
color magenta "[[:space:]](tabindex|target|text|title|type|usemap|v?align|value(type)?|vspace|width|xmlns|xml:space)="
color magenta "[[:space:]](required|disabled|selected)[[:space:]=>]"
## Decimal, octal and hexadecimal numbers
color yellow "\<[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\>"
## Floating point number with at least one digit before decimal point
color yellow "\<[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
color yellow "\<[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
## Keywords
color green "\<(break|case|catch|continue|default|delete|do|else|finally)\>"
color green "\<(for|function|if|in|instanceof|new|return|switch)\>"
color green "\<(switch|this|throw|try|typeof|var|void|while|with)\>"
color green "\<(import|as|from|export)\>"
color green "\<(const|let|class|extends|of|get|set|await|async|yield)\>"
## Type specifiers
color red "\<(Array|Boolean|Date|Enumerator|Error|Function|Math)\>"
color red "\<(WeakMap|Map|WeakSet|Set|Symbol|Promise)\>"
color red "\<(Number|Object|RegExp|String)\>"
color red "\<(true|false|null|undefined|NaN)\>"
## Function names
color cyan "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]|)"
## Operators
#color red "[-+/*=<>!~%?:&|]"
## String
color brightyellow "L?\"(\\"|[^"])*\""
color brightyellow "L?'(\\'|[^'])*'"
color brightyellow "L?`(\\`|[^`])*`"
color brightwhite,blue start="\$\{" end="\}"
## Regex (will likely mess up with urls)
#color magenta "/[^*]([^/]|(\\/))*[^\\<]/[gim]*"
## Escapes
color yellow "\\[0-7][0-7]?[0-7]?|\\x[0-9a-fA-F]+|\\[bfnrt'"`\?\\]"
## Comments
color brightblue start="/\*" end="\*/"
color brightblue "(^|\s)//.*$"
## Trailing spaces and mixed whitespaces
color ,green "[[:space:]]+$"
color ,red "( + +| + +)"
## Reminders
color brightwhite,yellow "\<(FIXME|TODO|XXX)\>"