1
0
mirror of https://github.com/scopatz/nanorc synced 2024-11-23 09:05:39 +01:00

* NanoRC Files: Copy linter and magic from nano 4.6 configs

This commit is contained in:
Zach DeCook 2019-12-18 11:20:31 -05:00
parent 97f06f6c73
commit db98b9f1b5
17 changed files with 26 additions and 0 deletions

View File

@ -1,6 +1,7 @@
## Here is an example for assembler. ## Here is an example for assembler.
## ##
syntax "ASM" "\.(S|s|asm)$" syntax "ASM" "\.(S|s|asm)$"
magic "assembler source"
comment "//" comment "//"
color red "\<[A-Z_]{2,}\>" color red "\<[A-Z_]{2,}\>"

View File

@ -1,5 +1,6 @@
syntax "AWK" "\.awk$" syntax "AWK" "\.awk$"
header "^#!.*bin/(env +)?awk( |$)" header "^#!.*bin/(env +)?awk( |$)"
magic "awk script"
comment "#" comment "#"
color brightyellow "\$[A-Za-z0-9_!@#$*?-]+" color brightyellow "\$[A-Za-z0-9_!@#$*?-]+"

View File

@ -1,6 +1,7 @@
## Here is an example for C/C++. ## Here is an example for C/C++.
## ##
syntax "C" "\.(c(c|pp|xx)?|C)$" "\.(h(h|pp|xx)?|H)$" "\.ii?$" "\.(def)$" syntax "C" "\.(c(c|pp|xx)?|C)$" "\.(h(h|pp|xx)?|H)$" "\.ii?$" "\.(def)$"
magic "^(C|C\+\+) (source|program)"
comment "//" comment "//"
color brightred "\<[A-Z_][0-9A-Z_]+\>" color brightred "\<[A-Z_][0-9A-Z_]+\>"
color green "\<(float|double|bool|char|wchar_t|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\>" color green "\<(float|double|bool|char|wchar_t|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\>"

View File

@ -1,6 +1,7 @@
## Here is an example for Java. ## Here is an example for Java.
## ##
syntax "Java" "\.java$" syntax "Java" "\.java$"
magic "Java "
comment "//" comment "//"
color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>" color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>"

View File

@ -13,8 +13,11 @@
# Automatically use for '.lua' files # Automatically use for '.lua' files
syntax "Lua" ".*\.lua$" syntax "Lua" ".*\.lua$"
magic "Lua script"
comment "--" comment "--"
linter luacheck --no-color
# General # General
color brightwhite ".+" color brightwhite ".+"

View File

@ -1,5 +1,6 @@
syntax "Makefile" "([Mm]akefile|\.ma?k)$" syntax "Makefile" "([Mm]akefile|\.ma?k)$"
header "^#!.*/(env +)?[bg]?make( |$)" header "^#!.*/(env +)?[bg]?make( |$)"
magic "makefile script"
comment "#" comment "#"
color cyan "\<(ifeq|ifdef|ifneq|ifndef|else|endif)\>" color cyan "\<(ifeq|ifdef|ifneq|ifndef|else|endif)\>"

View File

@ -1,6 +1,7 @@
## Here is an example for manpages. ## Here is an example for manpages.
## ##
syntax "Man" "\.[1-9]x?$" syntax "Man" "\.[1-9]x?$"
magic "troff or preprocessor input"
comment ".\"" comment ".\""
color green "\.(S|T)H.*$" color green "\.(S|T)H.*$"

View File

@ -1,6 +1,7 @@
## Syntax highlighting for OCaml. ## Syntax highlighting for OCaml.
syntax "OCaml" "\.mli?$" syntax "OCaml" "\.mli?$"
magic "OCaml"
comment "(*|*)" comment "(*|*)"
#uid #uid

View File

@ -1,6 +1,7 @@
## Here is an example for patch files. ## Here is an example for patch files.
## ##
syntax "Patch" "\.(patch|diff)$" syntax "Patch" "\.(patch|diff)$"
magic "diff output"
# You can't add comments in patch files. # You can't add comments in patch files.
comment "" comment ""

View File

@ -2,6 +2,7 @@
## ##
syntax "Perl" "\.p[lm]$" syntax "Perl" "\.p[lm]$"
header "^#!.*/(env +)?perl( |$)" header "^#!.*/(env +)?perl( |$)"
magic "Perl script"
comment "#" comment "#"
color red "\<(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork))\>" "\<(get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join)\>" "\<(keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek(dir)?)\>" "\<(se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr(y)?|truncate|umask)\>" "\<(un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\>" color red "\<(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork))\>" "\<(get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join)\>" "\<(keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek(dir)?)\>" "\<(se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr(y)?|truncate|umask)\>" "\<(un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\>"

