Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion extensions/lua/cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"git": {
"name": "sumneko/lua.tmbundle",
"repositoryUrl": "https://github.com/sumneko/lua.tmbundle",
"commitHash": "1483add845ebfb3e1e631fe372603e5fed2cdd42"
"commitHash": "ec2f07535da6cec62a6b98aa19622b4f40fa952a"
}
},
"licenseDetail": [
Expand Down
35 changes: 29 additions & 6 deletions extensions/lua/syntaxes/lua.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/sumneko/lua.tmbundle/commit/1483add845ebfb3e1e631fe372603e5fed2cdd42",
"version": "https://github.com/sumneko/lua.tmbundle/commit/ec2f07535da6cec62a6b98aa19622b4f40fa952a",
"name": "Lua",
"scopeName": "source.lua",
"patterns": [
Expand All @@ -31,7 +31,7 @@
"name": "punctuation.definition.parameters.begin.lua"
}
},
"end": "(\\))|(?=[\\-\\.{}\\[\\]\"'])",
"end": "(\\))|(?=[\\-{}\\[\\]\"'])|(?<!\\.)\\.(?!\\.)",
"endCaptures": {
"1": {
"name": "punctuation.definition.parameters.finish.lua"
Expand All @@ -42,6 +42,17 @@
{
"include": "#comment"
},
{
"match": "(\\.{3})\\s*([a-zA-Z_][a-zA-Z0-9_]*)",
"captures": {
"1": {
"name": "constant.language.lua"
},
"2": {
"name": "variable.parameter.function.lua"
}
}
},
{
"match": "[a-zA-Z_][a-zA-Z0-9_]*",
"name": "variable.parameter.function.lua"
Expand Down Expand Up @@ -158,6 +169,14 @@
"match": "\\b(local)\\b",
"name": "keyword.local.lua"
},
{
"match": "^\\s*(global)\\b(?!\\s*=)",
"captures": {
"1": {
"name": "keyword.global.lua"
}
}
},
{
"match": "\\b(function)\\b(?![,:])",
"name": "keyword.control.lua"
Expand All @@ -179,13 +198,17 @@
"name": "entity.name.tag.lua"
},
{
"match": "(?<![^.]\\.|:)\\b(coroutine\\.(create|isyieldable|close|resume|running|status|wrap|yield)|string\\.(byte|char|dump|find|format|gmatch|gsub|len|lower|match|pack|packsize|rep|reverse|sub|unpack|upper)|table\\.(concat|insert|maxn|move|pack|remove|sort|unpack)|math\\.(abs|acos|asin|atan2?|ceil|cosh?|deg|exp|floor|fmod|frexp|ldexp|log|log10|max|min|modf|pow|rad|random|randomseed|sinh?|sqrt|tanh?|tointeger|type)|io\\.(close|flush|input|lines|open|output|popen|read|tmpfile|type|write)|os\\.(clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)|package\\.(loadlib|seeall|searchpath)|debug\\.(debug|[gs]etfenv|[gs]ethook|getinfo|[gs]etlocal|[gs]etmetatable|getregistry|[gs]etupvalue|[gs]etuservalue|set[Cc]stacklimit|traceback|upvalueid|upvaluejoin)|bit32\\.(arshift|band|bnot|bor|btest|bxor|extract|replace|lrotate|lshift|rrotate|rshift)|utf8\\.(char|codes|codepoint|len|offset))\\b(?!\\s*=(?!=))",
"match": "(?<![^.]\\.|:)\\b(coroutine\\.(create|isyieldable|close|resume|running|status|wrap|yield)|string\\.(byte|char|dump|find|format|gmatch|gsub|len|lower|match|pack|packsize|rep|reverse|sub|unpack|upper)|table\\.(concat|create|insert|maxn|move|pack|remove|sort|unpack)|math\\.(abs|acos|asin|atan2?|ceil|cosh?|deg|exp|floor|fmod|frexp|ldexp|log|log10|max|min|modf|pow|rad|random|randomseed|sinh?|sqrt|tanh?|tointeger|type)|io\\.(close|flush|input|lines|open|output|popen|read|tmpfile|type|write)|os\\.(clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)|package\\.(loadlib|seeall|searchpath)|debug\\.(debug|[gs]etfenv|[gs]ethook|getinfo|[gs]etlocal|[gs]etmetatable|getregistry|[gs]etupvalue|[gs]etuservalue|set[Cc]stacklimit|traceback|upvalueid|upvaluejoin)|bit32\\.(arshift|band|bnot|bor|btest|bxor|extract|replace|lrotate|lshift|rrotate|rshift)|utf8\\.(char|codes|codepoint|len|offset))\\b(?!\\s*=(?!=))",
"name": "support.function.library.lua"
},
{
"match": "\\b(and|or|not|\\|\\||\\&\\&|\\!)\\b",
"match": "\\b(\\|\\||\\&\\&|\\!)\\b",
"name": "keyword.operator.lua"
},
{
"match": "\\b(and|or|not)\\b",
"name": "keyword.operator.logical.lua"
},
{
"match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?=\\s*(?:[({\"']|\\[\\[))",
"name": "support.function.any-method.lua"
Expand Down Expand Up @@ -900,11 +923,11 @@
"end": "(?=[\\s#])",
"patterns": [
{
"match": "[\\(\\),:\\?][ \\t]*",
"match": "[\\(\\),\\:\\?\\[\\]\\<\\>\\,][ \\t]*",
"name": "keyword.operator.lua"
},
{
"match": "([a-zA-Z_][a-zA-Z0-9_\\.\\*\\[\\]\\<\\>\\,\\-]*)(?<!,)[ \\t]*(?=\\??:)",
"match": "([a-zA-Z_][a-zA-Z0-9_\\.\\*\\-]*)(?<!,)[ \\t]*(?=\\??:)",
"name": "entity.name.variable.lua"
},
{
Expand Down