Skip to content

Commit

Permalink
More syntax files from craigbarnes/nanorc
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuszs committed Jun 2, 2013
1 parent 9975b23 commit e5cc8be
Show file tree
Hide file tree
Showing 33 changed files with 593 additions and 0 deletions.
25 changes: 25 additions & 0 deletions awk.nanorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
syntax "awk" "\.awk$"
header "^#!.*bin/(env +)?awk( |$)"

color brightyellow "\$[A-Za-z0-9_!@#$*?-]+"
color brightyellow "\<(ARGC|ARGIND|ARGV|BINMODE|CONVFMT|ENVIRON|ERRNO|FIELDWIDTHS)\>"
color brightyellow "\<(FILENAME|FNR|FS|IGNORECASE|LINT|NF|NR|OFMT|OFS|ORS)\>"
color brightyellow "\<(PROCINFO|RS|RT|RSTART|RLENGTH|SUBSEP|TEXTDOMAIN)\>"
color brightblue "\<(function|extension|BEGIN|END)\>"
color red "[-+*/%^|!=&<>?;:]|\\|\[|\]"
color cyan "\<(for|if|while|do|else|in|delete|exit)\>"
color cyan "\<(break|continue|return)\>"
color brightblue "\<(close|getline|next|nextfile|print|printf|system|fflush)\>"
color brightblue "\<(atan2|cos|exp|int|log|rand|sin|sqrt|srand)\>"
color brightblue "\<(asort|asorti|gensub|gsub|index|length|match)\>"
color brightblue "\<(split|sprintf|strtonum|sub|substr|tolower|toupper)\>"
color brightblue "\<(mktime|strftime|systime)\>"
color brightblue "\<(and|compl|lshift|or|rshift|xor)\>"
color brightblue "\<(bindtextdomain|dcgettext|dcngettext)\>"
color magenta "/.*[^\]/"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color magenta "\\."
color brightblack "(^|[[:space:]])#([^{].*)?$"
color brightwhite,cyan "TODO:?"
color ,green "[[:space:]]+$"
color ,red " +"
16 changes: 16 additions & 0 deletions coffeescript.nanorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
syntax "coffeescript" "\.coffee$"
header "^#!.*/(env +)?coffee"

color red "[!&|=/*+-<>]|\<(and|or|is|isnt|not)\>"
color brightblue "[A-Za-z_][A-Za-z0-9_]*:[[:space:]]*(->|\()" "->"
color black "[()]"
color cyan "\<(for|of|continue|break|isnt|null|unless|this|else|if|return)\>"
color cyan "\<(try|catch|finally|throw|new|delete|typeof|in|instanceof)\>"
color cyan "\<(debugger|switch|while|do|class|extends|super)\>"
color cyan "\<(undefined|then|unless|until|loop|of|by|when)\>"
color brightcyan "\<(true|false|yes|no|on|off)\>"
color brightyellow "@[A-Za-z0-9_]*"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " +"
17 changes: 17 additions & 0 deletions colortest.nanorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
syntax "colortest" "ColorTest$"

color black "\<PLAIN\>"

color red "\<red\>"
color green "\<green\>"
color yellow "\<yellow\>"
color blue "\<blue\>"
color magenta "\<magenta\>"
color cyan "\<cyan\>"

color brightred "\<brightred\>"
color brightgreen "\<brightgreen\>"
color brightyellow "\<brightyellow\>"
color brightblue "\<brightblue\>"
color brightmagenta "\<brightmagenta\>"
color brightcyan "\<brightcyan\>"
27 changes: 27 additions & 0 deletions csharp.nanorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
syntax "c#" "\.cs$"

# Class
color brightmagenta "class +[A-Za-z0-9]+ *((:) +[A-Za-z0-9.]+)?"

# Annotation
color magenta "@[A-Za-z]+"