View File

@ -1,5 +1,6 @@
## PHP Syntax Highlighting ## PHP Syntax Highlighting
syntax "PHP" "\.php[2345s~]?$" syntax "PHP" "\.php[2345s~]?$"
magic "PHP script"
comment "//" comment "//"
color white start="<\?(php|=)?" end="\?>" color white start="<\?(php|=)?" end="\?>"
# Functions # Functions

View File

@ -5,6 +5,8 @@ header "^#!.*/(env +)?python[-0-9._]*( |$)"
magic "Python script" magic "Python script"
comment "#" comment "#"
linter pyflakes
## built-in objects ## built-in objects
color cyan "\<(None|self|True|False)\>" color cyan "\<(None|self|True|False)\>"
## built-in attributes ## built-in attributes

View File

@ -2,6 +2,8 @@
## ##
syntax "Ruby" "\.rb$" "Gemfile" "config.ru" "Rakefile" "Capfile" "Vagrantfile" syntax "Ruby" "\.rb$" "Gemfile" "config.ru" "Rakefile" "Capfile" "Vagrantfile"
header "^#!.*/(env +)?ruby( |$)" header "^#!.*/(env +)?ruby( |$)"
magic "Ruby script"
linter ruby -w -c
comment "#" comment "#"
## Asciibetical list of reserved words ## Asciibetical list of reserved words

View File

@ -2,8 +2,11 @@
## ##
syntax "SH" "\.sh$" "\.bashrc" "bashrc" "\.bash_aliases" "bash_aliases" "\.bash_functions" "bash_functions" "\.bash_login" "\.bash_logout" "\.bash_profile" "bash_profile" "\.profile" "revise\..+$" syntax "SH" "\.sh$" "\.bashrc" "bashrc" "\.bash_aliases" "bash_aliases" "\.bash_functions" "bash_functions" "\.bash_login" "\.bash_logout" "\.bash_profile" "bash_profile" "\.profile" "revise\..+$"
header "^#!.*/(env +)?(ba)?sh( |$)" header "^#!.*/(env +)?(ba)?sh( |$)"
magic "(POSIX|Bourne-Again) shell script.*text"
comment "#" comment "#"
linter dash -n
## keywords: ## keywords:
color green "\<(case|do|done|elif|else|esac|fi|for|function|if|in|select|then|time|until|while)\>" color green "\<(case|do|done|elif|else|esac|fi|for|function|if|in|select|then|time|until|while)\>"
color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"

View File

@ -1,6 +1,7 @@
syntax "TCL" "\.tcl$" syntax "TCL" "\.tcl$"
header "^#!.*/(env +)?tclsh( |$)" header "^#!.*/(env +)?tclsh( |$)"
magic "Tcl(/Tk)? script"
comment "#" comment "#"
## Standard Tcl [info commands] ## Standard Tcl [info commands]

View File

@ -1,8 +1,11 @@
## Here is a short example for TeX files. ## Here is a short example for TeX files.
## ##
syntax "TeX" "\.tex$" "bib" "\.bib$" "cls" "\.cls$" syntax "TeX" "\.tex$" "bib" "\.bib$" "cls" "\.cls$"
magic "(La)?TeX document"
comment "%" comment "%"
linter chktex -v0 -q -I
color yellow "\$(\\\$|[^$])*[^\\]\$" color yellow "\$(\\\$|[^$])*[^\\]\$"
color yellow "\$\$(\\\$|[^$])*[^\\]\$\$" color yellow "\$\$(\\\$|[^$])*[^\\]\$\$"
icolor green "\\.|\\[A-Z]*" icolor green "\\.|\\[A-Z]*"

View File

@ -2,6 +2,8 @@
## ##
syntax "XML" ".*\.([jrs]?html?|xml|sgml?|rng)$" syntax "XML" ".*\.([jrs]?html?|xml|sgml?|rng)$"
header "<\?xml.*version=.*\?>"
magic "(XML|SGML) (sub)?document"
comment "<!--|-->" comment "<!--|-->"
color white "^.+$" color white "^.+$"
color green start="<" end=">" color green start="<" end=">"