{"id":13895342,"url":"https://github.com/Azganoth/language-lua-plus","last_synced_at":"2025-07-17T11:30:28.920Z","repository":{"id":32519117,"uuid":"135934093","full_name":"Azganoth/language-lua-plus","owner":"Azganoth","description":"Lua grammar and snippets for Atom.","archived":false,"fork":false,"pushed_at":"2022-03-24T11:08:34.000Z","size":159,"stargazers_count":6,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-16T04:11:36.279Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Azganoth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-03T19:30:38.000Z","updated_at":"2022-06-13T13:36:31.000Z","dependencies_parsed_at":"2022-08-07T17:32:10.140Z","dependency_job_id":null,"html_url":"https://github.com/Azganoth/language-lua-plus","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azganoth%2Flanguage-lua-plus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azganoth%2Flanguage-lua-plus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azganoth%2Flanguage-lua-plus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azganoth%2Flanguage-lua-plus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Azganoth","download_url":"https://codeload.github.com/Azganoth/language-lua-plus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226255390,"owners_count":17595859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-06T18:02:08.714Z","updated_at":"2024-11-25T00:31:27.249Z","avatar_url":"https://github.com/Azganoth.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Language Lua Plus\n\nLua grammar and snippets for Atom.\n\n## Suggestions: Lua Keywords and Constructs\n\n`return`\n```lua\nreturn\n```\n\n`do`\n```lua\ndo\n»\nend\n```\n\n`if`\n```lua\nif not condition then\n»\nend\n```\n\n`ifel`\n```lua\nif not condition then\n»\nelse\n»\nend\n```\n\n`elseif`\n```lua\nelseif not condition then\n»\n```\n\n`else`\n```lua\nelse\n»\n```\n\n`while`\n```lua\nwhile not condition do\n»\nend\n```\n\n`repeat`\n```lua\nrepeat\n»\nuntil not condition\n```\n\n`for`\n```lua\nfor i = 1, 10, i_step do\n»\nend\n```\n\n`forn`\n```lua\nfor k, v in next, tbl do\n»\nend\n```\n\n`forp`\n```lua\nfor k, v in pairs(tbl) do\n»\nend\n```\n\n`fori`\n```lua\nfor i, v in ipairs(tbl) do\n»\nend\n```\n\n`tern`\n```lua\ncondition and true or false\n```\n\n`func`\n```lua\nfunction func(params)\n»\nend\n```\n\n`funcdef`\n```lua\nfunction (params)\n»\nend\n```\n\n## Suggestions: Standard Lua Libraries\n\n### Basic\n\n`ver`\n```lua\n_VERSION\n```\n\n`sprint`\n```lua\nprint 'text'\n```\n\n`print`\n```lua\nprint(args)\n```\n\n`assert`\n```lua\nassert(value, msg)\n```\n\n`cgar`\n```lua\ncollectgarbage(action, arg)\n```\n\n`dofile`\n```lua\ndofile(file)\n```\n\n`error`\n```lua\nerror(msg, level)\n```\n\n`getmeta`\n```lua\ngetmetatable(obj)\n```\n\n`ipairs`\n```lua\nipairs(tbl)\n```\n\n`load`\n```lua\nload(chunk, chunk_name, mode, env)\n```\n\n`loadfile`\n```lua\nloadfile(file, mode, env)\n```\n\n`next`\n```lua\nnext(tbl, index)\n```\n\n`pairs`\n```lua\npairs(tbl)\n```\n\n`pcall`\n```lua\npcall(func, args)\n```\n\n`rawequal`\n```lua\nrawequal(value1, value2)\n```\n\n`rawget`\n```lua\nrawget(tbl, index)\n```\n\n`rawlen`\n```lua\nrawlen(obj)\n```\n\n`rawset`\n```lua\nrawset(tbl, index, value)\n```\n\n`select`\n```lua\nselect(arg, args)\n```\n\n`setmeta`\n```lua\nsetmetatable(obj, metatbl)\n```\n\n`tonumber`\n```lua\ntonumber(value, base)\n```\n\n`tostring`\n```lua\ntostring(value)\n```\n\n`type`\n```lua\ntype(var)\n```\n\n`xpcall`\n```lua\nxpcall(func, msgh, args)\n```\n\n### Coroutine\n\n`corcreate`\n```lua\ncoroutine.create(func)\n```\n\n`corisyield`\n```lua\ncoroutine.isyieldable()\n```\n\n`corres`\n```lua\ncoroutine.resume(coro, args)\n```\n\n`corrun`\n```lua\ncoroutine.running()\n```\n\n`corstatus`\n```lua\ncoroutine.status(coro)\n```\n\n`corwrap`\n```lua\ncoroutine.wrap(func)\n```\n\n`coryield`\n```lua\ncoroutine.yield(extra)\n```\n\n### Package\n\n`sreq`\n```lua\nrequire 'name'\n```\n\n`req`\n```lua\nrequire(name)\n```\n\n`packconfig`\n```lua\npackage.config\n```\n\n`packcpath`\n```lua\npackage.cpath\n```\n\n`packloaded`\n```lua\npackage.loaded\n```\n\n`packloadlib`\n```lua\npackage.loadlib(lib, func)\n```\n\n`packpath`\n```lua\npackage.path\n```\n\n`packpreload`\n```lua\npackage.preload\n```\n\n`packs`\n```lua\npackage.searchers\n```\n\n`packspath`\n```lua\npackage.searchpath(name, path, sep, rep)\n```\n\n### String\n\n`strbyte`\n```lua\nstring.byte(str, i_start, i_end)\n```\n\n`strchar`\n```lua\nstring.char(bytes)\n```\n\n`strdump`\n```lua\nstring.dump(func, strip)\n```\n\n`strfind`\n```lua\nstring.find(str, pattern, i_start, plain)\n```\n\n`strformat`\n```lua\nstring.format(format, args)\n```\n\n`strgmatch`\n```lua\nstring.gmatch(str, pattern)\n```\n\n`strgsub`\n```lua\nstring.gsub(str, pattern, repl, n)\n```\n\n`strlen`\n```lua\nstring.len(str)\n```\n\n`strlower`\n```lua\nstring.lower(str)\n```\n\n`strmatch`\n```lua\nstring.match(str, pattern, i_start)\n```\n\n`strpack`\n```lua\nstring.pack(format, args)\n```\n\n`strpacksize`\n```lua\nstring.packsize(format)\n```\n\n`strrep`\n```lua\nstring.rep(str, n, sep)\n```\n\n`strreverse`\n```lua\nstring.reverse(str)\n```\n\n`strsub`\n```lua\nstring.sub(str, i_start, i_end)\n```\n\n`strunpack`\n```lua\nstring.unpack(format, str, i)\n```\n\n`strupper`\n```lua\nstring.upper(str)\n```\n\n### UTF-8\n\n`utfchar`\n```lua\nutf8.char(number)\n```\n\n`utfcharpattern`\n```lua\nutf8.charpattern\n```\n\n`utfcodepoint`\n```lua\nutf8.codepoint(str, i_start, i_end)\n```\n\n`utfcodes`\n```lua\nutf8.codes(str)\n```\n\n`utflen`\n```lua\nutf8.len(str, i_start, i_end)\n```\n\n`utfoffset`\n```lua\nutf8.offset(str, n, i_start)\n```\n\n### Table\n\n`tabcon`\n```lua\ntable.concat(tbl, sep, i_start, i_end)\n```\n\n`tabins`\n```lua\ntable.insert(tbl, i, value)\n```\n\n`tabmove`\n```lua\ntable.move(tbl1, f, e, t, tbl2)\n```\n\n`tabpack`\n```lua\ntable.pack(args)\n```\n\n`tabrem`\n```lua\ntable.remove(tbl, i)\n```\n\n`tabsort`\n```lua\ntable.sort(tbl, func)\n```\n\n`tabunpack`\n```lua\ntable.unpack(tbl, i_start, i_end)\n```\n\n### Math\n\n`mathabs`\n```lua\nmath.abs(x)\n```\n\n`mathacos`\n```lua\nmath.acos(x)\n```\n\n`mathasin`\n```lua\nmath.asin(x)\n```\n\n`mathatan`\n```lua\nmath.atan(y, x)\n```\n\n`mathceil`\n```lua\nmath.ceil(x)\n```\n\n`mathcos`\n```lua\nmath.cos(x)\n```\n\n`mathdeg`\n```lua\nmath.deg(x)\n```\n\n`mathexp`\n```lua\nmath.exp(x)\n```\n\n`mathfloor`\n```lua\nmath.floor(x)\n```\n\n`mathfmod`\n```lua\nmath.fmod(x, y)\n```\n\n`mathhuge`\n```lua\nmath.huge\n```\n\n`mathlog`\n```lua\nmath.log(x, base)\n```\n\n`mathmax`\n```lua\nmath.max(args)\n```\n\n`mathmaxint`\n```lua\nmath.maxinteger\n```\n\n`mathmin`\n```lua\nmath.min(args)\n```\n\n`mathminint`\n```lua\nmath.mininteger\n```\n\n`mathmodf`\n```lua\nmath.modf(x)\n```\n\n`mathpi`\n```lua\nmath.pi\n```\n\n`mathrad`\n```lua\nmath.rad(x)\n```\n\n`mathran`\n```lua\nmath.random(x)\n```\n\n`mathranseed`\n```lua\nmath.randomseed(x)\n```\n\n`mathsin`\n```lua\nmath.sin(x)\n```\n\n`mathsqrt`\n```lua\nmath.sqrt(x)\n```\n\n`mathtan`\n```lua\nmath.tan(x)\n```\n\n`mathtoint`\n```lua\nmath.tointeger(x)\n```\n\n`mathtype`\n```lua\nmath.type(x)\n```\n\n`mathult`\n```lua\nmath.ult(m, n)\n```\n\n### IO\n\n`ioclose`\n```lua\nio.close(file)\n```\n\n`ioflush`\n```lua\nio.flush()\n```\n\n`ioinput`\n```lua\nio.input(file)\n```\n\n`iolines`\n```lua\nio.lines(file, formats)\n```\n\n`ioopen`\n```lua\nio.open(file, mode)\n```\n\n`iooutput`\n```lua\nio.output(file)\n```\n\n`iopopen`\n```lua\nio.popen(prog, mode)\n```\n\n`ioread`\n```lua\nio.read(formats)\n```\n\n`iotmpfile`\n```lua\nio.tmpfile()\n```\n\n`iotype`\n```lua\nio.type(obj)\n```\n\n`iowrite`\n```lua\nio.write(args)\n```\n\n`fileclose`\n```lua\nfile:close()\n```\n\n`fileflush`\n```lua\nfile:flush()\n```\n\n`filelines`\n```lua\nfile:lines(formats)\n```\n\n`fileread`\n```lua\nfile:read(formats)\n```\n\n`fileseek`\n```lua\nfile:seek(whence, offset)\n```\n\n`filesvbuf`\n```lua\nfile:setvbuf(mode, size)\n```\n\n`filewrite`\n```lua\nfile:write(args)\n```\n\n### OS\n\n`osclock`\n```lua\nos.clock()\n```\n\n`osdate`\n```lua\nos.date(format, time)\n```\n\n`osdiff`\n```lua\nos.difftime(t2, t1)\n```\n\n`osexec`\n```lua\nos.execute(cmd)\n```\n\n`osexit`\n```lua\nos.exit(code, close)\n```\n\n`osgenv`\n```lua\nos.getenv(var)\n```\n\n`osrem`\n```lua\nos.remove(file)\n```\n\n`osren`\n```lua\nos.rename(old_name, new_name)\n```\n\n`osslocale`\n```lua\nos.setlocale(locale, category)\n```\n\n`ostime`\n```lua\nos.time(tbl)\n```\n\n`ostmpname`\n```lua\nos.tmpname()\n```\n\n### Debug\n\n`deb`\n```lua\ndebug.debug()\n```\n\n`debghook`\n```lua\ndebug.gethook(thread)\n```\n\n`debginfo`\n```lua\ndebug.getinfo(thread, func_level, fields)\n```\n\n`debglocal`\n```lua\ndebug.getlocal(thread, func_level, index)\n```\n\n`debgmeta`\n```lua\ndebug.getmetatable(obj)\n```\n\n`debgreg`\n```lua\ndebug.getregistry()\n```\n\n`debgup`\n```lua\ndebug.getupvalue(func, index)\n```\n\n`debguser`\n```lua\ndebug.getuservalue(udata)\n```\n\n`debshook`\n```lua\ndebug.sethook(thread, hook, mask, count)\n```\n\n`debslocal`\n```lua\ndebug.setlocal(thread, level, index, value)\n```\n\n`debsmeta`\n```lua\ndebug.setmetatable(obj, metatbl)\n```\n\n`debsup`\n```lua\ndebug.setupvalue(func, index, value)\n```\n\n`debsuser`\n```lua\ndebug.setuservalue(udata, value)\n```\n\n`debtb`\n```lua\ndebug.traceback(thread, msg, level)\n```\n\n`debupid`\n```lua\ndebug.upvalueid(func, index)\n```\n\n`debupjoin`\n```lua\ndebug.upvaluejoin(f1, n1, f2, n2)\n```\n\n## References\n\n- [Lua Documentation](https://www.lua.org/docs.html)\n- [Lua 5.3 Reference Manual](https://www.lua.org/manual/5.3/)\n\n## License\n\nThis package is under a [MIT license](https://github.com/Azganoth/language-lua-plus/blob/master/LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAzganoth%2Flanguage-lua-plus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAzganoth%2Flanguage-lua-plus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAzganoth%2Flanguage-lua-plus/lists"}