color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
color black "[(]"
color green "\<(bool|byte|sbyte|char|decimal|double|float|IntPtr|int|uint|long|ulong|object|short|ushort|string|base|this|var|void)\>"
color cyan "\<(alias|as|case|catch|checked|default|do|dynamic|else|finally|fixed|for|foreach|goto|if|is|lock|new|null|return|switch|throw|try|unchecked|while)\>"
color cyan "\<(abstract|async|class|const|delegate|enum|event|explicit|extern|get|implicit|in|internal|interface|namespace|operator|out|override|params|partial|private|protected|public|readonly|ref|sealed|set|sizeof|stackalloc|static|struct|typeof|unsafe|using|value|virtual|volatile|yield)\>"
# LINQ-only keywords (ones that cannot be used outside of a LINQ query - lots others can)
color cyan "\<(from|where|select|group|info|orderby|join|let|in|on|equals|by|ascending|descending)\>"
color brightred "\<(break|continue)\>"
color brightcyan "\<(true|false)\>"
color red "[-+/*=<>?:!~%&|]"
color blue "\<([0-9._]+|0x[A-Fa-f0-9_]+|0b[0-1_]+)[FL]?\>"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color magenta "\\([btnfr]|'|\"|\\)"
color magenta "\\u[A-Fa-f0-9]{4}"
color brightblack "(^|[[:space:]])//.*"
color brightblack start="/\*" end="\*/"
color brightwhite,cyan "TODO:?"
color ,green "[[:space:]]+$"
color ,red " +"
8 changes: 8 additions & 0 deletions dot.nanorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
syntax "dot" "\.(dot|gv)$"

color cyan "\<(digraph|edge|graph|node|subgraph)\>"
color magenta "\<(arrowhead|arrowsize|arrowtail|bgcolor|center|color|constraint|decorateP|dir|distortion|fillcolor|fontcolor|fontname|fontsize|headclip|headlabel|height|labelangle|labeldistance|labelfontcolor|labelfontname|labelfontsize|label|layers|layer|margin|mclimit|minlen|name|nodesep|nslimit|ordering|orientation|pagedir|page|peripheries|port_label_distance|rankdir|ranksep|rank|ratio|regular|rotate|samehead|sametail|shapefile|shape|sides|size|skew|style|tailclip|taillabel|URL|weight|width)\>"
color red "=|->|--"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightblack "(^|[[:space:]])//.*"
color brightblack start="/\*" end="\*/"
5 changes: 5 additions & 0 deletions email.nanorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
syntax "email"

color magenta "^>([^>].*|$)"
color blue "^>>([^>].*|$)"
color green "^>>>.*"
16 changes: 16 additions & 0 deletions glsl.nanorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
syntax "glsl" "\.(frag|vert|fp|vp|glsl)$"

color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
color black "[(]"
color green "\<(void|bool|bvec2|bvec3|bvec4|int|ivec2|ivec3|ivec4|float|vec2|vec3|vec4|mat2|mat3|mat4|struct|sampler1D|sampler2D|sampler3D|samplerCUBE|sampler1DShadow|sampler2DShadow)\>"
color green "\<gl_(DepthRangeParameters|PointParameters|MaterialParameters|LightSourceParameters|LightModelParameters|LightModelProducts|LightProducts|FogParameters)\>"
color cyan "\<(const|attribute|varying|uniform|in|out|inout|if|else|return|discard|while|for|do)\>"
color brightred "\<(break|continue)\>"
color brightcyan "\<(true|false)\>"
color red "[-+/*=<>?:!~%&|^]"
color blue "\<([0-9]+|0x[0-9a-fA-F]*)\>"
color brightblack "(^|[[:space:]])//.*"
color brightblack start="/\*" end="\*/"
color brightwhite,cyan "TODO:?"
color ,green "[[:space:]]+$"
color ,red " +"
23 changes: 23 additions & 0 deletions go.nanorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
syntax "go" "\.go$"

