1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
|
# m_lua.fte
#
# Copyright (c) 2008, eFTE SF Group (see AUTHORS file)
#
# You may distribute under the terms of either the GNU General Public
# License or the Artistic License, as specified in the README file.
#
#
# eFTE mode for editing Lua files
#
colorize Lua {
SyntaxParser = "SIMPLE";
color {
{ "Normal", "Editor_Default" },
{ "Number", "Lang_DecimalNumber" },
{ "String", "Lang_String" },
{ "Comment", "Lang_Comment" },
{ "Regexp", "Lang_Regexp" },
{ "Punctuation", "Lang_Punctuation" },
{ "Command", "Lang_Command" },
{ "CPreprocessor", "Lang_Preprocessor" },
};
keyword "Editor_Keywords" {
"do", "end", "while", "repeat", "until", "if", "elseif", "then",
"else", "for", "in", "function", "local", "return",
"dofile", "require", "include"
};
keyword "Editor_Keywords2" {
"debug", "string", "math", "table", "io", "coroutine", "os"
};
keyword "Editor_Keywords3" {
# Io
"close", "flush", "input", "lines", "open", "output", "popen", "read", "tmpfile",
"type", "write",
# Math
"abs", "acos", "asin", "atan2", "atan", "ceil", "cosh", "cos", "deg", "exp", "floor",
"fmod", "frexp", "huge", "ldexp", "log10", "log", "max", "min", "modf", "pi", "pow",
"rad", "random", "randomseed", "sinh", "tan",
# OS
"clock", "date", "difftime", "execute", "exit", "getenv", "remove", "rename", "setlocale",
"time", "tmpname",
# Package
"cpath", "loaded", "loadlib", "path", "preload", "seeall",
# String
"byte", "char", "dump", "find", "format", "gmatch", "gsub", "len", "lower", "match",
"rep", "reverse", "sub", "upper",
# Table
"concat", "insert", "maxn", "remove", "sort",
# Coroutine
"create", "resume", "running", "status", "wrap", "yield",
# Debug
"debug", "getfenv", "gethook", "getinfo", "getlocal", "getmetatable", "getregistry",
"getupvalue", "setfenv", "sethook", "setlocal", "setmetatable", "setupvalue",
"traceback"
};
keyword "Editor_Keywords4" {
":close", ":flush", ":lines", ":read", ":seek", ":setvbuf", ":write"
};
keyword "Editor_Keywords5" {
"false", "nil", "true",
};
h_state 0 { "Normal" }
h_trans { 1, "", "--", "Comment" }
h_trans { 2, "", "\"", "String" }
h_trans { 3, "", "\'", "String" }
h_trans { 4, "s", "0-9", "Number" }
h_trans { 5, "^", "=start", "Comment" }
h_trans { 0, "S", "a-zA-Z0-9_%", "Punctuation" }
h_wtype { 0, 0, 0, "", "a-zA-Z0-9_" }
h_state 1 { "Comment" }
h_trans { 0, "$", "", "Normal" }
h_state 2 { "String" }
h_trans { 0, "", "\"", "String" }
h_trans { 2, "Qq", "\\", "String" }
h_state 3 { "String" }
h_trans { 0, "", "\'", "String" }
h_trans { 3, "Qq", "\\", "String" }
h_state 4 { "Number" }
h_trans { 0, "-S", "0-9", "Normal" }
h_trans { 0, "$", "", "Normal" }
h_state 5 { "Comment" }
h_trans { 0, "^", "=end", "Comment" }
}
mode Lua: SOURCE {
FileNameRx = /\.\clua$/;
Colorizer = "Lua";
HilitOn = 1;
AutoIndent = 1;
IndentMode = "PLAIN";
MatchCase = 1;
MultiLineHilit = 1;
AutoHilitParen = 1;
SaveFolds = 2;
CommentStart = "--";
CommentEnd = "";
RoutineRegexp = /^\s*{local }*function /;
}
oinclude "mym_lua.fte";
|