Skip to content

Commit 9553a27

Browse files
authored
Merge pull request #43 from davidhcefx/fix-nanorc
fix(nanorc): highlight inline comments, 'grey' and hex colors
2 parents ff189e2 + 9742b0b commit 9553a27

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

nanorc.nanorc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ color yellow "\<yellow\>"
1515
color cyan "\<cyan\>"
1616
color white "\<white\>"
1717
color black "\<black\>"
18-
color normal "\<normal\>"
1918
## Light/bright colors
2019
color lightred "\<(light|bright)red\>"
2120
color lightgreen "\<(light|bright)green\>"
@@ -24,8 +23,7 @@ color lightmagenta "\<(light|bright)magenta\>"
2423
color lightyellow "\<(light|bright)yellow\>"
2524
color lightcyan "\<(light|bright)cyan\>"
2625
color lightwhite "\<(light|bright)white\>"
27-
color lightblack "\<(light|bright)black\>"
28-
color normal "\<(light|bright)normal\>"
26+
color lightblack "\<(light|bright)black\>" "\<gr[ea]y\>"
2927
## 256 colors
3028
color pink "\<pink\>"
3129
color purple "\<purple\>"
@@ -50,6 +48,9 @@ color sand "\<sand\>"
5048
color tawny "\<tawny\>"
5149
color brick "\<brick\>"
5250
color crimson "\<crimson\>"
51+
color normal "\<normal\>"
52+
## hex color
53+
color green "#[0-9][0-9][0-9]"
5354

5455
## Keywords
5556
color green "^[[:space:]]*(set|unset|syntax|header|magic|formatter|linter|comment|tabgives|include|extendssyntax|bind|unbind)\>"
@@ -66,8 +67,10 @@ color brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(afterends|allow_insecure
6667
color white "[[:blank:]](start=)?".+""
6768

6869
## Comments
69-
color brightblue "^[[:space:]]*#.*$"
70+
## excluding hex color
71+
color brightblue "^[[:space:]]*#.*$" "[[:space:]]#.{0,2}[^[:xdigit:]].*$"
7072
color cyan "^[[:space:]]*##.*$"
73+
7174
## Reminders
7275
color brightwhite,yellow "\<(FIXME|TODO|XXX)\>"
7376

0 commit comments

Comments
 (0)