color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
color black "[(]"
color brightblue "\<(append|cap|close|complex|copy|delete|imag|len)\>"
color brightblue "\<(make|new|panic|print|println|protect|real|recover)\>"
color green "\<(u?int(8|16|32|64)?|float(32|64)|complex(64|128))\>"
color green "\<(uintptr|byte|rune|string|interface|bool|map|chan|error)\>"
color cyan "\<(package|import|const|var|type|struct|func|go|defer|nil|iota)\>"
color cyan "\<(for|range|if|else|case|default|switch|return)\>"
color brightred "\<(go|goto|break|continue)\>"
color brightcyan "\<(true|false)\>"
color red "[-+/*=<>!~%&|^]|:="
color blue "\<([0-9]+|0x[0-9a-fA-F]*)\>|'.'"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color magenta "\\[abfnrtv'\"\\]"
color magenta "\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
color yellow "`[^`]*`"
color brightblack "(^|[[:space:]])//.*"
color brightblack start="/\*" end="\*/"
color brightwhite,cyan "TODO:?"
color ,green "[[:space:]]+$"
color ,red " +"
108 changes: 108 additions & 0 deletions import.nanorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
include ~/.nano/yaml.nanorc
include ~/.nano/dot.nanorc
include ~/.nano/fish.nanorc
include ~/.nano/keymap.nanorc
include ~/.nano/lua.nanorc
include ~/.nano/php.nanorc
include ~/.nano/glsl.nanorc
include ~/.nano/csharp.nanorc
include ~/.nano/kickstart.nanorc
include ~/.nano/email.nanorc
include ~/.nano/coffeescript.nanorc
include ~/.nano/json.nanorc
include ~/.nano/privoxy.nanorc
include ~/.nano/ini.nanorc
include ~/.nano/patch.nanorc
include ~/.nano/systemd.nanorc
include ~/.nano/nginx.nanorc
include ~/.nano/ledger.nanorc
include ~/.nano/awk.nanorc
include ~/.nano/sh.nanorc
include ~/.nano/ruby.nanorc
include ~/.nano/lisp.nanorc
include ~/.nano/cmake.nanorc
include ~/.nano/git.nanorc
include ~/.nano/html.nanorc
include ~/.nano/colortest.nanorc
include ~/.nano/xresources.nanorc
include ~/.nano/tex.nanorc
include ~/.nano/css.nanorc
include ~/.nano/go.nanorc
include ~/.nano/nanorc.nanorc
include ~/.nano/sql.nanorc
include ~/.nano/pkg-config.nanorc
include ~/.nano/man.nanorc
include ~/.nano/vala.nanorc
include ~/.nano/java.nanorc
include ~/.nano/yum.nanorc
include ~/.nano/inputrc.nanorc
include ~/.nano/pkgbuild.nanorc
include ~/.nano/xml.nanorc
include ~/.nano/sed.nanorc
include ~/.nano/c.nanorc
include ~/.nano/javascript.nanorc
include ~/.nano/cython.nanorc
include ~/.nano/markdown.nanorc
include ~/.nano/mpdconf.nanorc
include ~/.nano/peg.nanorc
include ~/.nano/main.nanorc
include ~/.nano/po.nanorc
include ~/.nano/python.nanorc
include ~/.nano/makefile.nanorc
include ~/.nano/vi.nanorc
include ~/.nano/rpmspec.nanorc
include ~/.nano/yaml.nanorc
include ~/.nano/dot.nanorc
include ~/.nano/fish.nanorc
include ~/.nano/keymap.nanorc
include ~/.nano/lua.nanorc
include ~/.nano/php.nanorc
include ~/.nano/glsl.nanorc
include ~/.nano/csharp.nanorc
include ~/.nano/kickstart.nanorc
include ~/.nano/email.nanorc
include ~/.nano/coffeescript.nanorc
include ~/.nano/json.nanorc
include ~/.nano/privoxy.nanorc
include ~/.nano/ini.nanorc
include ~/.nano/patch.nanorc
include ~/.nano/import.nanorc
include ~/.nano/systemd.nanorc
include ~/.nano/nginx.nanorc
include ~/.nano/ledger.nanorc
include ~/.nano/awk.nanorc
include ~/.nano/sh.nanorc
include ~/.nano/ruby.nanorc
include ~/.nano/lisp.nanorc
include ~/.nano/cmake.nanorc
include ~/.nano/git.nanorc
include ~/.nano/html.nanorc
include ~/.nano/colortest.nanorc
include ~/.nano/xresources.nanorc
include ~/.nano/tex.nanorc
include ~/.nano/css.nanorc
include ~/.nano/go.nanorc
include ~/.nano/nanorc.nanorc
include ~/.nano/sql.nanorc
include ~/.nano/pkg-config.nanorc
include ~/.nano/man.nanorc
include ~/.nano/vala.nanorc
include ~/.nano/java.nanorc
include ~/.nano/yum.nanorc
include ~/.nano/inputrc.nanorc
include ~/.nano/pkgbuild.nanorc
include ~/.nano/xml.nanorc
include ~/.nano/sed.nanorc
include ~/.nano/c.nanorc
include ~/.nano/javascript.nanorc
include ~/.nano/cython.nanorc
include ~/.nano/markdown.nanorc
include ~/.nano/mpdconf.nanorc
include ~/.nano/peg.nanorc
include ~/.nano/main.nanorc
include ~/.nano/po.nanorc
include ~/.nano/python.nanorc
include ~/.nano/makefile.nanorc
include ~/.nano/vi.nanorc
include ~/.nano/rpmspec.nanorc
include ~/.nano/import.nanorc
11 changes: 11 additions & 0 deletions ini.nanorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
syntax "ini" "\.(ini|desktop|lfl|override)$" "(mimeapps\.list|pinforc|setup\.cfg)$" "weechat/.+\.conf$"
header "^\[[A-Za-z]+\]$"

color brightcyan "\<(true|false)\>"
color cyan "^[[:space:]]*[^=]*="
color brightmagenta "^[[:space:]]*\[.*\]$"
color red "[=;]"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " +"
10 changes: 10 additions & 0 deletions inputrc.nanorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
syntax "inputrc" "inputrc$"

color red "\<(off|none)\>"
color green "\<on\>"
color brightblue "\<set|\$include\>"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color magenta "\\.?"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " +"
23 changes: 23 additions & 0 deletions javascript.nanorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
syntax "JavaScript" "\.js$"

color blue "\<[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\>"
color blue "\<[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
color blue "\<[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
color black "[(]"
color cyan "\<(break|case|catch|continue|default|delete|do|else|finally)\>"
color cyan "\<(for|function|get|if|in|instanceof|new|return|set|switch)\>"
color cyan "\<(switch|this|throw|try|typeof|var|void|while|with)\>"
color cyan "\<(null|undefined|NaN)\>"
color brightcyan "\<(true|false)\>"
color green "\<(Array|Boolean|Date|Enumerator|Error|Function|Math)\>"
color green "\<(Number|Object|RegExp|String)\>"
color red "[-+/*=<>!~%?:&|]"
color magenta "/[^*]([^/]|(\\/))*[^\\]/[gim]*"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color magenta "\\[0-7][0-7]?[0-7]?|\\x[0-9a-fA-F]+|\\[bfnrt'"\?\\]"
color brightblack "(^|[[:space:]])//.*"
color brightblack start="/\*" end="\*/"
color brightwhite,cyan "TODO:?"
color ,green "[[:space:]]+$"
color ,red " +"
11 changes: 11 additions & 0 deletions json.nanorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
syntax "json" "\.json$"
header "^\{$"

color blue "\<[-]?[1-9][0-9]*([Ee][+-]?[0-9]+)?\>" "\<[-]?[0](\.[0-9]+)?\>"
color cyan "\<null\>"
color brightcyan "\<(true|false)\>"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightyellow "\"(\\"|[^"])*\"[[:space:]]*:" "'(\'|[^'])*'[[:space:]]*:"
color magenta "\\u[0-9a-fA-F]{4}|\\[bfnrt'"/\\]"
color ,green "[[:space:]]+$"
color ,red " +"
10 changes: 10 additions & 0 deletions keymap.nanorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
syntax "keymap" "\.(k|key)?map$|Xmodmap$"

