mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-16 22:07:09 +09:00
Add some Lua syntax (#962)
* Add some missing Lua string syntax All Lua strings have the string functions inside of them. '...you can use the string functions in object-oriented style' See '6.4 – String Manipulation' in https://www.lua.org/manual/5.3/manual.html * Lua - Highlight self and TODO/NOTE/FIXME * Add Lua 'arg' and triple-dot syntax
This commit is contained in:
@@ -18,11 +18,12 @@ rules:
|
||||
- identifier: "coroutine\\.\\b(create|isyieldable|resume|running|status|wrap|yield)\\b"
|
||||
- identifier: "debug\\.\\b(debug|getfenv|gethook|getinfo|getlocal|getmetatable|getregistry|getupvalue|getuservalue|setfenv|sethook|setlocal|setmetatable|setupvalue|setuservalue|traceback|upvalueid|upvaluejoin)\\b"
|
||||
- identifier: "bit32\\.\\b(arshift|band|bnot|bor|btest|bxor|extract|replace|lrotate|lshift|rrotate|rshift)\\b"
|
||||
- identifier: "\\:\\b(close|flush|lines|read|seek|setvbuf|write)\\b"
|
||||
- identifier: "\\:\\b(close|flush|lines|read|seek|setvbuf|write|byte|char|dump|find|format|gmatch|gsub|len|lower|match|pack|packsize|rep|reverse|sub|unpack|upper)\\b"
|
||||
- identifier: "\\b(self|arg)\\b"
|
||||
- constant: "\\b(false|nil|true)\\b"
|
||||
- statement: "(\\b(dofile|require|include)|%q|%!|%Q|%r|%x)\\b"
|
||||
- constant.number: "\\b([0-9]+)\\b"
|
||||
- symbol: "(\\(|\\)|\\[|\\]|\\{|\\}|\\*\\*|\\*|/|%|\\+|-|\\^|>|>=|<|<=|~=|=|\\.\\.|#)"
|
||||
- symbol: "(\\(|\\)|\\[|\\]|\\{|\\}|\\*\\*|\\*|/|%|\\+|-|\\^|>|>=|<|<=|~=|=|[\\.]{2,3}|#)"
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
@@ -50,11 +51,12 @@ rules:
|
||||
start: "\\-\\-\\[(\\=*|\\#*)\\["
|
||||
end: "\\-\\-\\](\\=*|\\#*)\\]"
|
||||
rules:
|
||||
- todo: "(TODO|XXX|FIXME):?"
|
||||
- todo: "(TODO|NOTE|FIXME):?"
|
||||
|
||||
# this has to go after block comment or block comment does not work
|
||||
|
||||
- comment:
|
||||
start: "\\-\\-"
|
||||
end: "$"
|
||||
rules: []
|
||||
rules:
|
||||
- todo: "(TODO|NOTE|FIXME):?"
|
||||
|
||||
Reference in New Issue
Block a user