luaforwindows/SciTE/lua.properties

165 lines
6.6 KiB
Properties
Executable File

# Define SciTE settings for Lua files.
file.patterns.lua=*.lua;*.wlua;*.lexe;*.glua;*.gluaw;*.mlua;*.clua
shbang.lua=lua
filter.lua=Lua (lua)|$(file.patterns.lua)|
lexer.$(file.patterns.lua)=lua
open.suffix.*.lua=.lua
openpath.$(file.patterns.lua)=$(lua.directory)\lua
word.chars.lua=$(chars.alpha)$(chars.numeric)$(chars.accented)_%
word.characters.$(file.patterns.lua)=$(word.chars.lua)
api.$(file.patterns.lua)=$(SciteDefaultHome)\lualib5_annot.api
calltip.lua.word.characters=.:$(word.chars.lua)
calltip.lua.end.definition=)
keywordclass.lua=and break do else elseif end false for function if \
in local nil not or repeat return then true until while
keywords.$(file.patterns.lua)=$(keywordclass.lua)
# Basic Functions (in both versions of Lua)
keywordclass2.lua=_VERSION assert collectgarbage dofile error gcinfo loadfile loadstring \
print rawget rawset require tonumber tostring type unpack
#### Lua 4.0
# Basic Functions
keywordclass2.lua4=_ALERT _ERRORMESSAGE _INPUT _PROMPT _OUTPUT \
_STDERR _STDIN _STDOUT call dostring foreach foreachi getn globals newtype \
sort tinsert tremove
# String Manipulation & Mathematical Functions
keywordclass3.lua4=abs acos asin atan atan2 ceil cos deg exp \
floor format frexp gsub ldexp log log10 max min mod rad random randomseed \
sin sqrt strbyte strchar strfind strlen strlower strrep strsub strupper tan
# Input and Output Facilities & System Facilities
keywordclass4.lua4=openfile closefile readfrom writeto appendto \
remove rename flush seek tmpfile tmpname read write \
clock date difftime execute exit getenv setlocale time
#### Lua 5.0
# Basic Functions
keywordclass2.lua5=_G getfenv getmetatable ipairs loadlib next pairs pcall \
rawequal setfenv setmetatable xpcall \
string table math coroutine io os debug \
load module select
# I put the library names here, so when highlighted standalone, they are probably variable name from Lua 4.0 times.
# Last line -> Lua 5.1 functions
# String Manipulation, Table Manipulation, Mathematical Functions (string & table & math)
keywordclass3.lua5=string.byte string.char string.dump string.find string.len \
string.lower string.rep string.sub string.upper string.format string.gfind string.gsub \
table.concat table.foreach table.foreachi table.getn table.sort table.insert table.remove table.setn \
math.abs math.acos math.asin math.atan math.atan2 math.ceil math.cos math.deg math.exp \
math.floor math.frexp math.ldexp math.log math.log10 math.max math.min math.mod \
math.pi math.pow math.rad math.random math.randomseed math.sin math.sqrt math.tan \
string.gmatch string.match string.reverse table.maxn \
math.cosh math.fmod math.modf math.sinh math.tanh math.huge
# Last 2 lines -> Lua 5.1 functions
# Coroutine Manipulation, Input and Output Facilities, System Facilities (coroutine & io & os)
keywordclass4.lua5=coroutine.create coroutine.resume coroutine.status \
coroutine.wrap coroutine.yield \
io.close io.flush io.input io.lines io.open io.output io.read io.tmpfile io.type io.write \
io.stdin io.stdout io.stderr \
os.clock os.date os.difftime os.execute os.exit os.getenv os.remove os.rename \
os.setlocale os.time os.tmpname \
coroutine.running package.cpath package.loaded package.loadlib package.path \
package.preload package.seeall io.popen
# Last 2 lines -> Lua 5.1 functions
# debug.debug debug.getfenv debug.gethook debug.getinfo debug.getlocal
# debug.getmetatable debug.getregistry debug.getupvalue debug.setfenv
# debug.sethook debug.setlocal debug.setmetatable debug.setupvalue debug.traceback
# I keep keywords5, 6, 7 & 8 for other libraries
# To make the change from Lua 4 to Lua 5 as smooth as possible, I made these properties
# modular and flexible.
# If you use only Lua 4, you can remove the lua5 keywords.
# If you use only Lua 5, you can either remove the lua4 keywords, or put them
# in another property to highlight them in a warning/error style.
# If you still use both, you can keep them like below, or use separate styles.
keywords2.$(file.patterns.lua)=$(keywordclass2.lua) $(keywordclass2.lua4) $(keywordclass2.lua5)
keywords3.$(file.patterns.lua)=$(keywordclass3.lua4) $(keywordclass3.lua5)
keywords4.$(file.patterns.lua)=$(keywordclass4.lua4) $(keywordclass4.lua5)
#~ statement.indent.$(file.patterns.lua)=5 do else function then
#~ statement.lookback.$(file.patterns.lua)=20
indent.maintain.$(file.patterns.lua)=1
comment.block.lua=--~
comment.block.at.line.start.lua=1
# Lua styles
#lua.stdstyle.blockcommentbg=1
#lua.stdstyle.mlstringbg=1
luastyle.blockcomment1=$(stdstyle.comment1)
luastyle.blockcomment2=$(stdstyle.comment2)
if lua.stdstyle.blockcommentbg
luastyle.blockcomment1=$(stdstyle.comment1),$(stdstyle.comment1.bg)
luastyle.blockcomment2=$(stdstyle.comment2),$(stdstyle.comment2.bg)
luastyle.mlstring1=$(stdstyle.mlstring1)
if lua.stdstyle.mlstringbg
luastyle.mlstring1=$(stdstyle.mlstring1),$(stdstyle.mlstring1.bg)
#Default
style.lua.32=$(stdstyle.default)
# White space: Visible only in View Whitespace mode (or if it has a back colour)
style.lua.0=$(stdstyle.whitespace)
# Block comment (Lua 5.0)
style.lua.1=$(luastyle.blockcomment1)
# Line comment
style.lua.2=$(stdstyle.eolcomment1)
# Doc comment -- Not used in Lua (yet?)
style.lua.3=$(stdstyle.doccomment1)
# Number
style.lua.4=$(stdstyle.number1)
# Keyword
style.lua.5=$(stdstyle.keyword1)
# (Double quoted) String
style.lua.6=$(stdstyle.string1)
# Character (Single quoted string)
style.lua.7=$(stdstyle.string1)
# Literal string
style.lua.8=$(luastyle.mlstring1)
# Preprocessor (obsolete in Lua 4.0 and up)
style.lua.9=$(stdstyle.preprocessor1)
# Operators
style.lua.10=$(stdstyle.operator1)
# Identifier (everything else...)
style.lua.11=$(stdstyle.default)
# End of line where string is not closed
style.lua.12=$(stdstyle.stringerror)
# Other keywords (bozo test colors, but toned down ;)
style.lua.13=$(stdstyle.keyword2)
style.lua.14=$(stdstyle.keyword3)
style.lua.15=$(stdstyle.keyword4)
style.lua.16=$(stdstyle.keyword2)
style.lua.17=$(stdstyle.keyword3)
style.lua.18=$(stdstyle.keyword4)
style.lua.19=$(stdstyle.keyword2)
# Braces are only matched in operator style
braces.lua.style=10
# compatible with LuaBinaries for Lua 5.1; will work on both platforms.
command.compile.*.lua=luac -o "$(FileName).luac" "$(FileNameExt)"
# Lua 5.1
command.go.*.lua=lua -e "io.stdout:setvbuf 'no'" "$(FileNameExt)"
command.go.*.mlua=metalua.bat "$(FileNameExt)"
command.go.*.wlua=wlua "$(FileNameExt)"
command.go.subsystem.*.wlua=1
command.build.*.lexe=lua -e "io.stdout:setvbuf 'no'" "$(FileNameExt)"
command.go.*.lexe=wlua "$(lua.directory)\lExecutor.wlua" "$(FileNameExt)"
command.go.subsystem.*.lexe=1
# Lua 4.0
#command.go.*.lua=Lua-4.0.exe -c -f "$(FileNameExt)"