color cyan "\<(add|clear|compose|keycode|keymaps|keysym|remove|string)\>"
color cyan "\<(control|alt|shift)\>"
color blue "\<[0-9]+\>"
color red "="
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightblack "^!.*$"
color ,green "[[:space:]]+$"
color ,red " +"
15 changes: 15 additions & 0 deletions kickstart.nanorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
syntax "KickStart" "\.ks$" "\.kickstart$"

color brightmagenta "%[a-z]+"
color cyan "^[[:space:]]*(install|cdrom|text|graphical|volgroup|logvol|reboot|timezone|lang|keyboard|authconfig|firstboot|rootpw|user|firewall|selinux|repo|part|partition|clearpart|bootloader)"
color cyan "--(name|mirrorlist|baseurl|utc)(=|\>)"
color brightyellow "\$(releasever|basearch)\>"

# Packages and groups
color brightblack "^@[A-Za-z][A-Za-z-]*"
color brightred "^-@[a-zA-Z0-9*-]+"
color red "^-[a-zA-Z0-9*-]+"

color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " +"
9 changes: 9 additions & 0 deletions ledger.nanorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
syntax "ledger" "(^|\.|/)ledger$"

color brightmagenta "^([0-9]{4}/[0-9]{2}/[0-9]{2}|[=~]) .*"
color blue "^[0-9]{4}/[0-9]{2}/[0-9]{2}"
color brightyellow "^~ .*"
color brightblue "^= .*"
color cyan "^[[:space:]]+\(?[A-Za-z ]+(:[A-Za-z ]+)*\)?"
color red "[*]"
color brightblack "^[[:space:]]*;.*"
14 changes: 14 additions & 0 deletions lisp.nanorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
syntax "lisp" "(emacs|zile)$" "\.(el|li?sp|scm|ss)$"

color brightblue "\([a-z-]+"
color red "\(([-+*/<>]|<=|>=)|'"
color black "\("
color blue "\<[0-9]+\>"
icolor cyan "\<nil\>"
color brightcyan "\<[tT]\>"
color yellow "\"(\\.|[^"])*\""
color magenta "'[A-Za-z][A-Za-z0-9_-]+"
color magenta "\\.?"
color brightblack "(^|[[:space:]]);.*"
color ,green "[[:space:]]+$"
color ,red " +"
22 changes: 22 additions & 0 deletions makefile.nanorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
syntax "makefile" "([Mm]akefile|\.ma?k)$"
header "^#!.*/(env +)?[bg]?make( |$)"

color cyan "\<(ifeq|ifdef|ifneq|ifndef|else|endif)\>"
color cyan "^(export|include|override)\>"
color brightmagenta "^[^:= ]+:"
color red "[=,%]" "\+=|\?=|:=|&&|\|\|"
color brightblue "\$\((abspath|addprefix|addsuffix|and|basename|call|dir)[[:space:]]"
color brightblue "\$\((error|eval|filter|filter-out|findstring|firstword)[[:space:]]"
color brightblue "\$\((flavor|foreach|if|info|join|lastword|notdir|or)[[:space:]]"
color brightblue "\$\((origin|patsubst|realpath|shell|sort|strip|suffix)[[:space:]]"
color brightblue "\$\((value|warning|wildcard|word|wordlist|words)[[:space:]]"
color black "[()$]"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightyellow "\$+(\{[^} ]+\}|\([^) ]+\))"
color brightyellow "\$[@^<*?%|+]|\$\([@^<*?%+-][DF]\)"
color magenta "\$\$|\\.?"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color brightblack "^ @#.*"

# Show trailing whitespace
color ,green "[[:space:]]+$"
9 changes: 9 additions & 0 deletions mpdconf.nanorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
syntax "mpdconf" "mpd\.conf$"

color cyan "\<(user|group|bind_to_address|host|port|plugin|name|type)\>"
color cyan "\<((music|playlist)_directory|(db|log|state|pid|sticker)_file)\>"
color brightmagenta "^(input|audio_output|decoder)[[:space:]]*\{|\}"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " +"
Loading

0 comments on commit e5cc8be

Please sign in to comment.