2011-05-08 Chris Allegretta <chrisa@asty.org>
* doc/syntax/Makefile.am: Finally get around to sorting the syntax file list 2011-05-08 Matthew Wild <mattj100@Savannah> * doc/syntax/spec.nanorc: New lua syntax highlighting config git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4543 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
7a707670d6
commit
090e2cf726
|
@ -1,5 +1,11 @@
|
||||||
|
2011-05-08 Chris Allegretta <chrisa@asty.org>
|
||||||
|
* doc/syntax/Makefile.am: Finally get around to sorting the syntax file list
|
||||||
|
|
||||||
|
2011-05-08 Matthew Wild <mattj100@Savannah>
|
||||||
|
* doc/syntax/spec.nanorc: New lua syntax highlighting config
|
||||||
|
|
||||||
2011-03-28 Asterios Dramis <asterios.dramis@gmail.com>
|
2011-03-28 Asterios Dramis <asterios.dramis@gmail.com>
|
||||||
* doc/syntax/spec.nanorc: New RPM spec file highlighting file
|
* doc/syntax/spec.nanorc: New RPM spec file highlighting config
|
||||||
|
|
||||||
2011-03-12 Chris Allegretta <chrisa@asty.org>
|
2011-03-12 Chris Allegretta <chrisa@asty.org>
|
||||||
* po/*: Sync latest translation fixes, add an update_linguas.sh script. Rename
|
* po/*: Sync latest translation fixes, add an update_linguas.sh script. Rename
|
||||||
|
|
|
@ -1,31 +1,32 @@
|
||||||
pkgdata_DATA = asm.nanorc \
|
pkgdata_DATA = asm.nanorc \
|
||||||
c.nanorc \
|
awk.nanorc \
|
||||||
cmake.nanorc \
|
cmake.nanorc \
|
||||||
|
c.nanorc \
|
||||||
|
css.nanorc \
|
||||||
|
debian.nanorc \
|
||||||
|
fortran.nanorc \
|
||||||
|
gentoo.nanorc \
|
||||||
groff.nanorc \
|
groff.nanorc \
|
||||||
html.nanorc \
|
html.nanorc \
|
||||||
java.nanorc \
|
java.nanorc \
|
||||||
|
lua.nanorc \
|
||||||
|
makefile.nanorc \
|
||||||
man.nanorc \
|
man.nanorc \
|
||||||
|
mgp.nanorc \
|
||||||
mutt.nanorc \
|
mutt.nanorc \
|
||||||
nanorc.nanorc \
|
nanorc.nanorc \
|
||||||
|
objc.nanorc \
|
||||||
|
ocaml.nanorc \
|
||||||
patch.nanorc \
|
patch.nanorc \
|
||||||
perl.nanorc \
|
perl.nanorc \
|
||||||
|
php.nanorc \
|
||||||
pov.nanorc \
|
pov.nanorc \
|
||||||
python.nanorc \
|
python.nanorc \
|
||||||
ruby.nanorc \
|
ruby.nanorc \
|
||||||
sh.nanorc \
|
sh.nanorc \
|
||||||
tex.nanorc \
|
spec.nanorc \
|
||||||
tcl.nanorc \
|
tcl.nanorc \
|
||||||
php.nanorc \
|
tex.nanorc \
|
||||||
gentoo.nanorc \
|
xml.nanorc
|
||||||
debian.nanorc \
|
|
||||||
awk.nanorc \
|
|
||||||
css.nanorc \
|
|
||||||
xml.nanorc \
|
|
||||||
ocaml.nanorc \
|
|
||||||
objc.nanorc \
|
|
||||||
fortran.nanorc \
|
|
||||||
makefile.nanorc \
|
|
||||||
mgp.nanorc \
|
|
||||||
spec.nanorc
|
|
||||||
|
|
||||||
EXTRA_DIST = $(pkgdata_DATA)
|
EXTRA_DIST = $(pkgdata_DATA)
|
||||||
|
|
|
@ -0,0 +1,76 @@
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Lua syntax highlighting for Nano.
|
||||||
|
#
|
||||||
|
# Author: Matthew Wild <mwild1 (at) gmail.com>
|
||||||
|
# License: GPL 3 or later
|
||||||
|
#
|
||||||
|
# Version: 2011-05-05
|
||||||
|
#
|
||||||
|
# Notes: Originally based on Ruby syntax rc by Josef 'Jupp' Schugt
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
# Automatically use for '.lua' files
|
||||||
|
syntax "lua" "\.lua$"
|
||||||
|
|
||||||
|
color brightwhite "\[\[.*\]\]"
|
||||||
|
|
||||||
|
# Operators
|
||||||
|
color brightyellow ":|\*|/|%|\+|-|\^|>|>=|<|<=|~=|=|\.\.|\<(not|and|or)\>"
|
||||||
|
|
||||||
|
# Statements
|
||||||
|
color brightblue "\<(do|end|while|repeat|until|if|elseif|then|else|for|in|function|local|return|break)\>"
|
||||||
|
|
||||||
|
# Keywords
|
||||||
|
color brightyellow "\<(debug|string|math|table|io|coroutine|os)\>\."
|
||||||
|
color brightyellow "\<(_G|_VERSION|assert|collectgarbage|dofile|error|getfenv|getmetatable|ipairs|load|loadfile|module|next|pairs|pcall|print|rawequal|rawget|rawset|require|select|setfenv|setmetatable|tonumber|tostring|type|unpack|xpcall)\s*\("
|
||||||
|
|
||||||
|
# Standard library
|
||||||
|
color brightyellow "io\.\<(close|flush|input|lines|open|output|popen|read|tmpfile|type|write|stdin|stdout|stderr)\>"
|
||||||
|
color brightyellow "math\.\<(abs|acos|asin|atan2|atan|ceil|cosh|cos|deg|exp|floor|fmod|frexp|huge|ldexp|log10|log|max|min|mod|modf|pi|pow|rad|random|randomseed|sinh|tan)\>"
|
||||||
|
color brightyellow "os\.\<(clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)\>"
|
||||||
|
color brightyellow "package\.\<(cpath|loaded|loadlib|path|preload|seeall)\>"
|
||||||
|
color brightyellow "string\.\<(byte|char|dump|find|format|gmatch|gsub|len|lower|match|rep|reverse|sub|upper)\>"
|
||||||
|
color brightyellow "table\.\<(concat|insert|maxn|remove|sort)\>"
|
||||||
|
color brightyellow "coroutine\.\<(create|resume|running|status|wrap|yield)\>"
|
||||||
|
color brightyellow "debug\.\<(debug|getfenv|gethook|getinfo|getlocal|getmetatable|getregistry|getupvalue|setfenv|sethook|setlocal|setmetatable|setupvalue|traceback)\>"
|
||||||
|
|
||||||
|
# File handle methods
|
||||||
|
color brightyellow "\:\<(close|flush|lines|read|seek|setvbuf|write)\>"
|
||||||
|
|
||||||
|
# false, nil, true
|
||||||
|
color brightmagenta "\<(false|nil|true)\>"
|
||||||
|
|
||||||
|
# External files
|
||||||
|
color brightgreen "\<(dofile|require)\>"
|
||||||
|
|
||||||
|
# Numbers
|
||||||
|
color red "\<([0-9]+)\>"
|
||||||
|
|
||||||
|
# Symbols
|
||||||
|
color brightmagenta "(\(|\)|\[|\]|\{|\})"
|
||||||
|
|
||||||
|
|
||||||
|
# Shebang
|
||||||
|
color brightcyan "^#!.*"
|
||||||
|
|
||||||
|
# Simple comments
|
||||||
|
color green "\-\-.*$"
|
||||||
|
|
||||||
|
# Multiline comments
|
||||||
|
color green start="\-\-\[\[" end="\]\]"
|
||||||
|
|
||||||
|
# Strings
|
||||||
|
#color green "\"(\\.|[^\\\"])*\"|'(\\.|[^\\'])*'"
|
||||||
|
|
||||||
|
# Strings
|
||||||
|
color red "\"(\\.|[^\\\"])*\"|'(\\.|[^\\'])*'"
|
||||||
|
|
||||||
|
# color red start="\[\[" end="\]\]"
|
||||||
|
|
||||||
|
|
||||||
|
# Hex literals
|
||||||
|
color red "0x[0-9a-fA-F]*"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue