-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Nano SystemHighlighter: add theme system (#752)
- Loading branch information
Showing
11 changed files
with
271 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
syntax "ARGS" | ||
|
||
color brightblue "\<[-]?[0-9]*([Ee][+-]?[0-9]+)?\>" "\<[-]?[0](\.[0-9]+)?\>" | ||
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'|[a-zA-Z]+[a-zA-Z0-9]*" | ||
color green "\<(console|grab|inspect)\>" | ||
color cyan "\<null\>" | ||
color brightcyan "\<(true|false)\>" | ||
color brightyellow "\"(\\"|[^"])*\"\s*:" "'(\'|[^'])*'\s*:" "(\[|,)\s*[a-zA-Z0-9]*\s*:" | ||
color white "(:|\[|,|\])" | ||
color magenta "\\u[0-9a-fA-F]{4}|\\[bfnrt'"/\\]" | ||
color blue start="/\*" end="\*/" | ||
color blue "(//.*)" | ||
color ,red " + +| + +" | ||
NUMBER: "\<[-]?[0-9]*([Ee][+-]?[0-9]+)?\>" "\<[-]?[0](\.[0-9]+)?\>" | ||
STRING: ""(\\.|[^"])*"|'(\\.|[^'])*'|[a-zA-Z]+[a-zA-Z0-9]*" | ||
FUNCTION: "\<(console|grab|inspect)\>" | ||
NULL: "\<null\>" | ||
BOOLEAN: "\<(true|false)\>" | ||
VARIABLE: "\"(\\"|[^"])*\"\s*:" "'(\'|[^'])*'\s*:" "(\[|,)\s*[a-zA-Z0-9]*\s*:" | ||
PLAIN: "(:|\[|,|\])" | ||
ESCAPE: "\\u[0-9a-fA-F]{4}|\\[bfnrt'"/\\]" | ||
COMMENT: start="/\*" end="\*/" | ||
COMMENT: "(//.*)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
syntax "COMMAND" | ||
|
||
color green "[a-zA-Z]+[a-zA-Z0-9]*" | ||
color yellow ".*=" | ||
color white "(\"|'|\.|=|:|\[|,|\])" | ||
color blue start="/\*" end="\*/" | ||
color blue "(^|[[:space:]])#.*$" | ||
FUNCTION: "[a-zA-Z]+[a-zA-Z0-9]*" | ||
VARIABLE: ".*=" | ||
PLAIN: "(\"|'|\.|=|:|\[|,|\])" | ||
COMMENT: start="/\*" end="\*/" | ||
COMMENT: "(^|[[:space:]])#.*$" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# | ||
# This file describes a default scheme for nanorc syntax highlighting. | ||
# | ||
# Everything after a # character is a comment up to the end of the line. | ||
# Comments are ignored. Empty lines are ignored too. Leading/trailing white | ||
# space characters are removed before theme file is processed. | ||
# | ||
# Each line of the theme file describes a token type and how this token type | ||
# should be colored (highlighted). The first word on each line is the name | ||
# of the token type. After the name of the token type at least one white space | ||
# character must follow, and then a text and background color | ||
# for the highlighting must be specified, separated by a comma. No spaces | ||
# are allowed inside color definition (that is, color definition is considered | ||
# a single word, despite a possible comma). | ||
# | ||
# Background color can be omitted (in which case default background color | ||
# of the terminal will be used). If you are omitting the background color, | ||
# a comma may be omitted also. Likewise, a text color can be omitted, | ||
# but comma must be present in this case. | ||
# | ||
# Author: Yuri Sakhno | ||
# ysakhno at gmail dot com | ||
# | ||
# https://github.com/YSakhno/nanorc/ | ||
# | ||
|
||
PLAIN white | ||
FUNCTION brightgreen | ||
STRING brightcyan | ||
COMMENT cyan | ||
DOC_COMMENT brightcyan | ||
TYPE brightblue | ||
BOOLEAN brightwhite | ||
NULL cyan | ||
NUMBER blue | ||
VARIABLE brightyellow | ||
PACKAGE green,,faint | ||
CLASS green | ||
CONSTANT yellow | ||
OPERATOR yellow | ||
OPTION yellow | ||
KEYWORD brightwhite | ||
MACRO brightmagenta | ||
REGEXP blue,cyan | ||
ESCAPE black,cyan | ||
DELIMITER brightred | ||
JUMP brightcyan | ||
WARNING brightyellow,red | ||
SECTION brightgreen | ||
TAG brightwhite | ||
ATTRIBUTE green | ||
CHARREF brightred | ||
PATH brightblue | ||
URL brightblue | ||
EMAIL brightblue | ||
WHITESPACE ,green | ||
# | ||
# mixin | ||
# | ||
+FUNCTION FUNCTION: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]" \n PLAIN: "[(]" | ||
+TODO color brightwhite,cyan "FIXME|TODO|XXX" | ||
+LINT color ,green "[[:space:]]+$" \n color ,red "\t*" | ||
+LONG_LINE_WARNING color ,red "^.{81,}$" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
syntax "GRON" "\.gron$" | ||
header "^\[$" | ||
|
||
color brightblue "\<[-]?[0-9]*([Ee][+-]?[0-9]+)?\>" "\<[-]?[0](\.[0-9]+)?\>" | ||
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'|[a-zA-Z]+[a-zA-Z0-9]*" | ||
color cyan "\<null\>" | ||
color brightcyan "\<(true|false)\>" | ||
color brightyellow "\"(\\"|[^"])*\"\s*:" "'(\'|[^'])*'\s*:" "(\[|,)\s*[a-zA-Z0-9]*\s*:" | ||
color white "(:|\[|,|\])" | ||
color magenta "\\u[0-9a-fA-F]{4}|\\[bfnrt'"/\\]" | ||
color ,green "[[:space:]]+$" | ||
color ,red " + +| + +" | ||
NUMBER: "\<[-]?[0-9]*([Ee][+-]?[0-9]+)?\>" "\<[-]?[0](\.[0-9]+)?\>" | ||
STRING: ""(\\.|[^"])*"|'(\\.|[^'])*'|[a-zA-Z]+[a-zA-Z0-9]*" | ||
NULL: "\<null\>" | ||
BOOLEAN: "\<(true|false)\>" | ||
VARIABLE: "\"(\\"|[^"])*\"\s*:" "'(\'|[^'])*'\s*:" "(\[|,)\s*[a-zA-Z0-9]*\s*:" | ||
PLAIN: "(:|\[|,|\])" | ||
ESCAPE: "\\u[0-9a-fA-F]{4}|\\[bfnrt'"/\\]" |
Oops, something went wrong.