diff --git a/README.md b/README.md index dfeff47..8f386b8 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ A [neovim] plugin and configuration management plugin, highly inspired by [lazy] - [Installation](#installation) - [Flake installation](#flake-installation) - [Usage](#usage) + - [Minimal example](#minimal-example) - [Documentation](#documentation) - [nix](#nix) - [`mkPluginsFromInputs`](#mkpluginsfrominputs) @@ -86,6 +87,81 @@ inputs.sloth-flake.url = "github:lemarsu/sloth-flake.nvim?tag=0.0.5"; ## Usage +### Minimal example + +sloth-flake has been made for this typical use case. I was a long vim/neovim +user, had a repository with a lot of neovim config in it, and I discovered +[nix]. At first, I kept my [lazy] setup, but it wasn't integrated with the rest +of my nix config. I've seen a bunch of solution to handle your vim files, but +not was for my taste. I wanted a configuration that allow me keep the maximum +of my old lazy config, and let nix handle the rest. So after some trial and +errors, I made this flake, and turn my old neovim configuration repository in a +flake that produce a neovim binary bundled with my configuration. + +Here's a minimal flake to make a bundled neovim plugin with sloth-flake.nvim: + +`flake.nix` +```nix +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + sloth-flake.url = "github:lemarsu/sloth-flake.nvim"; + utils.url = "github:numtide/flake-utils"; + }; + outputs = {utils, sloth-flake, ...}@inputs: + utils.lib.eachDefaultSystem (system: { + packages = rec { + default = neovim; + neovim = pkgs.callPackage ./package.nix {inherit sloth-flake;}; + }; + }); + } +``` + +`./package.nix` +```nix +{ + pkgs, + lib, + sloth-flake, + ... +}: +sloth-flake.lib.mkNeovimPkg { + inherit pkgs; + viAlias = true; + vimAlias = true; + vimdiffAlias = true; + runtime = { + init = ./init.lua; + src = with lib.fileset; + toSource { + root = ./.; + fileset = unions [ + ./after + ./colors + ./ftplugin + ./lua + ./plugin + ./queries + ./spell + ]; + }; + }; + + dependencies = [./dependencies.nix]; +} +``` + +`dependencies.nix` +```nix +{pkgs, ...}: with pkgs.vimPlugins; +[ + # Your plugin list + telescope-nvim + # TODO More examples +] +``` + Once installed, you can call the `sloth-flake.lib.mkNeovimPkg` to build your neovim package. `mkNeovimPkg` requires a *set* as argument with at least `pkgs` that represents your nixpkgs. diff --git a/doc/doc.json b/doc/doc.json new file mode 100644 index 0000000..0bba5f5 --- /dev/null +++ b/doc/doc.json @@ -0,0 +1,6750 @@ +[ + { + "DOC": "/home/lemarsu/prog/nix/sloth-flake.nvim/lua", + "defines": [], + "fields": [], + "name": "LuaLS", + "type": "luals.config" + }, + { + "defines": [ + { + "extends": { + "desc": "\nA global variable (not a function) that holds the global environment (see [§2.2](http://www.lua.org/manual/5.4/manual.html#2.2)). Lua itself does not use this variable; changing its value does not affect any environment, nor vice versa.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-_G)\n", + "finish": 700007, + "rawdesc": "\nA global variable (not a function) that holds the global environment (see [§2.2](http://www.lua.org/manual/5.4/manual.html#2.2)). Lua itself does not use this variable; changing its value does not affect any environment, nor vice versa.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-_G)\n", + "start": 700005, + "type": "table", + "view": "_G" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 700002, + "start": 700000, + "type": "setglobal" + } + ], + "desc": "\nA global variable (not a function) that holds the global environment (see [§2.2](http://www.lua.org/manual/5.4/manual.html#2.2)). Lua itself does not use this variable; changing its value does not affect any environment, nor vice versa.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-_G)\n", + "name": "_G", + "rawdesc": "\nA global variable (not a function) that holds the global environment (see [§2.2](http://www.lua.org/manual/5.4/manual.html#2.2)). Lua itself does not use this variable; changing its value does not affect any environment, nor vice versa.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-_G)\n", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "desc": "\nA global variable (not a function) that holds a string containing the running Lua version.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-_VERSION)\n", + "finish": 4040020, + "rawdesc": "\nA global variable (not a function) that holds a string containing the running Lua version.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-_VERSION)\n", + "start": 4040011, + "type": "string", + "view": "string" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 4040008, + "start": 4040000, + "type": "setglobal" + } + ], + "desc": "\nA global variable (not a function) that holds a string containing the running Lua version.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-_VERSION)\n", + "name": "_VERSION", + "rawdesc": "\nA global variable (not a function) that holds a string containing the running Lua version.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-_VERSION)\n", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "desc": "\nCommand-line arguments of Lua Standalone.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-arg)\n", + "finish": 80008, + "rawdesc": "\nCommand-line arguments of Lua Standalone.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-arg)\n", + "start": 80006, + "type": "table", + "view": "string[]" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 80003, + "start": 80000, + "type": "setglobal" + } + ], + "desc": "\nCommand-line arguments of Lua Standalone.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-arg)\n", + "name": "arg", + "rawdesc": "\nCommand-line arguments of Lua Standalone.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-arg)\n", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 210017, + "name": "v", + "start": 210016, + "type": "local", + "view": "?" + }, + { + "finish": 210026, + "name": "message", + "start": 210019, + "type": "local", + "view": "any" + }, + { + "finish": 210031, + "start": 210028, + "type": "...", + "view": "any" + } + ], + "desc": "\nRaises an error if the value of its argument v is false (i.e., `nil` or `false`); otherwise, returns all its arguments. In case of error, `message` is the error object; when absent, it defaults to `\"assertion failed!\"`\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-assert)", + "finish": 210036, + "rawdesc": "\nRaises an error if the value of its argument v is false (i.e., `nil` or `false`); otherwise, returns all its arguments. In case of error, `message` is the error object; when absent, it defaults to `\"assertion failed!\"`\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-assert)", + "returns": [ + { + "type": "function.return", + "view": "" + }, + { + "name": "...", + "type": "function.return", + "view": "any" + } + ], + "start": 210000, + "type": "function", + "view": "function assert(v?: , message?: any, ...any)\n -> \n 2. ...any" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 210015, + "start": 210009, + "type": "setglobal" + } + ], + "desc": "\nRaises an error if the value of its argument v is false (i.e., `nil` or `false`); otherwise, returns all its arguments. In case of error, `message` is the error object; when absent, it defaults to `\"assertion failed!\"`\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-assert)", + "name": "assert", + "rawdesc": "\nRaises an error if the value of its argument v is false (i.e., `nil` or `false`); otherwise, returns all its arguments. In case of error, `message` is the error object; when absent, it defaults to `\"assertion failed!\"`\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-assert)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 410027, + "name": "opt", + "start": 410024, + "type": "local", + "view": "(\"collect\"|\"count\"|\"generational\"|\"incremental\"|\"isrunning\"...(+3))?" + }, + { + "finish": 410032, + "start": 410029, + "type": "...", + "view": "any" + } + ], + "desc": "\nThis function is a generic interface to the garbage collector. It performs different functions according to its first argument, `opt`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-collectgarbage)\n\n\n```lua\nopt:\n -> \"collect\" -- Performs a full garbage-collection cycle.\n | \"stop\" -- Stops automatic execution.\n | \"restart\" -- Restarts automatic execution.\n | \"count\" -- Returns the total memory in Kbytes.\n | \"step\" -- Performs a garbage-collection step.\n | \"isrunning\" -- Returns whether the collector is running.\n | \"incremental\" -- Change the collector mode to incremental.\n | \"generational\" -- Change the collector mode to generational.\n```", + "finish": 410037, + "rawdesc": "\nThis function is a generic interface to the garbage collector. It performs different functions according to its first argument, `opt`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-collectgarbage)\n\n\n```lua\nopt:\n -> \"collect\" -- Performs a full garbage-collection cycle.\n | \"stop\" -- Stops automatic execution.\n | \"restart\" -- Restarts automatic execution.\n | \"count\" -- Returns the total memory in Kbytes.\n | \"step\" -- Performs a garbage-collection step.\n | \"isrunning\" -- Returns whether the collector is running.\n | \"incremental\" -- Change the collector mode to incremental.\n | \"generational\" -- Change the collector mode to generational.\n```", + "returns": [ + { + "type": "function.return", + "view": "any" + } + ], + "start": 410000, + "type": "function", + "view": "function collectgarbage(opt?: \"collect\"|\"count\"|\"generational\"|\"incremental\"|\"isrunning\"...(+3), ...any)\n -> any" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 410023, + "start": 410009, + "type": "setglobal" + } + ], + "desc": "\nThis function is a generic interface to the garbage collector. It performs different functions according to its first argument, `opt`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-collectgarbage)\n\n\n```lua\nopt:\n -> \"collect\" -- Performs a full garbage-collection cycle.\n | \"stop\" -- Stops automatic execution.\n | \"restart\" -- Restarts automatic execution.\n | \"count\" -- Returns the total memory in Kbytes.\n | \"step\" -- Performs a garbage-collection step.\n | \"isrunning\" -- Returns whether the collector is running.\n | \"incremental\" -- Change the collector mode to incremental.\n | \"generational\" -- Change the collector mode to generational.\n```", + "name": "collectgarbage", + "rawdesc": "\nThis function is a generic interface to the garbage collector. It performs different functions according to its first argument, `opt`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-collectgarbage)\n\n\n```lua\nopt:\n -> \"collect\" -- Performs a full garbage-collection cycle.\n | \"stop\" -- Stops automatic execution.\n | \"restart\" -- Restarts automatic execution.\n | \"count\" -- Returns the total memory in Kbytes.\n | \"step\" -- Performs a garbage-collection step.\n | \"isrunning\" -- Returns whether the collector is running.\n | \"incremental\" -- Change the collector mode to incremental.\n | \"generational\" -- Change the collector mode to generational.\n```", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "desc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine)\n", + "finish": 80014, + "rawdesc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine)\n", + "start": 80012, + "type": "table", + "view": "coroutinelib" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/coroutine.lua", + "finish": 80009, + "start": 80000, + "type": "setglobal" + } + ], + "desc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine)\n", + "name": "coroutine", + "rawdesc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine)\n", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 390027, + "name": "co", + "start": 390025, + "type": "local", + "view": "thread" + } + ], + "desc": "\nCloses coroutine `co` , closing all its pending to-be-closed variables and putting the coroutine in a dead state.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.close)", + "finish": 390032, + "rawdesc": "\nCloses coroutine `co` , closing all its pending to-be-closed variables and putting the coroutine in a dead state.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.close)", + "returns": [ + { + "name": "noerror", + "type": "function.return", + "view": "boolean" + }, + { + "name": "errorobject", + "type": "function.return", + "view": "any" + } + ], + "start": 390000, + "type": "function", + "view": "function coroutine.close(co: thread)\n -> noerror: boolean\n 2. errorobject: any" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/coroutine.lua", + "finish": 390024, + "start": 390009, + "type": "setfield" + } + ], + "desc": "\nCloses coroutine `co` , closing all its pending to-be-closed variables and putting the coroutine in a dead state.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.close)", + "name": "coroutine.close", + "rawdesc": "\nCloses coroutine `co` , closing all its pending to-be-closed variables and putting the coroutine in a dead state.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.close)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 180027, + "name": "f", + "start": 180026, + "type": "local", + "view": "fun(...any):...unknown" + } + ], + "desc": "\nCreates a new coroutine, with body `f`. `f` must be a function. Returns this new coroutine, an object with type `\"thread\"`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.create)", + "finish": 180032, + "rawdesc": "\nCreates a new coroutine, with body `f`. `f` must be a function. Returns this new coroutine, an object with type `\"thread\"`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.create)", + "returns": [ + { + "type": "function.return", + "view": "thread" + } + ], + "start": 180000, + "type": "function", + "view": "function coroutine.create(f: fun(...any):...unknown)\n -> thread" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/coroutine.lua", + "finish": 180025, + "start": 180009, + "type": "setfield" + } + ], + "desc": "\nCreates a new coroutine, with body `f`. `f` must be a function. Returns this new coroutine, an object with type `\"thread\"`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.create)", + "name": "coroutine.create", + "rawdesc": "\nCreates a new coroutine, with body `f`. `f` must be a function. Returns this new coroutine, an object with type `\"thread\"`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.create)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 280033, + "name": "co", + "start": 280031, + "type": "local", + "view": "thread?" + } + ], + "desc": "\nReturns true when the coroutine `co` can yield. The default for `co` is the running coroutine.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.isyieldable)", + "finish": 280038, + "rawdesc": "\nReturns true when the coroutine `co` can yield. The default for `co` is the running coroutine.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.isyieldable)", + "returns": [ + { + "type": "function.return", + "view": "boolean" + } + ], + "start": 280000, + "type": "function", + "view": "function coroutine.isyieldable(co?: thread)\n -> boolean" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/coroutine.lua", + "finish": 280030, + "start": 280009, + "type": "setfield" + } + ], + "desc": "\nReturns true when the coroutine `co` can yield. The default for `co` is the running coroutine.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.isyieldable)", + "name": "coroutine.isyieldable", + "rawdesc": "\nReturns true when the coroutine `co` can yield. The default for `co` is the running coroutine.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.isyieldable)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 500028, + "name": "co", + "start": 500026, + "type": "local", + "view": "thread" + }, + { + "finish": 500034, + "name": "val1", + "start": 500030, + "type": "local", + "view": "any" + }, + { + "finish": 500039, + "start": 500036, + "type": "...", + "view": "unknown" + } + ], + "desc": "\nStarts or continues the execution of coroutine `co`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.resume)", + "finish": 500044, + "rawdesc": "\nStarts or continues the execution of coroutine `co`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.resume)", + "returns": [ + { + "name": "success", + "type": "function.return", + "view": "boolean" + }, + { + "name": "...", + "type": "function.return", + "view": "any" + } + ], + "start": 500000, + "type": "function", + "view": "function coroutine.resume(co: thread, val1?: any, ...any)\n -> success: boolean\n 2. ...any" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/coroutine.lua", + "finish": 500025, + "start": 500009, + "type": "setfield" + } + ], + "desc": "\nStarts or continues the execution of coroutine `co`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.resume)", + "name": "coroutine.resume", + "rawdesc": "\nStarts or continues the execution of coroutine `co`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.resume)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [], + "desc": "\nReturns the running coroutine plus a boolean, true when the running coroutine is the main one.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.running)", + "finish": 600032, + "rawdesc": "\nReturns the running coroutine plus a boolean, true when the running coroutine is the main one.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.running)", + "returns": [ + { + "name": "running", + "type": "function.return", + "view": "thread" + }, + { + "name": "ismain", + "type": "function.return", + "view": "boolean" + } + ], + "start": 600000, + "type": "function", + "view": "function coroutine.running()\n -> running: thread\n 2. ismain: boolean" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/coroutine.lua", + "finish": 600026, + "start": 600009, + "type": "setfield" + } + ], + "desc": "\nReturns the running coroutine plus a boolean, true when the running coroutine is the main one.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.running)", + "name": "coroutine.running", + "rawdesc": "\nReturns the running coroutine plus a boolean, true when the running coroutine is the main one.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.running)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 740028, + "name": "co", + "start": 740026, + "type": "local", + "view": "thread" + } + ], + "desc": "\nReturns the status of coroutine `co`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.status)\n\n\n```lua\nreturn #1:\n | \"running\" -- Is running.\n | \"suspended\" -- Is suspended or not started.\n | \"normal\" -- Is active but not running.\n | \"dead\" -- Has finished or stopped with an error.\n```", + "finish": 740033, + "rawdesc": "\nReturns the status of coroutine `co`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.status)\n\n\n```lua\nreturn #1:\n | \"running\" -- Is running.\n | \"suspended\" -- Is suspended or not started.\n | \"normal\" -- Is active but not running.\n | \"dead\" -- Has finished or stopped with an error.\n```", + "returns": [ + { + "type": "function.return", + "view": "\"dead\"|\"normal\"|\"running\"|\"suspended\"" + } + ], + "start": 740000, + "type": "function", + "view": "function coroutine.status(co: thread)\n -> \"dead\"|\"normal\"|\"running\"|\"suspended\"" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/coroutine.lua", + "finish": 740025, + "start": 740009, + "type": "setfield" + } + ], + "desc": "\nReturns the status of coroutine `co`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.status)\n\n\n```lua\nreturn #1:\n | \"running\" -- Is running.\n | \"suspended\" -- Is suspended or not started.\n | \"normal\" -- Is active but not running.\n | \"dead\" -- Has finished or stopped with an error.\n```", + "name": "coroutine.status", + "rawdesc": "\nReturns the status of coroutine `co`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.status)\n\n\n```lua\nreturn #1:\n | \"running\" -- Is running.\n | \"suspended\" -- Is suspended or not started.\n | \"normal\" -- Is active but not running.\n | \"dead\" -- Has finished or stopped with an error.\n```", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 840025, + "name": "f", + "start": 840024, + "type": "local", + "view": "fun(...any):...unknown" + } + ], + "desc": "\nCreates a new coroutine, with body `f`; `f` must be a function. Returns a function that resumes the coroutine each time it is called.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.wrap)", + "finish": 840030, + "rawdesc": "\nCreates a new coroutine, with body `f`; `f` must be a function. Returns a function that resumes the coroutine each time it is called.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.wrap)", + "returns": [ + { + "type": "function.return", + "view": "fun(...any):...unknown" + } + ], + "start": 840000, + "type": "function", + "view": "function coroutine.wrap(f: fun(...any):...unknown)\n -> fun(...any):...unknown" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/coroutine.lua", + "finish": 840023, + "start": 840009, + "type": "setfield" + } + ], + "desc": "\nCreates a new coroutine, with body `f`; `f` must be a function. Returns a function that resumes the coroutine each time it is called.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.wrap)", + "name": "coroutine.wrap", + "rawdesc": "\nCreates a new coroutine, with body `f`; `f` must be a function. Returns a function that resumes the coroutine each time it is called.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.wrap)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 930028, + "start": 930025, + "type": "...", + "view": "unknown" + } + ], + "async": true, + "desc": "\nSuspends the execution of the calling coroutine.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.yield)", + "finish": 930033, + "rawdesc": "\nSuspends the execution of the calling coroutine.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.yield)", + "returns": [ + { + "name": "...", + "type": "function.return", + "view": "any" + } + ], + "start": 930000, + "type": "function", + "view": "(async) function coroutine.yield(...any)\n -> ...any" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/coroutine.lua", + "finish": 930024, + "start": 930009, + "type": "setfield" + } + ], + "desc": "\nSuspends the execution of the calling coroutine.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.yield)", + "name": "coroutine.yield", + "rawdesc": "\nSuspends the execution of the calling coroutine.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.yield)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "desc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug)\n", + "finish": 80010, + "rawdesc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug)\n", + "start": 80008, + "type": "table", + "view": "debuglib" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/debug.lua", + "finish": 80005, + "start": 80000, + "type": "setglobal" + } + ], + "desc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug)\n", + "name": "debug", + "rawdesc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug)\n", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [], + "desc": "\nEnters an interactive mode with the user, running each string that the user enters.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.debug)", + "finish": 330026, + "rawdesc": "\nEnters an interactive mode with the user, running each string that the user enters.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.debug)", + "start": 330000, + "type": "function", + "view": "function debug.debug()" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/debug.lua", + "finish": 330020, + "start": 330009, + "type": "setfield" + } + ], + "desc": "\nEnters an interactive mode with the user, running each string that the user enters.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.debug)", + "name": "debug.debug", + "rawdesc": "\nEnters an interactive mode with the user, running each string that the user enters.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.debug)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 440024, + "name": "o", + "start": 440023, + "type": "local", + "view": "any" + } + ], + "desc": "\nReturns the environment of object `o` .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getfenv)", + "finish": 440029, + "rawdesc": "\nReturns the environment of object `o` .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getfenv)", + "returns": [ + { + "type": "function.return", + "view": "table" + } + ], + "start": 440000, + "type": "function", + "view": "function debug.getfenv(o: any)\n -> table" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/debug.lua", + "finish": 440022, + "start": 440009, + "type": "setfield" + } + ], + "desc": "\nReturns the environment of object `o` .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getfenv)", + "name": "debug.getfenv", + "rawdesc": "\nReturns the environment of object `o` .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getfenv)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 560025, + "name": "co", + "start": 560023, + "type": "local", + "view": "thread?" + } + ], + "desc": "\nReturns the current hook settings of the thread.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.gethook)", + "finish": 560030, + "rawdesc": "\nReturns the current hook settings of the thread.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.gethook)", + "returns": [ + { + "name": "hook", + "type": "function.return", + "view": "function" + }, + { + "name": "mask", + "type": "function.return", + "view": "string" + }, + { + "name": "count", + "type": "function.return", + "view": "integer" + } + ], + "start": 560000, + "type": "function", + "view": "function debug.gethook(co?: thread)\n -> hook: function\n 2. mask: string\n 3. count: integer" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/debug.lua", + "finish": 560022, + "start": 560009, + "type": "setfield" + } + ], + "desc": "\nReturns the current hook settings of the thread.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.gethook)", + "name": "debug.gethook", + "rawdesc": "\nReturns the current hook settings of the thread.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.gethook)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 790029, + "name": "thread", + "start": 790023, + "type": "local", + "view": "thread" + }, + { + "finish": 790032, + "name": "f", + "start": 790031, + "type": "local", + "view": "integer|fun(...any):...unknown" + }, + { + "finish": 790038, + "name": "what", + "start": 790034, + "type": "local", + "view": "(string|\"L\"|\"S\"|\"f\"|\"l\"...(+4))?" + } + ], + "desc": "\nReturns a table with information about a function.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getinfo)\n\n\n---\n\n```lua\nwhat:\n +> \"n\" -- `name` and `namewhat`\n +> \"S\" -- `source`, `short_src`, `linedefined`, `lastlinedefined`, and `what`\n +> \"l\" -- `currentline`\n +> \"t\" -- `istailcall`\n +> \"u\" -- `nups`, `nparams`, and `isvararg`\n +> \"f\" -- `func`\n +> \"r\" -- `ftransfer` and `ntransfer`\n +> \"L\" -- `activelines`\n```", + "finish": 790043, + "rawdesc": "\nReturns a table with information about a function.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getinfo)\n\n\n---\n\n```lua\nwhat:\n +> \"n\" -- `name` and `namewhat`\n +> \"S\" -- `source`, `short_src`, `linedefined`, `lastlinedefined`, and `what`\n +> \"l\" -- `currentline`\n +> \"t\" -- `istailcall`\n +> \"u\" -- `nups`, `nparams`, and `isvararg`\n +> \"f\" -- `func`\n +> \"r\" -- `ftransfer` and `ntransfer`\n +> \"L\" -- `activelines`\n```", + "returns": [ + { + "type": "function.return", + "view": "debuginfo" + } + ], + "start": 790000, + "type": "function", + "view": "function debug.getinfo(thread: thread, f: integer|fun(...any):...unknown, what?: string|\"L\"|\"S\"|\"f\"|\"l\"...(+4))\n -> debuginfo" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/debug.lua", + "finish": 790022, + "start": 790009, + "type": "setfield" + } + ], + "desc": "\nReturns a table with information about a function.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getinfo)\n\n\n---\n\n```lua\nwhat:\n +> \"n\" -- `name` and `namewhat`\n +> \"S\" -- `source`, `short_src`, `linedefined`, `lastlinedefined`, and `what`\n +> \"l\" -- `currentline`\n +> \"t\" -- `istailcall`\n +> \"u\" -- `nups`, `nparams`, and `isvararg`\n +> \"f\" -- `func`\n +> \"r\" -- `ftransfer` and `ntransfer`\n +> \"L\" -- `activelines`\n```", + "name": "debug.getinfo", + "rawdesc": "\nReturns a table with information about a function.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getinfo)\n\n\n---\n\n```lua\nwhat:\n +> \"n\" -- `name` and `namewhat`\n +> \"S\" -- `source`, `short_src`, `linedefined`, `lastlinedefined`, and `what`\n +> \"l\" -- `currentline`\n +> \"t\" -- `istailcall`\n +> \"u\" -- `nups`, `nparams`, and `isvararg`\n +> \"f\" -- `func`\n +> \"r\" -- `ftransfer` and `ntransfer`\n +> \"L\" -- `activelines`\n```", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 930030, + "name": "thread", + "start": 930024, + "type": "local", + "view": "thread" + }, + { + "finish": 930033, + "name": "f", + "start": 930032, + "type": "local", + "view": "integer|fun(...any):...unknown" + }, + { + "finish": 930040, + "name": "index", + "start": 930035, + "type": "local", + "view": "integer" + } + ], + "desc": "\nReturns the name and the value of the local variable with index `local` of the function at level `f` of the stack.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getlocal)", + "finish": 930045, + "rawdesc": "\nReturns the name and the value of the local variable with index `local` of the function at level `f` of the stack.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getlocal)", + "returns": [ + { + "name": "name", + "type": "function.return", + "view": "string" + }, + { + "name": "value", + "type": "function.return", + "view": "any" + } + ], + "start": 930000, + "type": "function", + "view": "function debug.getlocal(thread: thread, f: integer|fun(...any):...unknown, index: integer)\n -> name: string\n 2. value: any" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/debug.lua", + "finish": 930023, + "start": 930009, + "type": "setfield" + } + ], + "desc": "\nReturns the name and the value of the local variable with index `local` of the function at level `f` of the stack.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getlocal)", + "name": "debug.getlocal", + "rawdesc": "\nReturns the name and the value of the local variable with index `local` of the function at level `f` of the stack.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getlocal)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1030034, + "name": "object", + "start": 1030028, + "type": "local", + "view": "any" + } + ], + "desc": "\nReturns the metatable of the given value.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getmetatable)", + "finish": 1030039, + "rawdesc": "\nReturns the metatable of the given value.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getmetatable)", + "returns": [ + { + "name": "metatable", + "type": "function.return", + "view": "table" + } + ], + "start": 1030000, + "type": "function", + "view": "function debug.getmetatable(object: any)\n -> metatable: table" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/debug.lua", + "finish": 1030027, + "start": 1030009, + "type": "setfield" + } + ], + "desc": "\nReturns the metatable of the given value.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getmetatable)", + "name": "debug.getmetatable", + "rawdesc": "\nReturns the metatable of the given value.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getmetatable)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [], + "desc": "\nReturns the registry table.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getregistry)", + "finish": 1120032, + "rawdesc": "\nReturns the registry table.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getregistry)", + "returns": [ + { + "type": "function.return", + "view": "table" + } + ], + "start": 1120000, + "type": "function", + "view": "function debug.getregistry()\n -> table" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/debug.lua", + "finish": 1120026, + "start": 1120009, + "type": "setfield" + } + ], + "desc": "\nReturns the registry table.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getregistry)", + "name": "debug.getregistry", + "rawdesc": "\nReturns the registry table.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getregistry)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1240027, + "name": "f", + "start": 1240026, + "type": "local", + "view": "fun(...any):...unknown" + }, + { + "finish": 1240031, + "name": "up", + "start": 1240029, + "type": "local", + "view": "integer" + } + ], + "desc": "\nReturns the name and the value of the upvalue with index `up` of the function.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getupvalue)", + "finish": 1240036, + "rawdesc": "\nReturns the name and the value of the upvalue with index `up` of the function.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getupvalue)", + "returns": [ + { + "name": "name", + "type": "function.return", + "view": "string" + }, + { + "name": "value", + "type": "function.return", + "view": "any" + } + ], + "start": 1240000, + "type": "function", + "view": "function debug.getupvalue(f: fun(...any):...unknown, up: integer)\n -> name: string\n 2. value: any" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/debug.lua", + "finish": 1240025, + "start": 1240009, + "type": "setfield" + } + ], + "desc": "\nReturns the name and the value of the upvalue with index `up` of the function.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getupvalue)", + "name": "debug.getupvalue", + "rawdesc": "\nReturns the name and the value of the upvalue with index `up` of the function.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getupvalue)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1390029, + "name": "u", + "start": 1390028, + "type": "local", + "view": "userdata" + }, + { + "finish": 1390032, + "name": "n", + "start": 1390031, + "type": "local", + "view": "integer?" + } + ], + "desc": "\nReturns the `n`-th user value associated\nto the userdata `u` plus a boolean,\n`false` if the userdata does not have that value.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getuservalue)", + "finish": 1390037, + "rawdesc": "\nReturns the `n`-th user value associated\nto the userdata `u` plus a boolean,\n`false` if the userdata does not have that value.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getuservalue)", + "returns": [ + { + "type": "function.return", + "view": "any" + }, + { + "type": "function.return", + "view": "boolean" + } + ], + "start": 1390000, + "type": "function", + "view": "function debug.getuservalue(u: userdata, n?: integer)\n -> any\n 2. boolean" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/debug.lua", + "finish": 1390027, + "start": 1390009, + "type": "setfield" + } + ], + "desc": "\nReturns the `n`-th user value associated\nto the userdata `u` plus a boolean,\n`false` if the userdata does not have that value.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getuservalue)", + "name": "debug.getuservalue", + "rawdesc": "\nReturns the `n`-th user value associated\nto the userdata `u` plus a boolean,\n`false` if the userdata does not have that value.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getuservalue)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1540035, + "name": "limit", + "start": 1540030, + "type": "local", + "view": "integer" + } + ], + "deprecated": true, + "desc": "\n### **Deprecated in `Lua 5.4.2`**\n\nSets a new limit for the C stack. This limit controls how deeply nested calls can go in Lua, with the intent of avoiding a stack overflow.\n\nIn case of success, this function returns the old limit. In case of error, it returns `false`.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setcstacklimit)", + "finish": 1540040, + "rawdesc": "\n### **Deprecated in `Lua 5.4.2`**\n\nSets a new limit for the C stack. This limit controls how deeply nested calls can go in Lua, with the intent of avoiding a stack overflow.\n\nIn case of success, this function returns the old limit. In case of error, it returns `false`.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setcstacklimit)", + "returns": [ + { + "type": "function.return", + "view": "boolean|integer" + } + ], + "start": 1540000, + "type": "function", + "view": "function debug.setcstacklimit(limit: integer)\n -> boolean|integer" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/debug.lua", + "finish": 1540029, + "start": 1540009, + "type": "setfield" + } + ], + "desc": "\n### **Deprecated in `Lua 5.4.2`**\n\nSets a new limit for the C stack. This limit controls how deeply nested calls can go in Lua, with the intent of avoiding a stack overflow.\n\nIn case of success, this function returns the old limit. In case of error, it returns `false`.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setcstacklimit)", + "name": "debug.setcstacklimit", + "rawdesc": "\n### **Deprecated in `Lua 5.4.2`**\n\nSets a new limit for the C stack. This limit controls how deeply nested calls can go in Lua, with the intent of avoiding a stack overflow.\n\nIn case of success, this function returns the old limit. In case of error, it returns `false`.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setcstacklimit)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1660029, + "name": "object", + "start": 1660023, + "type": "local", + "view": "" + }, + { + "finish": 1660034, + "name": "env", + "start": 1660031, + "type": "local", + "view": "table" + } + ], + "desc": "\nSets the environment of the given `object` to the given `table` .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setfenv)", + "finish": 1660039, + "rawdesc": "\nSets the environment of the given `object` to the given `table` .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setfenv)", + "returns": [ + { + "name": "object", + "type": "function.return", + "view": "" + } + ], + "start": 1660000, + "type": "function", + "view": "function debug.setfenv(object: , env: table)\n -> object: " + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/debug.lua", + "finish": 1660022, + "start": 1660009, + "type": "setfield" + } + ], + "desc": "\nSets the environment of the given `object` to the given `table` .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setfenv)", + "name": "debug.setfenv", + "rawdesc": "\nSets the environment of the given `object` to the given `table` .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setfenv)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1850029, + "name": "thread", + "start": 1850023, + "type": "local", + "view": "thread" + }, + { + "finish": 1850035, + "name": "hook", + "start": 1850031, + "type": "local", + "view": "fun(...any):...unknown" + }, + { + "finish": 1850041, + "name": "mask", + "start": 1850037, + "type": "local", + "view": "string|\"c\"|\"l\"|\"r\"" + }, + { + "finish": 1850048, + "name": "count", + "start": 1850043, + "type": "local", + "view": "integer?" + } + ], + "desc": "\nSets the given function as a hook.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.sethook)\n\n\n---\n\n```lua\nmask:\n +> \"c\" -- Calls hook when Lua calls a function.\n +> \"r\" -- Calls hook when Lua returns from a function.\n +> \"l\" -- Calls hook when Lua enters a new line of code.\n```", + "finish": 1850053, + "rawdesc": "\nSets the given function as a hook.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.sethook)\n\n\n---\n\n```lua\nmask:\n +> \"c\" -- Calls hook when Lua calls a function.\n +> \"r\" -- Calls hook when Lua returns from a function.\n +> \"l\" -- Calls hook when Lua enters a new line of code.\n```", + "start": 1850000, + "type": "function", + "view": "function debug.sethook(thread: thread, hook: fun(...any):...unknown, mask: string|\"c\"|\"l\"|\"r\", count?: integer)" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/debug.lua", + "finish": 1850022, + "start": 1850009, + "type": "setfield" + } + ], + "desc": "\nSets the given function as a hook.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.sethook)\n\n\n---\n\n```lua\nmask:\n +> \"c\" -- Calls hook when Lua calls a function.\n +> \"r\" -- Calls hook when Lua returns from a function.\n +> \"l\" -- Calls hook when Lua enters a new line of code.\n```", + "name": "debug.sethook", + "rawdesc": "\nSets the given function as a hook.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.sethook)\n\n\n---\n\n```lua\nmask:\n +> \"c\" -- Calls hook when Lua calls a function.\n +> \"r\" -- Calls hook when Lua returns from a function.\n +> \"l\" -- Calls hook when Lua enters a new line of code.\n```", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1980030, + "name": "thread", + "start": 1980024, + "type": "local", + "view": "thread" + }, + { + "finish": 1980037, + "name": "level", + "start": 1980032, + "type": "local", + "view": "integer" + }, + { + "finish": 1980044, + "name": "index", + "start": 1980039, + "type": "local", + "view": "integer" + }, + { + "finish": 1980051, + "name": "value", + "start": 1980046, + "type": "local", + "view": "any" + } + ], + "desc": "\nAssigns the `value` to the local variable with index `local` of the function at `level` of the stack.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setlocal)", + "finish": 1980056, + "rawdesc": "\nAssigns the `value` to the local variable with index `local` of the function at `level` of the stack.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setlocal)", + "returns": [ + { + "name": "name", + "type": "function.return", + "view": "string" + } + ], + "start": 1980000, + "type": "function", + "view": "function debug.setlocal(thread: thread, level: integer, index: integer, value: any)\n -> name: string" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/debug.lua", + "finish": 1980023, + "start": 1980009, + "type": "setfield" + } + ], + "desc": "\nAssigns the `value` to the local variable with index `local` of the function at `level` of the stack.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setlocal)", + "name": "debug.setlocal", + "rawdesc": "\nAssigns the `value` to the local variable with index `local` of the function at `level` of the stack.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setlocal)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 2090033, + "name": "value", + "start": 2090028, + "type": "local", + "view": "" + }, + { + "finish": 2090039, + "name": "meta", + "start": 2090035, + "type": "local", + "view": "table?" + } + ], + "desc": "\nSets the metatable for the given value to the given table (which can be `nil`).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setmetatable)", + "finish": 2090044, + "rawdesc": "\nSets the metatable for the given value to the given table (which can be `nil`).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setmetatable)", + "returns": [ + { + "name": "value", + "type": "function.return", + "view": "" + } + ], + "start": 2090000, + "type": "function", + "view": "function debug.setmetatable(value: , meta?: table)\n -> value: " + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/debug.lua", + "finish": 2090027, + "start": 2090009, + "type": "setfield" + } + ], + "desc": "\nSets the metatable for the given value to the given table (which can be `nil`).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setmetatable)", + "name": "debug.setmetatable", + "rawdesc": "\nSets the metatable for the given value to the given table (which can be `nil`).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setmetatable)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 2200027, + "name": "f", + "start": 2200026, + "type": "local", + "view": "fun(...any):...unknown" + }, + { + "finish": 2200031, + "name": "up", + "start": 2200029, + "type": "local", + "view": "integer" + }, + { + "finish": 2200038, + "name": "value", + "start": 2200033, + "type": "local", + "view": "any" + } + ], + "desc": "\nAssigns the `value` to the upvalue with index `up` of the function.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setupvalue)", + "finish": 2200043, + "rawdesc": "\nAssigns the `value` to the upvalue with index `up` of the function.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setupvalue)", + "returns": [ + { + "name": "name", + "type": "function.return", + "view": "string" + } + ], + "start": 2200000, + "type": "function", + "view": "function debug.setupvalue(f: fun(...any):...unknown, up: integer, value: any)\n -> name: string" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/debug.lua", + "finish": 2200025, + "start": 2200009, + "type": "setfield" + } + ], + "desc": "\nAssigns the `value` to the upvalue with index `up` of the function.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setupvalue)", + "name": "debug.setupvalue", + "rawdesc": "\nAssigns the `value` to the upvalue with index `up` of the function.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setupvalue)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 2340033, + "name": "udata", + "start": 2340028, + "type": "local", + "view": "userdata" + }, + { + "finish": 2340040, + "name": "value", + "start": 2340035, + "type": "local", + "view": "any" + }, + { + "finish": 2340043, + "name": "n", + "start": 2340042, + "type": "local", + "view": "integer?" + } + ], + "desc": "\nSets the given `value` as\nthe `n`-th user value associated to the given `udata`.\n`udata` must be a full userdata.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setuservalue)", + "finish": 2340048, + "rawdesc": "\nSets the given `value` as\nthe `n`-th user value associated to the given `udata`.\n`udata` must be a full userdata.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setuservalue)", + "returns": [ + { + "name": "udata", + "type": "function.return", + "view": "userdata" + } + ], + "start": 2340000, + "type": "function", + "view": "function debug.setuservalue(udata: userdata, value: any, n?: integer)\n -> udata: userdata" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/debug.lua", + "finish": 2340027, + "start": 2340009, + "type": "setfield" + } + ], + "desc": "\nSets the given `value` as\nthe `n`-th user value associated to the given `udata`.\n`udata` must be a full userdata.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setuservalue)", + "name": "debug.setuservalue", + "rawdesc": "\nSets the given `value` as\nthe `n`-th user value associated to the given `udata`.\n`udata` must be a full userdata.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setuservalue)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 2470031, + "name": "thread", + "start": 2470025, + "type": "local", + "view": "thread" + }, + { + "finish": 2470040, + "name": "message", + "start": 2470033, + "type": "local", + "view": "any" + }, + { + "finish": 2470047, + "name": "level", + "start": 2470042, + "type": "local", + "view": "integer?" + } + ], + "desc": "\nReturns a string with a traceback of the call stack. The optional message string is appended at the beginning of the traceback.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.traceback)", + "finish": 2470052, + "rawdesc": "\nReturns a string with a traceback of the call stack. The optional message string is appended at the beginning of the traceback.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.traceback)", + "returns": [ + { + "name": "message", + "type": "function.return", + "view": "string" + } + ], + "start": 2470000, + "type": "function", + "view": "function debug.traceback(thread: thread, message?: any, level?: integer)\n -> message: string" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/debug.lua", + "finish": 2470024, + "start": 2470009, + "type": "setfield" + } + ], + "desc": "\nReturns a string with a traceback of the call stack. The optional message string is appended at the beginning of the traceback.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.traceback)", + "name": "debug.traceback", + "rawdesc": "\nReturns a string with a traceback of the call stack. The optional message string is appended at the beginning of the traceback.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.traceback)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 2590026, + "name": "f", + "start": 2590025, + "type": "local", + "view": "fun(...any):...unknown" + }, + { + "finish": 2590029, + "name": "n", + "start": 2590028, + "type": "local", + "view": "integer" + } + ], + "desc": "\nReturns a unique identifier (as a light userdata) for the upvalue numbered `n` from the given function.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.upvalueid)", + "finish": 2590034, + "rawdesc": "\nReturns a unique identifier (as a light userdata) for the upvalue numbered `n` from the given function.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.upvalueid)", + "returns": [ + { + "name": "id", + "type": "function.return", + "view": "lightuserdata" + } + ], + "start": 2590000, + "type": "function", + "view": "function debug.upvalueid(f: fun(...any):...unknown, n: integer)\n -> id: lightuserdata" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/debug.lua", + "finish": 2590024, + "start": 2590009, + "type": "setfield" + } + ], + "desc": "\nReturns a unique identifier (as a light userdata) for the upvalue numbered `n` from the given function.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.upvalueid)", + "name": "debug.upvalueid", + "rawdesc": "\nReturns a unique identifier (as a light userdata) for the upvalue numbered `n` from the given function.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.upvalueid)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 2710029, + "name": "f1", + "start": 2710027, + "type": "local", + "view": "fun(...any):...unknown" + }, + { + "finish": 2710033, + "name": "n1", + "start": 2710031, + "type": "local", + "view": "integer" + }, + { + "finish": 2710037, + "name": "f2", + "start": 2710035, + "type": "local", + "view": "fun(...any):...unknown" + }, + { + "finish": 2710041, + "name": "n2", + "start": 2710039, + "type": "local", + "view": "integer" + } + ], + "desc": "\nMake the `n1`-th upvalue of the Lua closure `f1` refer to the `n2`-th upvalue of the Lua closure `f2`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.upvaluejoin)", + "finish": 2710046, + "rawdesc": "\nMake the `n1`-th upvalue of the Lua closure `f1` refer to the `n2`-th upvalue of the Lua closure `f2`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.upvaluejoin)", + "start": 2710000, + "type": "function", + "view": "function debug.upvaluejoin(f1: fun(...any):...unknown, n1: integer, f2: fun(...any):...unknown, n2: integer)" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/debug.lua", + "finish": 2710026, + "start": 2710009, + "type": "setfield" + } + ], + "desc": "\nMake the `n1`-th upvalue of the Lua closure `f1` refer to the `n2`-th upvalue of the Lua closure `f2`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.upvaluejoin)", + "name": "debug.upvaluejoin", + "rawdesc": "\nMake the `n1`-th upvalue of the Lua closure `f1` refer to the `n2`-th upvalue of the Lua closure `f2`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.upvaluejoin)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 500024, + "name": "filename", + "start": 500016, + "type": "local", + "view": "string?" + } + ], + "desc": "\nOpens the named file and executes its content as a Lua chunk. When called without arguments, `dofile` executes the content of the standard input (`stdin`). Returns all values returned by the chunk. In case of errors, `dofile` propagates the error to its caller. (That is, `dofile` does not run in protected mode.)\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-dofile)", + "finish": 500029, + "rawdesc": "\nOpens the named file and executes its content as a Lua chunk. When called without arguments, `dofile` executes the content of the standard input (`stdin`). Returns all values returned by the chunk. In case of errors, `dofile` propagates the error to its caller. (That is, `dofile` does not run in protected mode.)\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-dofile)", + "returns": [ + { + "name": "...", + "type": "function.return", + "view": "any" + } + ], + "start": 500000, + "type": "function", + "view": "function dofile(filename?: string)\n -> ...any" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 500015, + "start": 500009, + "type": "setglobal" + } + ], + "desc": "\nOpens the named file and executes its content as a Lua chunk. When called without arguments, `dofile` executes the content of the standard input (`stdin`). Returns all values returned by the chunk. In case of errors, `dofile` propagates the error to its caller. (That is, `dofile` does not run in protected mode.)\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-dofile)", + "name": "dofile", + "rawdesc": "\nOpens the named file and executes its content as a Lua chunk. When called without arguments, `dofile` executes the content of the standard input (`stdin`). Returns all values returned by the chunk. In case of errors, `dofile` propagates the error to its caller. (That is, `dofile` does not run in protected mode.)\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-dofile)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 620022, + "name": "message", + "start": 620015, + "type": "local", + "view": "any" + }, + { + "finish": 620029, + "name": "level", + "start": 620024, + "type": "local", + "view": "integer?" + } + ], + "desc": "\nTerminates the last protected function called and returns message as the error object.\n\nUsually, `error` adds some information about the error position at the beginning of the message, if the message is a string.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-error)", + "finish": 620034, + "rawdesc": "\nTerminates the last protected function called and returns message as the error object.\n\nUsually, `error` adds some information about the error position at the beginning of the message, if the message is a string.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-error)", + "start": 620000, + "type": "function", + "view": "function error(message: any, level?: integer)" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 620014, + "start": 620009, + "type": "setglobal" + } + ], + "desc": "\nTerminates the last protected function called and returns message as the error object.\n\nUsually, `error` adds some information about the error position at the beginning of the message, if the message is a string.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-error)", + "name": "error", + "rawdesc": "\nTerminates the last protected function called and returns message as the error object.\n\nUsually, `error` adds some information about the error position at the beginning of the message, if the message is a string.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-error)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 810018, + "name": "f", + "start": 810017, + "type": "local", + "view": "(integer|fun(...any):...unknown)?" + } + ], + "desc": "\nReturns the current environment in use by the function. `f` can be a Lua function or a number that specifies the function at that stack level.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-getfenv)", + "finish": 810023, + "rawdesc": "\nReturns the current environment in use by the function. `f` can be a Lua function or a number that specifies the function at that stack level.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-getfenv)", + "returns": [ + { + "type": "function.return", + "view": "table" + } + ], + "start": 810000, + "type": "function", + "view": "function getfenv(f?: integer|fun(...any):...unknown)\n -> table" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 810016, + "start": 810009, + "type": "setglobal" + } + ], + "desc": "\nReturns the current environment in use by the function. `f` can be a Lua function or a number that specifies the function at that stack level.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-getfenv)", + "name": "getfenv", + "rawdesc": "\nReturns the current environment in use by the function. `f` can be a Lua function or a number that specifies the function at that stack level.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-getfenv)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 910028, + "name": "object", + "start": 910022, + "type": "local", + "view": "any" + } + ], + "desc": "\nIf object does not have a metatable, returns nil. Otherwise, if the object's metatable has a __metatable field, returns the associated value. Otherwise, returns the metatable of the given object.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-getmetatable)", + "finish": 910033, + "rawdesc": "\nIf object does not have a metatable, returns nil. Otherwise, if the object's metatable has a __metatable field, returns the associated value. Otherwise, returns the metatable of the given object.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-getmetatable)", + "returns": [ + { + "name": "metatable", + "type": "function.return", + "view": "table" + } + ], + "start": 910000, + "type": "function", + "view": "function getmetatable(object: any)\n -> metatable: table" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 910021, + "start": 910009, + "type": "setglobal" + } + ], + "desc": "\nIf object does not have a metatable, returns nil. Otherwise, if the object's metatable has a __metatable field, returns the associated value. Otherwise, returns the metatable of the given object.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-getmetatable)", + "name": "getmetatable", + "rawdesc": "\nIf object does not have a metatable, returns nil. Otherwise, if the object's metatable has a __metatable field, returns the associated value. Otherwise, returns the metatable of the given object.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-getmetatable)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "desc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io)\n", + "finish": 260007, + "rawdesc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io)\n", + "start": 260005, + "type": "table", + "view": "iolib" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/io.lua", + "finish": 260002, + "start": 260000, + "type": "setglobal" + } + ], + "desc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io)\n", + "name": "io", + "rawdesc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io)\n", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "desc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-file)\n", + "finish": 510022, + "name": "file", + "rawdesc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-file)\n", + "start": 510018, + "type": "local", + "view": "file*?" + } + ], + "desc": "\nClose `file` or default output file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.close)\n\n\n```lua\nexitcode:\n | \"exit\"\n | \"signal\"\n```", + "finish": 510027, + "rawdesc": "\nClose `file` or default output file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.close)\n\n\n```lua\nexitcode:\n | \"exit\"\n | \"signal\"\n```", + "returns": [ + { + "name": "suc", + "type": "function.return", + "view": "boolean?" + }, + { + "name": "exitcode", + "type": "function.return", + "view": "(\"exit\"|\"signal\")?" + }, + { + "name": "code", + "type": "function.return", + "view": "integer?" + } + ], + "start": 510000, + "type": "function", + "view": "function io.close(file?: file*)\n -> suc: boolean?\n 2. exitcode: (\"exit\"|\"signal\")?\n 3. code: integer?" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/io.lua", + "finish": 510017, + "start": 510009, + "type": "setfield" + } + ], + "desc": "\nClose `file` or default output file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.close)\n\n\n```lua\nexitcode:\n | \"exit\"\n | \"signal\"\n```", + "name": "io.close", + "rawdesc": "\nClose `file` or default output file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.close)\n\n\n```lua\nexitcode:\n | \"exit\"\n | \"signal\"\n```", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [], + "desc": "\nSaves any written data to default output file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.flush)", + "finish": 580023, + "rawdesc": "\nSaves any written data to default output file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.flush)", + "start": 580000, + "type": "function", + "view": "function io.flush()" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/io.lua", + "finish": 580017, + "start": 580009, + "type": "setfield" + } + ], + "desc": "\nSaves any written data to default output file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.flush)", + "name": "io.flush", + "rawdesc": "\nSaves any written data to default output file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.flush)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "desc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-file)\n", + "finish": 670022, + "name": "file", + "rawdesc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-file)\n", + "start": 670018, + "type": "local", + "view": "string|file*" + } + ], + "desc": "\nSets `file` as the default input file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.input)", + "finish": 670027, + "rawdesc": "\nSets `file` as the default input file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.input)", + "start": 670000, + "type": "function", + "view": "function io.input(file: string|file*)" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/io.lua", + "finish": 670017, + "start": 670009, + "type": "setfield" + } + ], + "desc": "\nSets `file` as the default input file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.input)", + "name": "io.input", + "rawdesc": "\nSets `file` as the default input file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.input)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 830026, + "name": "filename", + "start": 830018, + "type": "local", + "view": "string?" + }, + { + "finish": 830031, + "start": 830028, + "type": "...", + "view": "string|integer|\"L\"|\"a\"|\"l\"...(+1)" + } + ], + "desc": "\n------\n```lua\nfor c in io.lines(filename, ...) do\n body\nend\n```\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.lines)\n\n\n```lua\n...(param):\n | \"n\" -- Reads a numeral and returns it as number.\n | \"a\" -- Reads the whole file.\n -> \"l\" -- Reads the next line skipping the end of line.\n | \"L\" -- Reads the next line keeping the end of line.\n```", + "finish": 830036, + "rawdesc": "\n------\n```lua\nfor c in io.lines(filename, ...) do\n body\nend\n```\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.lines)\n\n\n```lua\n...(param):\n | \"n\" -- Reads a numeral and returns it as number.\n | \"a\" -- Reads the whole file.\n -> \"l\" -- Reads the next line skipping the end of line.\n | \"L\" -- Reads the next line keeping the end of line.\n```", + "returns": [ + { + "type": "function.return", + "view": "fun():any, ...unknown" + } + ], + "start": 830000, + "type": "function", + "view": "function io.lines(filename?: string, ...string|integer|\"L\"|\"a\"|\"l\"...(+1))\n -> fun():any, ...unknown" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/io.lua", + "finish": 830017, + "start": 830009, + "type": "setfield" + } + ], + "desc": "\n------\n```lua\nfor c in io.lines(filename, ...) do\n body\nend\n```\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.lines)\n\n\n```lua\n...(param):\n | \"n\" -- Reads a numeral and returns it as number.\n | \"a\" -- Reads the whole file.\n -> \"l\" -- Reads the next line skipping the end of line.\n | \"L\" -- Reads the next line keeping the end of line.\n```", + "name": "io.lines", + "rawdesc": "\n------\n```lua\nfor c in io.lines(filename, ...) do\n body\nend\n```\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.lines)\n\n\n```lua\n...(param):\n | \"n\" -- Reads a numeral and returns it as number.\n | \"a\" -- Reads the whole file.\n -> \"l\" -- Reads the next line skipping the end of line.\n | \"L\" -- Reads the next line keeping the end of line.\n```", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 950025, + "name": "filename", + "start": 950017, + "type": "local", + "view": "string" + }, + { + "finish": 950031, + "name": "mode", + "start": 950027, + "type": "local", + "view": "(\"a\"|\"a+\"|\"a+b\"|\"ab\"|\"r\"...(+7))?" + } + ], + "desc": "\nOpens a file, in the mode specified in the string `mode`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.open)\n\n\n```lua\nmode:\n -> \"r\" -- Read mode.\n | \"w\" -- Write mode.\n | \"a\" -- Append mode.\n | \"r+\" -- Update mode, all previous data is preserved.\n | \"w+\" -- Update mode, all previous data is erased.\n | \"a+\" -- Append update mode, previous data is preserved, writing is only allowed at the end of file.\n | \"rb\" -- Read mode. (in binary mode.)\n | \"wb\" -- Write mode. (in binary mode.)\n | \"ab\" -- Append mode. (in binary mode.)\n | \"r+b\" -- Update mode, all previous data is preserved. (in binary mode.)\n | \"w+b\" -- Update mode, all previous data is erased. (in binary mode.)\n | \"a+b\" -- Append update mode, previous data is preserved, writing is only allowed at the end of file. (in binary mode.)\n```", + "finish": 950036, + "rawdesc": "\nOpens a file, in the mode specified in the string `mode`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.open)\n\n\n```lua\nmode:\n -> \"r\" -- Read mode.\n | \"w\" -- Write mode.\n | \"a\" -- Append mode.\n | \"r+\" -- Update mode, all previous data is preserved.\n | \"w+\" -- Update mode, all previous data is erased.\n | \"a+\" -- Append update mode, previous data is preserved, writing is only allowed at the end of file.\n | \"rb\" -- Read mode. (in binary mode.)\n | \"wb\" -- Write mode. (in binary mode.)\n | \"ab\" -- Append mode. (in binary mode.)\n | \"r+b\" -- Update mode, all previous data is preserved. (in binary mode.)\n | \"w+b\" -- Update mode, all previous data is erased. (in binary mode.)\n | \"a+b\" -- Append update mode, previous data is preserved, writing is only allowed at the end of file. (in binary mode.)\n```", + "returns": [ + { + "type": "function.return", + "view": "file*?" + }, + { + "name": "errmsg", + "type": "function.return", + "view": "string?" + } + ], + "start": 950000, + "type": "function", + "view": "function io.open(filename: string, mode?: \"a\"|\"a+\"|\"a+b\"|\"ab\"|\"r\"...(+7))\n -> file*?\n 2. errmsg: string?" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/io.lua", + "finish": 950016, + "start": 950009, + "type": "setfield" + } + ], + "desc": "\nOpens a file, in the mode specified in the string `mode`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.open)\n\n\n```lua\nmode:\n -> \"r\" -- Read mode.\n | \"w\" -- Write mode.\n | \"a\" -- Append mode.\n | \"r+\" -- Update mode, all previous data is preserved.\n | \"w+\" -- Update mode, all previous data is erased.\n | \"a+\" -- Append update mode, previous data is preserved, writing is only allowed at the end of file.\n | \"rb\" -- Read mode. (in binary mode.)\n | \"wb\" -- Write mode. (in binary mode.)\n | \"ab\" -- Append mode. (in binary mode.)\n | \"r+b\" -- Update mode, all previous data is preserved. (in binary mode.)\n | \"w+b\" -- Update mode, all previous data is erased. (in binary mode.)\n | \"a+b\" -- Append update mode, previous data is preserved, writing is only allowed at the end of file. (in binary mode.)\n```", + "name": "io.open", + "rawdesc": "\nOpens a file, in the mode specified in the string `mode`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.open)\n\n\n```lua\nmode:\n -> \"r\" -- Read mode.\n | \"w\" -- Write mode.\n | \"a\" -- Append mode.\n | \"r+\" -- Update mode, all previous data is preserved.\n | \"w+\" -- Update mode, all previous data is erased.\n | \"a+\" -- Append update mode, previous data is preserved, writing is only allowed at the end of file.\n | \"rb\" -- Read mode. (in binary mode.)\n | \"wb\" -- Write mode. (in binary mode.)\n | \"ab\" -- Append mode. (in binary mode.)\n | \"r+b\" -- Update mode, all previous data is preserved. (in binary mode.)\n | \"w+b\" -- Update mode, all previous data is erased. (in binary mode.)\n | \"a+b\" -- Append update mode, previous data is preserved, writing is only allowed at the end of file. (in binary mode.)\n```", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "desc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-file)\n", + "finish": 1040023, + "name": "file", + "rawdesc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-file)\n", + "start": 1040019, + "type": "local", + "view": "string|file*" + } + ], + "desc": "\nSets `file` as the default output file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.output)", + "finish": 1040028, + "rawdesc": "\nSets `file` as the default output file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.output)", + "start": 1040000, + "type": "function", + "view": "function io.output(file: string|file*)" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/io.lua", + "finish": 1040018, + "start": 1040009, + "type": "setfield" + } + ], + "desc": "\nSets `file` as the default output file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.output)", + "name": "io.output", + "rawdesc": "\nSets `file` as the default output file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.output)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1190022, + "name": "prog", + "start": 1190018, + "type": "local", + "view": "string" + }, + { + "finish": 1190028, + "name": "mode", + "start": 1190024, + "type": "local", + "view": "(\"r\"|\"w\")?" + } + ], + "desc": "\nStarts program prog in a separated process.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.popen)\n\n\n```lua\nmode:\n | \"r\" -- Read data from this program by `file`.\n | \"w\" -- Write data to this program by `file`.\n```", + "finish": 1190033, + "rawdesc": "\nStarts program prog in a separated process.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.popen)\n\n\n```lua\nmode:\n | \"r\" -- Read data from this program by `file`.\n | \"w\" -- Write data to this program by `file`.\n```", + "returns": [ + { + "type": "function.return", + "view": "file*?" + }, + { + "name": "errmsg", + "type": "function.return", + "view": "string?" + } + ], + "start": 1190000, + "type": "function", + "view": "function io.popen(prog: string, mode?: \"r\"|\"w\")\n -> file*?\n 2. errmsg: string?" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/io.lua", + "finish": 1190017, + "start": 1190009, + "type": "setfield" + } + ], + "desc": "\nStarts program prog in a separated process.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.popen)\n\n\n```lua\nmode:\n | \"r\" -- Read data from this program by `file`.\n | \"w\" -- Write data to this program by `file`.\n```", + "name": "io.popen", + "rawdesc": "\nStarts program prog in a separated process.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.popen)\n\n\n```lua\nmode:\n | \"r\" -- Read data from this program by `file`.\n | \"w\" -- Write data to this program by `file`.\n```", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1300020, + "start": 1300017, + "type": "...", + "view": "string|integer|\"L\"|\"a\"|\"l\"...(+1)" + } + ], + "desc": "\nReads the `file`, according to the given formats, which specify what to read.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.read)\n\n\n```lua\n...(param):\n | \"n\" -- Reads a numeral and returns it as number.\n | \"a\" -- Reads the whole file.\n -> \"l\" -- Reads the next line skipping the end of line.\n | \"L\" -- Reads the next line keeping the end of line.\n```", + "finish": 1300025, + "rawdesc": "\nReads the `file`, according to the given formats, which specify what to read.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.read)\n\n\n```lua\n...(param):\n | \"n\" -- Reads a numeral and returns it as number.\n | \"a\" -- Reads the whole file.\n -> \"l\" -- Reads the next line skipping the end of line.\n | \"L\" -- Reads the next line keeping the end of line.\n```", + "returns": [ + { + "type": "function.return", + "view": "any" + }, + { + "name": "...", + "type": "function.return", + "view": "any" + } + ], + "start": 1300000, + "type": "function", + "view": "function io.read(...string|integer|\"L\"|\"a\"|\"l\"...(+1))\n -> any\n 2. ...any" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/io.lua", + "finish": 1300016, + "start": 1300009, + "type": "setfield" + } + ], + "desc": "\nReads the `file`, according to the given formats, which specify what to read.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.read)\n\n\n```lua\n...(param):\n | \"n\" -- Reads a numeral and returns it as number.\n | \"a\" -- Reads the whole file.\n -> \"l\" -- Reads the next line skipping the end of line.\n | \"L\" -- Reads the next line keeping the end of line.\n```", + "name": "io.read", + "rawdesc": "\nReads the `file`, according to the given formats, which specify what to read.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.read)\n\n\n```lua\n...(param):\n | \"n\" -- Reads a numeral and returns it as number.\n | \"a\" -- Reads the whole file.\n -> \"l\" -- Reads the next line skipping the end of line.\n | \"L\" -- Reads the next line keeping the end of line.\n```", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [], + "desc": "\nIn case of success, returns a handle for a temporary file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.tmpfile)", + "finish": 1390025, + "rawdesc": "\nIn case of success, returns a handle for a temporary file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.tmpfile)", + "returns": [ + { + "type": "function.return", + "view": "file*" + } + ], + "start": 1390000, + "type": "function", + "view": "function io.tmpfile()\n -> file*" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/io.lua", + "finish": 1390019, + "start": 1390009, + "type": "setfield" + } + ], + "desc": "\nIn case of success, returns a handle for a temporary file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.tmpfile)", + "name": "io.tmpfile", + "rawdesc": "\nIn case of success, returns a handle for a temporary file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.tmpfile)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "desc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-file)\n", + "finish": 1540021, + "name": "file", + "rawdesc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-file)\n", + "start": 1540017, + "type": "local", + "view": "file*" + } + ], + "desc": "\nChecks whether `obj` is a valid file handle.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.type)\n\n\n```lua\nreturn #1:\n | \"file\" -- Is an open file handle.\n | \"closed file\" -- Is a closed file handle.\n | `nil` -- Is not a file handle.\n```", + "finish": 1540026, + "rawdesc": "\nChecks whether `obj` is a valid file handle.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.type)\n\n\n```lua\nreturn #1:\n | \"file\" -- Is an open file handle.\n | \"closed file\" -- Is a closed file handle.\n | `nil` -- Is not a file handle.\n```", + "returns": [ + { + "type": "function.return", + "view": "\"closed file\"|\"file\"|`nil`" + } + ], + "start": 1540000, + "type": "function", + "view": "function io.type(file: file*)\n -> \"closed file\"|\"file\"|`nil`" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/io.lua", + "finish": 1540016, + "start": 1540009, + "type": "setfield" + } + ], + "desc": "\nChecks whether `obj` is a valid file handle.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.type)\n\n\n```lua\nreturn #1:\n | \"file\" -- Is an open file handle.\n | \"closed file\" -- Is a closed file handle.\n | `nil` -- Is not a file handle.\n```", + "name": "io.type", + "rawdesc": "\nChecks whether `obj` is a valid file handle.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.type)\n\n\n```lua\nreturn #1:\n | \"file\" -- Is an open file handle.\n | \"closed file\" -- Is a closed file handle.\n | `nil` -- Is not a file handle.\n```", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1630021, + "start": 1630018, + "type": "...", + "view": "unknown" + } + ], + "desc": "\nWrites the value of each of its arguments to default output file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.write)", + "finish": 1630026, + "rawdesc": "\nWrites the value of each of its arguments to default output file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.write)", + "returns": [ + { + "type": "function.return", + "view": "file*" + }, + { + "name": "errmsg", + "type": "function.return", + "view": "string?" + } + ], + "start": 1630000, + "type": "function", + "view": "function io.write(...any)\n -> file*\n 2. errmsg: string?" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/io.lua", + "finish": 1630017, + "start": 1630009, + "type": "setfield" + } + ], + "desc": "\nWrites the value of each of its arguments to default output file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.write)", + "name": "io.write", + "rawdesc": "\nWrites the value of each of its arguments to default output file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.write)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1080017, + "name": "t", + "start": 1080016, + "type": "local", + "view": "" + } + ], + "desc": "\nReturns three values (an iterator function, the table `t`, and `0`) so that the construction\n```lua\n for i,v in ipairs(t) do body end\n```\nwill iterate over the key–value pairs `(1,t[1]), (2,t[2]), ...`, up to the first absent index.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-ipairs)", + "finish": 1080022, + "rawdesc": "\nReturns three values (an iterator function, the table `t`, and `0`) so that the construction\n```lua\n for i,v in ipairs(t) do body end\n```\nwill iterate over the key–value pairs `(1,t[1]), (2,t[2]), ...`, up to the first absent index.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-ipairs)", + "returns": [ + { + "type": "function.return", + "view": "fun(table: [], i?: integer):integer, " + }, + { + "type": "function.return", + "view": "" + }, + { + "name": "i", + "type": "function.return", + "view": "integer" + } + ], + "start": 1080000, + "type": "function", + "view": "function ipairs(t: )\n -> fun(table: [], i?: integer):integer, \n 2. \n 3. i: integer" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 1080015, + "start": 1080009, + "type": "setglobal" + } + ], + "desc": "\nReturns three values (an iterator function, the table `t`, and `0`) so that the construction\n```lua\n for i,v in ipairs(t) do body end\n```\nwill iterate over the key–value pairs `(1,t[1]), (2,t[2]), ...`, up to the first absent index.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-ipairs)", + "name": "ipairs", + "rawdesc": "\nReturns three values (an iterator function, the table `t`, and `0`) so that the construction\n```lua\n for i,v in ipairs(t) do body end\n```\nwill iterate over the key–value pairs `(1,t[1]), (2,t[2]), ...`, up to the first absent index.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-ipairs)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1300019, + "name": "chunk", + "start": 1300014, + "type": "local", + "view": "string|function" + }, + { + "finish": 1300030, + "name": "chunkname", + "start": 1300021, + "type": "local", + "view": "string?" + }, + { + "finish": 1300036, + "name": "mode", + "start": 1300032, + "type": "local", + "view": "(\"b\"|\"bt\"|\"t\")?" + }, + { + "finish": 1300041, + "name": "env", + "start": 1300038, + "type": "local", + "view": "table?" + } + ], + "desc": "\nLoads a chunk.\n\nIf `chunk` is a string, the chunk is this string. If `chunk` is a function, `load` calls it repeatedly to get the chunk pieces. Each call to `chunk` must return a string that concatenates with previous results. A return of an empty string, `nil`, or no value signals the end of the chunk.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-load)\n\n\n```lua\nmode:\n | \"b\" -- Only binary chunks.\n | \"t\" -- Only text chunks.\n -> \"bt\" -- Both binary and text.\n```", + "finish": 1300046, + "rawdesc": "\nLoads a chunk.\n\nIf `chunk` is a string, the chunk is this string. If `chunk` is a function, `load` calls it repeatedly to get the chunk pieces. Each call to `chunk` must return a string that concatenates with previous results. A return of an empty string, `nil`, or no value signals the end of the chunk.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-load)\n\n\n```lua\nmode:\n | \"b\" -- Only binary chunks.\n | \"t\" -- Only text chunks.\n -> \"bt\" -- Both binary and text.\n```", + "returns": [ + { + "type": "function.return", + "view": "function?" + }, + { + "name": "error_message", + "type": "function.return", + "view": "string?" + } + ], + "start": 1300000, + "type": "function", + "view": "function load(chunk: string|function, chunkname?: string, mode?: \"b\"|\"bt\"|\"t\", env?: table)\n -> function?\n 2. error_message: string?" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 1300013, + "start": 1300009, + "type": "setglobal" + } + ], + "desc": "\nLoads a chunk.\n\nIf `chunk` is a string, the chunk is this string. If `chunk` is a function, `load` calls it repeatedly to get the chunk pieces. Each call to `chunk` must return a string that concatenates with previous results. A return of an empty string, `nil`, or no value signals the end of the chunk.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-load)\n\n\n```lua\nmode:\n | \"b\" -- Only binary chunks.\n | \"t\" -- Only text chunks.\n -> \"bt\" -- Both binary and text.\n```", + "name": "load", + "rawdesc": "\nLoads a chunk.\n\nIf `chunk` is a string, the chunk is this string. If `chunk` is a function, `load` calls it repeatedly to get the chunk pieces. Each call to `chunk` must return a string that concatenates with previous results. A return of an empty string, `nil`, or no value signals the end of the chunk.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-load)\n\n\n```lua\nmode:\n | \"b\" -- Only binary chunks.\n | \"t\" -- Only text chunks.\n -> \"bt\" -- Both binary and text.\n```", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1430026, + "name": "filename", + "start": 1430018, + "type": "local", + "view": "string?" + }, + { + "finish": 1430032, + "name": "mode", + "start": 1430028, + "type": "local", + "view": "(\"b\"|\"bt\"|\"t\")?" + }, + { + "finish": 1430037, + "name": "env", + "start": 1430034, + "type": "local", + "view": "table?" + } + ], + "desc": "\nLoads a chunk from file `filename` or from the standard input, if no file name is given.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-loadfile)\n\n\n```lua\nmode:\n | \"b\" -- Only binary chunks.\n | \"t\" -- Only text chunks.\n -> \"bt\" -- Both binary and text.\n```", + "finish": 1430042, + "rawdesc": "\nLoads a chunk from file `filename` or from the standard input, if no file name is given.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-loadfile)\n\n\n```lua\nmode:\n | \"b\" -- Only binary chunks.\n | \"t\" -- Only text chunks.\n -> \"bt\" -- Both binary and text.\n```", + "returns": [ + { + "type": "function.return", + "view": "function?" + }, + { + "name": "error_message", + "type": "function.return", + "view": "string?" + } + ], + "start": 1430000, + "type": "function", + "view": "function loadfile(filename?: string, mode?: \"b\"|\"bt\"|\"t\", env?: table)\n -> function?\n 2. error_message: string?" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 1430017, + "start": 1430009, + "type": "setglobal" + } + ], + "desc": "\nLoads a chunk from file `filename` or from the standard input, if no file name is given.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-loadfile)\n\n\n```lua\nmode:\n | \"b\" -- Only binary chunks.\n | \"t\" -- Only text chunks.\n -> \"bt\" -- Both binary and text.\n```", + "name": "loadfile", + "rawdesc": "\nLoads a chunk from file `filename` or from the standard input, if no file name is given.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-loadfile)\n\n\n```lua\nmode:\n | \"b\" -- Only binary chunks.\n | \"t\" -- Only text chunks.\n -> \"bt\" -- Both binary and text.\n```", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1560024, + "name": "text", + "start": 1560020, + "type": "local", + "view": "string" + }, + { + "finish": 1560035, + "name": "chunkname", + "start": 1560026, + "type": "local", + "view": "string?" + } + ], + "desc": "\nLoads a chunk from the given string.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-loadstring)", + "finish": 1560040, + "rawdesc": "\nLoads a chunk from the given string.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-loadstring)", + "returns": [ + { + "type": "function.return", + "view": "function?" + }, + { + "name": "error_message", + "type": "function.return", + "view": "string?" + } + ], + "start": 1560000, + "type": "function", + "view": "function loadstring(text: string, chunkname?: string)\n -> function?\n 2. error_message: string?" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 1560019, + "start": 1560009, + "type": "setglobal" + } + ], + "desc": "\nLoads a chunk from the given string.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-loadstring)", + "name": "loadstring", + "rawdesc": "\nLoads a chunk from the given string.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-loadstring)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "desc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math)\n", + "finish": 320009, + "rawdesc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math)\n", + "start": 320007, + "type": "table", + "view": "mathlib" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 320004, + "start": 320000, + "type": "setglobal" + } + ], + "desc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math)\n", + "name": "math", + "rawdesc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math)\n", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 430019, + "name": "x", + "start": 430018, + "type": "local", + "view": "" + } + ], + "desc": "\nReturns the absolute value of `x`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.abs)", + "finish": 430024, + "rawdesc": "\nReturns the absolute value of `x`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.abs)", + "returns": [ + { + "type": "function.return", + "view": "" + } + ], + "start": 430000, + "type": "function", + "view": "function math.abs(x: )\n -> " + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 430017, + "start": 430009, + "type": "setfield" + } + ], + "desc": "\nReturns the absolute value of `x`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.abs)", + "name": "math.abs", + "rawdesc": "\nReturns the absolute value of `x`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.abs)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 530020, + "name": "x", + "start": 530019, + "type": "local", + "view": "number" + } + ], + "desc": "\nReturns the arc cosine of `x` (in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.acos)", + "finish": 530025, + "rawdesc": "\nReturns the arc cosine of `x` (in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.acos)", + "returns": [ + { + "type": "function.return", + "view": "number" + } + ], + "start": 530000, + "type": "function", + "view": "function math.acos(x: number)\n -> number" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 530018, + "start": 530009, + "type": "setfield" + } + ], + "desc": "\nReturns the arc cosine of `x` (in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.acos)", + "name": "math.acos", + "rawdesc": "\nReturns the arc cosine of `x` (in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.acos)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 630020, + "name": "x", + "start": 630019, + "type": "local", + "view": "number" + } + ], + "desc": "\nReturns the arc sine of `x` (in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.asin)", + "finish": 630025, + "rawdesc": "\nReturns the arc sine of `x` (in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.asin)", + "returns": [ + { + "type": "function.return", + "view": "number" + } + ], + "start": 630000, + "type": "function", + "view": "function math.asin(x: number)\n -> number" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 630018, + "start": 630009, + "type": "setfield" + } + ], + "desc": "\nReturns the arc sine of `x` (in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.asin)", + "name": "math.asin", + "rawdesc": "\nReturns the arc sine of `x` (in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.asin)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 740020, + "name": "y", + "start": 740019, + "type": "local", + "view": "number" + }, + { + "finish": 740023, + "name": "x", + "start": 740022, + "type": "local", + "view": "number?" + } + ], + "desc": "\nReturns the arc tangent of `y/x` (in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.atan)", + "finish": 740028, + "rawdesc": "\nReturns the arc tangent of `y/x` (in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.atan)", + "returns": [ + { + "type": "function.return", + "view": "number" + } + ], + "start": 740000, + "type": "function", + "view": "function math.atan(y: number, x?: number)\n -> number" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 740018, + "start": 740009, + "type": "setfield" + } + ], + "desc": "\nReturns the arc tangent of `y/x` (in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.atan)", + "name": "math.atan", + "rawdesc": "\nReturns the arc tangent of `y/x` (in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.atan)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 860021, + "name": "y", + "start": 860020, + "type": "local", + "view": "number" + }, + { + "finish": 860024, + "name": "x", + "start": 860023, + "type": "local", + "view": "number" + } + ], + "desc": "\nReturns the arc tangent of `y/x` (in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.atan2)", + "finish": 860029, + "rawdesc": "\nReturns the arc tangent of `y/x` (in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.atan2)", + "returns": [ + { + "type": "function.return", + "view": "number" + } + ], + "start": 860000, + "type": "function", + "view": "function math.atan2(y: number, x: number)\n -> number" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 860019, + "start": 860009, + "type": "setfield" + } + ], + "desc": "\nReturns the arc tangent of `y/x` (in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.atan2)", + "name": "math.atan2", + "rawdesc": "\nReturns the arc tangent of `y/x` (in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.atan2)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 960020, + "name": "x", + "start": 960019, + "type": "local", + "view": "number" + } + ], + "desc": "\nReturns the smallest integral value larger than or equal to `x`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.ceil)", + "finish": 960025, + "rawdesc": "\nReturns the smallest integral value larger than or equal to `x`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.ceil)", + "returns": [ + { + "type": "function.return", + "view": "integer" + } + ], + "start": 960000, + "type": "function", + "view": "function math.ceil(x: number)\n -> integer" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 960018, + "start": 960009, + "type": "setfield" + } + ], + "desc": "\nReturns the smallest integral value larger than or equal to `x`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.ceil)", + "name": "math.ceil", + "rawdesc": "\nReturns the smallest integral value larger than or equal to `x`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.ceil)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1060019, + "name": "x", + "start": 1060018, + "type": "local", + "view": "number" + } + ], + "desc": "\nReturns the cosine of `x` (assumed to be in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.cos)", + "finish": 1060024, + "rawdesc": "\nReturns the cosine of `x` (assumed to be in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.cos)", + "returns": [ + { + "type": "function.return", + "view": "number" + } + ], + "start": 1060000, + "type": "function", + "view": "function math.cos(x: number)\n -> number" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 1060017, + "start": 1060009, + "type": "setfield" + } + ], + "desc": "\nReturns the cosine of `x` (assumed to be in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.cos)", + "name": "math.cos", + "rawdesc": "\nReturns the cosine of `x` (assumed to be in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.cos)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1170020, + "name": "x", + "start": 1170019, + "type": "local", + "view": "number" + } + ], + "desc": "\nReturns the hyperbolic cosine of `x` (assumed to be in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.cosh)", + "finish": 1170025, + "rawdesc": "\nReturns the hyperbolic cosine of `x` (assumed to be in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.cosh)", + "returns": [ + { + "type": "function.return", + "view": "number" + } + ], + "start": 1170000, + "type": "function", + "view": "function math.cosh(x: number)\n -> number" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 1170018, + "start": 1170009, + "type": "setfield" + } + ], + "desc": "\nReturns the hyperbolic cosine of `x` (assumed to be in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.cosh)", + "name": "math.cosh", + "rawdesc": "\nReturns the hyperbolic cosine of `x` (assumed to be in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.cosh)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1270019, + "name": "x", + "start": 1270018, + "type": "local", + "view": "number" + } + ], + "desc": "\nConverts the angle `x` from radians to degrees.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.deg)", + "finish": 1270024, + "rawdesc": "\nConverts the angle `x` from radians to degrees.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.deg)", + "returns": [ + { + "type": "function.return", + "view": "number" + } + ], + "start": 1270000, + "type": "function", + "view": "function math.deg(x: number)\n -> number" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 1270017, + "start": 1270009, + "type": "setfield" + } + ], + "desc": "\nConverts the angle `x` from radians to degrees.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.deg)", + "name": "math.deg", + "rawdesc": "\nConverts the angle `x` from radians to degrees.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.deg)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1370019, + "name": "x", + "start": 1370018, + "type": "local", + "view": "number" + } + ], + "desc": "\nReturns the value `e^x` (where `e` is the base of natural logarithms).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.exp)", + "finish": 1370024, + "rawdesc": "\nReturns the value `e^x` (where `e` is the base of natural logarithms).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.exp)", + "returns": [ + { + "type": "function.return", + "view": "number" + } + ], + "start": 1370000, + "type": "function", + "view": "function math.exp(x: number)\n -> number" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 1370017, + "start": 1370009, + "type": "setfield" + } + ], + "desc": "\nReturns the value `e^x` (where `e` is the base of natural logarithms).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.exp)", + "name": "math.exp", + "rawdesc": "\nReturns the value `e^x` (where `e` is the base of natural logarithms).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.exp)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1470021, + "name": "x", + "start": 1470020, + "type": "local", + "view": "number" + } + ], + "desc": "\nReturns the largest integral value smaller than or equal to `x`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.floor)", + "finish": 1470026, + "rawdesc": "\nReturns the largest integral value smaller than or equal to `x`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.floor)", + "returns": [ + { + "type": "function.return", + "view": "integer" + } + ], + "start": 1470000, + "type": "function", + "view": "function math.floor(x: number)\n -> integer" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 1470019, + "start": 1470009, + "type": "setfield" + } + ], + "desc": "\nReturns the largest integral value smaller than or equal to `x`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.floor)", + "name": "math.floor", + "rawdesc": "\nReturns the largest integral value smaller than or equal to `x`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.floor)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1580020, + "name": "x", + "start": 1580019, + "type": "local", + "view": "number" + }, + { + "finish": 1580023, + "name": "y", + "start": 1580022, + "type": "local", + "view": "number" + } + ], + "desc": "\nReturns the remainder of the division of `x` by `y` that rounds the quotient towards zero.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.fmod)", + "finish": 1580028, + "rawdesc": "\nReturns the remainder of the division of `x` by `y` that rounds the quotient towards zero.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.fmod)", + "returns": [ + { + "type": "function.return", + "view": "number" + } + ], + "start": 1580000, + "type": "function", + "view": "function math.fmod(x: number, y: number)\n -> number" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 1580018, + "start": 1580009, + "type": "setfield" + } + ], + "desc": "\nReturns the remainder of the division of `x` by `y` that rounds the quotient towards zero.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.fmod)", + "name": "math.fmod", + "rawdesc": "\nReturns the remainder of the division of `x` by `y` that rounds the quotient towards zero.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.fmod)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1700021, + "name": "x", + "start": 1700020, + "type": "local", + "view": "number" + } + ], + "desc": "\nDecompose `x` into tails and exponents. Returns `m` and `e` such that `x = m * (2 ^ e)`, `e` is an integer and the absolute value of `m` is in the range [0.5, 1) (or zero when `x` is zero).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.frexp)", + "finish": 1700026, + "rawdesc": "\nDecompose `x` into tails and exponents. Returns `m` and `e` such that `x = m * (2 ^ e)`, `e` is an integer and the absolute value of `m` is in the range [0.5, 1) (or zero when `x` is zero).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.frexp)", + "returns": [ + { + "name": "m", + "type": "function.return", + "view": "number" + }, + { + "name": "e", + "type": "function.return", + "view": "number" + } + ], + "start": 1700000, + "type": "function", + "view": "function math.frexp(x: number)\n -> m: number\n 2. e: number" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 1700019, + "start": 1700009, + "type": "setfield" + } + ], + "desc": "\nDecompose `x` into tails and exponents. Returns `m` and `e` such that `x = m * (2 ^ e)`, `e` is an integer and the absolute value of `m` is in the range [0.5, 1) (or zero when `x` is zero).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.frexp)", + "name": "math.frexp", + "rawdesc": "\nDecompose `x` into tails and exponents. Returns `m` and `e` such that `x = m * (2 ^ e)`, `e` is an integer and the absolute value of `m` is in the range [0.5, 1) (or zero when `x` is zero).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.frexp)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1820021, + "name": "m", + "start": 1820020, + "type": "local", + "view": "number" + }, + { + "finish": 1820024, + "name": "e", + "start": 1820023, + "type": "local", + "view": "number" + } + ], + "desc": "\nReturns `m * (2 ^ e)` .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.ldexp)", + "finish": 1820029, + "rawdesc": "\nReturns `m * (2 ^ e)` .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.ldexp)", + "returns": [ + { + "type": "function.return", + "view": "number" + } + ], + "start": 1820000, + "type": "function", + "view": "function math.ldexp(m: number, e: number)\n -> number" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 1820019, + "start": 1820009, + "type": "setfield" + } + ], + "desc": "\nReturns `m * (2 ^ e)` .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.ldexp)", + "name": "math.ldexp", + "rawdesc": "\nReturns `m * (2 ^ e)` .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.ldexp)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1930019, + "name": "x", + "start": 1930018, + "type": "local", + "view": "number" + }, + { + "finish": 1930025, + "name": "base", + "start": 1930021, + "type": "local", + "view": "integer?" + } + ], + "desc": "\nReturns the logarithm of `x` in the given base.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.log)", + "finish": 1930030, + "rawdesc": "\nReturns the logarithm of `x` in the given base.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.log)", + "returns": [ + { + "type": "function.return", + "view": "number" + } + ], + "start": 1930000, + "type": "function", + "view": "function math.log(x: number, base?: integer)\n -> number" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 1930017, + "start": 1930009, + "type": "setfield" + } + ], + "desc": "\nReturns the logarithm of `x` in the given base.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.log)", + "name": "math.log", + "rawdesc": "\nReturns the logarithm of `x` in the given base.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.log)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 2040021, + "name": "x", + "start": 2040020, + "type": "local", + "view": "number" + } + ], + "desc": "\nReturns the base-10 logarithm of x.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.log10)", + "finish": 2040026, + "rawdesc": "\nReturns the base-10 logarithm of x.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.log10)", + "returns": [ + { + "type": "function.return", + "view": "number" + } + ], + "start": 2040000, + "type": "function", + "view": "function math.log10(x: number)\n -> number" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 2040019, + "start": 2040009, + "type": "setfield" + } + ], + "desc": "\nReturns the base-10 logarithm of x.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.log10)", + "name": "math.log10", + "rawdesc": "\nReturns the base-10 logarithm of x.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.log10)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 2160019, + "name": "x", + "start": 2160018, + "type": "local", + "view": "" + }, + { + "finish": 2160024, + "start": 2160021, + "type": "...", + "view": "" + } + ], + "desc": "\nReturns the argument with the maximum value, according to the Lua operator `<`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.max)", + "finish": 2160029, + "rawdesc": "\nReturns the argument with the maximum value, according to the Lua operator `<`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.max)", + "returns": [ + { + "type": "function.return", + "view": "" + } + ], + "start": 2160000, + "type": "function", + "view": "function math.max(x: , ...)\n -> " + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 2160017, + "start": 2160009, + "type": "setfield" + } + ], + "desc": "\nReturns the argument with the maximum value, according to the Lua operator `<`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.max)", + "name": "math.max", + "rawdesc": "\nReturns the argument with the maximum value, according to the Lua operator `<`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.max)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 2280019, + "name": "x", + "start": 2280018, + "type": "local", + "view": "" + }, + { + "finish": 2280024, + "start": 2280021, + "type": "...", + "view": "" + } + ], + "desc": "\nReturns the argument with the minimum value, according to the Lua operator `<`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.min)", + "finish": 2280029, + "rawdesc": "\nReturns the argument with the minimum value, according to the Lua operator `<`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.min)", + "returns": [ + { + "type": "function.return", + "view": "" + } + ], + "start": 2280000, + "type": "function", + "view": "function math.min(x: , ...)\n -> " + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 2280017, + "start": 2280009, + "type": "setfield" + } + ], + "desc": "\nReturns the argument with the minimum value, according to the Lua operator `<`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.min)", + "name": "math.min", + "rawdesc": "\nReturns the argument with the minimum value, according to the Lua operator `<`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.min)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 2390020, + "name": "x", + "start": 2390019, + "type": "local", + "view": "number" + } + ], + "desc": "\nReturns the integral part of `x` and the fractional part of `x`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.modf)", + "finish": 2390025, + "rawdesc": "\nReturns the integral part of `x` and the fractional part of `x`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.modf)", + "returns": [ + { + "type": "function.return", + "view": "integer" + }, + { + "type": "function.return", + "view": "number" + } + ], + "start": 2390000, + "type": "function", + "view": "function math.modf(x: number)\n -> integer\n 2. number" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 2390018, + "start": 2390009, + "type": "setfield" + } + ], + "desc": "\nReturns the integral part of `x` and the fractional part of `x`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.modf)", + "name": "math.modf", + "rawdesc": "\nReturns the integral part of `x` and the fractional part of `x`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.modf)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 2510019, + "name": "x", + "start": 2510018, + "type": "local", + "view": "number" + }, + { + "finish": 2510022, + "name": "y", + "start": 2510021, + "type": "local", + "view": "number" + } + ], + "desc": "\nReturns `x ^ y` .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.pow)", + "finish": 2510027, + "rawdesc": "\nReturns `x ^ y` .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.pow)", + "returns": [ + { + "type": "function.return", + "view": "number" + } + ], + "start": 2510000, + "type": "function", + "view": "function math.pow(x: number, y: number)\n -> number" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 2510017, + "start": 2510009, + "type": "setfield" + } + ], + "desc": "\nReturns `x ^ y` .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.pow)", + "name": "math.pow", + "rawdesc": "\nReturns `x ^ y` .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.pow)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 2610019, + "name": "x", + "start": 2610018, + "type": "local", + "view": "number" + } + ], + "desc": "\nConverts the angle `x` from degrees to radians.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.rad)", + "finish": 2610024, + "rawdesc": "\nConverts the angle `x` from degrees to radians.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.rad)", + "returns": [ + { + "type": "function.return", + "view": "number" + } + ], + "start": 2610000, + "type": "function", + "view": "function math.rad(x: number)\n -> number" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 2610017, + "start": 2610009, + "type": "setfield" + } + ], + "desc": "\nConverts the angle `x` from degrees to radians.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.rad)", + "name": "math.rad", + "rawdesc": "\nConverts the angle `x` from degrees to radians.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.rad)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 2770022, + "name": "m", + "start": 2770021, + "type": "local", + "view": "integer" + }, + { + "finish": 2770025, + "name": "n", + "start": 2770024, + "type": "local", + "view": "integer" + } + ], + "desc": "\n* `math.random()`: Returns a float in the range [0,1).\n* `math.random(n)`: Returns a integer in the range [1, n].\n* `math.random(m, n)`: Returns a integer in the range [m, n].\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.random)", + "finish": 2770030, + "rawdesc": "\n* `math.random()`: Returns a float in the range [0,1).\n* `math.random(n)`: Returns a integer in the range [1, n].\n* `math.random(m, n)`: Returns a integer in the range [m, n].\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.random)", + "returns": [ + { + "type": "function.return", + "view": "integer" + } + ], + "start": 2770000, + "type": "function", + "view": "function math.random(m: integer, n: integer)\n -> integer" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 2770020, + "start": 2770009, + "type": "setfield" + } + ], + "desc": "\n* `math.random()`: Returns a float in the range [0,1).\n* `math.random(n)`: Returns a integer in the range [1, n].\n* `math.random(m, n)`: Returns a integer in the range [m, n].\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.random)", + "name": "math.random", + "rawdesc": "\n* `math.random()`: Returns a float in the range [0,1).\n* `math.random(n)`: Returns a integer in the range [1, n].\n* `math.random(m, n)`: Returns a integer in the range [m, n].\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.random)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 2890026, + "name": "x", + "start": 2890025, + "type": "local", + "view": "integer?" + }, + { + "finish": 2890029, + "name": "y", + "start": 2890028, + "type": "local", + "view": "integer?" + } + ], + "desc": "\n* `math.randomseed(x, y)`: Concatenate `x` and `y` into a 128-bit `seed` to reinitialize the pseudo-random generator.\n* `math.randomseed(x)`: Equate to `math.randomseed(x, 0)` .\n* `math.randomseed()`: Generates a seed with a weak attempt for randomness.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.randomseed)", + "finish": 2890034, + "rawdesc": "\n* `math.randomseed(x, y)`: Concatenate `x` and `y` into a 128-bit `seed` to reinitialize the pseudo-random generator.\n* `math.randomseed(x)`: Equate to `math.randomseed(x, 0)` .\n* `math.randomseed()`: Generates a seed with a weak attempt for randomness.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.randomseed)", + "start": 2890000, + "type": "function", + "view": "function math.randomseed(x?: integer, y?: integer)" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 2890024, + "start": 2890009, + "type": "setfield" + } + ], + "desc": "\n* `math.randomseed(x, y)`: Concatenate `x` and `y` into a 128-bit `seed` to reinitialize the pseudo-random generator.\n* `math.randomseed(x)`: Equate to `math.randomseed(x, 0)` .\n* `math.randomseed()`: Generates a seed with a weak attempt for randomness.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.randomseed)", + "name": "math.randomseed", + "rawdesc": "\n* `math.randomseed(x, y)`: Concatenate `x` and `y` into a 128-bit `seed` to reinitialize the pseudo-random generator.\n* `math.randomseed(x)`: Equate to `math.randomseed(x, 0)` .\n* `math.randomseed()`: Generates a seed with a weak attempt for randomness.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.randomseed)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 2990019, + "name": "x", + "start": 2990018, + "type": "local", + "view": "number" + } + ], + "desc": "\nReturns the sine of `x` (assumed to be in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.sin)", + "finish": 2990024, + "rawdesc": "\nReturns the sine of `x` (assumed to be in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.sin)", + "returns": [ + { + "type": "function.return", + "view": "number" + } + ], + "start": 2990000, + "type": "function", + "view": "function math.sin(x: number)\n -> number" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 2990017, + "start": 2990009, + "type": "setfield" + } + ], + "desc": "\nReturns the sine of `x` (assumed to be in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.sin)", + "name": "math.sin", + "rawdesc": "\nReturns the sine of `x` (assumed to be in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.sin)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 3100020, + "name": "x", + "start": 3100019, + "type": "local", + "view": "number" + } + ], + "desc": "\nReturns the hyperbolic sine of `x` (assumed to be in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.sinh)", + "finish": 3100025, + "rawdesc": "\nReturns the hyperbolic sine of `x` (assumed to be in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.sinh)", + "returns": [ + { + "type": "function.return", + "view": "number" + } + ], + "start": 3100000, + "type": "function", + "view": "function math.sinh(x: number)\n -> number" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 3100018, + "start": 3100009, + "type": "setfield" + } + ], + "desc": "\nReturns the hyperbolic sine of `x` (assumed to be in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.sinh)", + "name": "math.sinh", + "rawdesc": "\nReturns the hyperbolic sine of `x` (assumed to be in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.sinh)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 3200020, + "name": "x", + "start": 3200019, + "type": "local", + "view": "number" + } + ], + "desc": "\nReturns the square root of `x`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.sqrt)", + "finish": 3200025, + "rawdesc": "\nReturns the square root of `x`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.sqrt)", + "returns": [ + { + "type": "function.return", + "view": "number" + } + ], + "start": 3200000, + "type": "function", + "view": "function math.sqrt(x: number)\n -> number" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 3200018, + "start": 3200009, + "type": "setfield" + } + ], + "desc": "\nReturns the square root of `x`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.sqrt)", + "name": "math.sqrt", + "rawdesc": "\nReturns the square root of `x`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.sqrt)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 3300019, + "name": "x", + "start": 3300018, + "type": "local", + "view": "number" + } + ], + "desc": "\nReturns the tangent of `x` (assumed to be in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.tan)", + "finish": 3300024, + "rawdesc": "\nReturns the tangent of `x` (assumed to be in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.tan)", + "returns": [ + { + "type": "function.return", + "view": "number" + } + ], + "start": 3300000, + "type": "function", + "view": "function math.tan(x: number)\n -> number" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 3300017, + "start": 3300009, + "type": "setfield" + } + ], + "desc": "\nReturns the tangent of `x` (assumed to be in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.tan)", + "name": "math.tan", + "rawdesc": "\nReturns the tangent of `x` (assumed to be in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.tan)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 3410020, + "name": "x", + "start": 3410019, + "type": "local", + "view": "number" + } + ], + "desc": "\nReturns the hyperbolic tangent of `x` (assumed to be in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.tanh)", + "finish": 3410025, + "rawdesc": "\nReturns the hyperbolic tangent of `x` (assumed to be in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.tanh)", + "returns": [ + { + "type": "function.return", + "view": "number" + } + ], + "start": 3410000, + "type": "function", + "view": "function math.tanh(x: number)\n -> number" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 3410018, + "start": 3410009, + "type": "setfield" + } + ], + "desc": "\nReturns the hyperbolic tangent of `x` (assumed to be in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.tanh)", + "name": "math.tanh", + "rawdesc": "\nReturns the hyperbolic tangent of `x` (assumed to be in radians).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.tanh)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 3520025, + "name": "x", + "start": 3520024, + "type": "local", + "view": "any" + } + ], + "desc": "\nMiss locale \n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.tointeger)", + "finish": 3520030, + "rawdesc": "\nMiss locale \n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.tointeger)", + "returns": [ + { + "type": "function.return", + "view": "integer?" + } + ], + "start": 3520000, + "type": "function", + "view": "function math.tointeger(x: any)\n -> integer?" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 3520023, + "start": 3520009, + "type": "setfield" + } + ], + "desc": "\nMiss locale \n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.tointeger)", + "name": "math.tointeger", + "rawdesc": "\nMiss locale \n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.tointeger)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 3650020, + "name": "x", + "start": 3650019, + "type": "local", + "view": "any" + } + ], + "desc": "\nMiss locale \n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.type)\n\n\n```lua\nreturn #1:\n | \"integer\"\n | \"float\"\n | 'nil'\n```", + "finish": 3650025, + "rawdesc": "\nMiss locale \n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.type)\n\n\n```lua\nreturn #1:\n | \"integer\"\n | \"float\"\n | 'nil'\n```", + "returns": [ + { + "type": "function.return", + "view": "\"float\"|\"integer\"|'nil'" + } + ], + "start": 3650000, + "type": "function", + "view": "function math.type(x: any)\n -> \"float\"|\"integer\"|'nil'" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 3650018, + "start": 3650009, + "type": "setfield" + } + ], + "desc": "\nMiss locale \n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.type)\n\n\n```lua\nreturn #1:\n | \"integer\"\n | \"float\"\n | 'nil'\n```", + "name": "math.type", + "rawdesc": "\nMiss locale \n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.type)\n\n\n```lua\nreturn #1:\n | \"integer\"\n | \"float\"\n | 'nil'\n```", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 3760019, + "name": "m", + "start": 3760018, + "type": "local", + "view": "integer" + }, + { + "finish": 3760022, + "name": "n", + "start": 3760021, + "type": "local", + "view": "integer" + } + ], + "desc": "\nMiss locale \n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.ult)", + "finish": 3760027, + "rawdesc": "\nMiss locale \n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.ult)", + "returns": [ + { + "type": "function.return", + "view": "boolean" + } + ], + "start": 3760000, + "type": "function", + "view": "function math.ult(m: integer, n: integer)\n -> boolean" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/math.lua", + "finish": 3760017, + "start": 3760009, + "type": "setfield" + } + ], + "desc": "\nMiss locale \n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.ult)", + "name": "math.ult", + "rawdesc": "\nMiss locale \n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.ult)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1720020, + "name": "name", + "start": 1720016, + "type": "local", + "view": "string" + }, + { + "finish": 1720025, + "start": 1720022, + "type": "...", + "view": "any" + } + ], + "desc": "\nCreates a module.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-module)", + "finish": 1720030, + "rawdesc": "\nCreates a module.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-module)", + "start": 1720000, + "type": "function", + "view": "function module(name: string, ...any)" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 1720015, + "start": 1720009, + "type": "setglobal" + } + ], + "desc": "\nCreates a module.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-module)", + "name": "module", + "rawdesc": "\nCreates a module.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-module)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1620023, + "name": "proxy", + "start": 1620018, + "type": "local", + "view": "boolean|table|userdata" + } + ], + "finish": 1620028, + "returns": [ + { + "type": "function.return", + "view": "userdata" + } + ], + "start": 1620000, + "type": "function", + "view": "function newproxy(proxy: boolean|table|userdata)\n -> userdata" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 1620017, + "start": 1620009, + "type": "setglobal" + } + ], + "name": "newproxy", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1900019, + "name": "table", + "start": 1900014, + "type": "local", + "view": "table<, >" + }, + { + "finish": 1900026, + "name": "index", + "start": 1900021, + "type": "local", + "view": "?" + } + ], + "desc": "\nAllows a program to traverse all fields of a table. Its first argument is a table and its second argument is an index in this table. A call to `next` returns the next index of the table and its associated value. When called with `nil` as its second argument, `next` returns an initial index and its associated value. When called with the last index, or with `nil` in an empty table, `next` returns `nil`. If the second argument is absent, then it is interpreted as `nil`. In particular, you can use `next(t)` to check whether a table is empty.\n\nThe order in which the indices are enumerated is not specified, *even for numeric indices*. (To traverse a table in numerical order, use a numerical `for`.)\n\nThe behavior of `next` is undefined if, during the traversal, you assign any value to a non-existent field in the table. You may however modify existing fields. In particular, you may set existing fields to nil.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-next)", + "finish": 1900031, + "rawdesc": "\nAllows a program to traverse all fields of a table. Its first argument is a table and its second argument is an index in this table. A call to `next` returns the next index of the table and its associated value. When called with `nil` as its second argument, `next` returns an initial index and its associated value. When called with the last index, or with `nil` in an empty table, `next` returns `nil`. If the second argument is absent, then it is interpreted as `nil`. In particular, you can use `next(t)` to check whether a table is empty.\n\nThe order in which the indices are enumerated is not specified, *even for numeric indices*. (To traverse a table in numerical order, use a numerical `for`.)\n\nThe behavior of `next` is undefined if, during the traversal, you assign any value to a non-existent field in the table. You may however modify existing fields. In particular, you may set existing fields to nil.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-next)", + "returns": [ + { + "type": "function.return", + "view": "?" + }, + { + "type": "function.return", + "view": "?" + } + ], + "start": 1900000, + "type": "function", + "view": "function next(table: table<, >, index?: )\n -> ?\n 2. ?" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 1900013, + "start": 1900009, + "type": "setglobal" + } + ], + "desc": "\nAllows a program to traverse all fields of a table. Its first argument is a table and its second argument is an index in this table. A call to `next` returns the next index of the table and its associated value. When called with `nil` as its second argument, `next` returns an initial index and its associated value. When called with the last index, or with `nil` in an empty table, `next` returns `nil`. If the second argument is absent, then it is interpreted as `nil`. In particular, you can use `next(t)` to check whether a table is empty.\n\nThe order in which the indices are enumerated is not specified, *even for numeric indices*. (To traverse a table in numerical order, use a numerical `for`.)\n\nThe behavior of `next` is undefined if, during the traversal, you assign any value to a non-existent field in the table. You may however modify existing fields. In particular, you may set existing fields to nil.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-next)", + "name": "next", + "rawdesc": "\nAllows a program to traverse all fields of a table. Its first argument is a table and its second argument is an index in this table. A call to `next` returns the next index of the table and its associated value. When called with `nil` as its second argument, `next` returns an initial index and its associated value. When called with the last index, or with `nil` in an empty table, `next` returns `nil`. If the second argument is absent, then it is interpreted as `nil`. In particular, you can use `next(t)` to check whether a table is empty.\n\nThe order in which the indices are enumerated is not specified, *even for numeric indices*. (To traverse a table in numerical order, use a numerical `for`.)\n\nThe behavior of `next` is undefined if, during the traversal, you assign any value to a non-existent field in the table. You may however modify existing fields. In particular, you may set existing fields to nil.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-next)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "desc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os)\n", + "finish": 80007, + "rawdesc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os)\n", + "start": 80005, + "type": "table", + "view": "oslib" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/os.lua", + "finish": 80002, + "start": 80000, + "type": "setglobal" + } + ], + "desc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os)\n", + "name": "os", + "rawdesc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os)\n", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [], + "desc": "\nReturns an approximation of the amount in seconds of CPU time used by the program.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.clock)", + "finish": 170023, + "rawdesc": "\nReturns an approximation of the amount in seconds of CPU time used by the program.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.clock)", + "returns": [ + { + "type": "function.return", + "view": "number" + } + ], + "start": 170000, + "type": "function", + "view": "function os.clock()\n -> number" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/os.lua", + "finish": 170017, + "start": 170009, + "type": "setfield" + } + ], + "desc": "\nReturns an approximation of the amount in seconds of CPU time used by the program.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.clock)", + "name": "os.clock", + "rawdesc": "\nReturns an approximation of the amount in seconds of CPU time used by the program.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.clock)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 840023, + "name": "format", + "start": 840017, + "type": "local", + "view": "string?" + }, + { + "finish": 840029, + "name": "time", + "start": 840025, + "type": "local", + "view": "integer?" + } + ], + "desc": "\nReturns a string or a table containing date and time, formatted according to the given string `format`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.date)", + "finish": 840034, + "rawdesc": "\nReturns a string or a table containing date and time, formatted according to the given string `format`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.date)", + "returns": [ + { + "type": "function.return", + "view": "string|osdate" + } + ], + "start": 840000, + "type": "function", + "view": "function os.date(format?: string, time?: integer)\n -> string|osdate" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/os.lua", + "finish": 840016, + "start": 840009, + "type": "setfield" + } + ], + "desc": "\nReturns a string or a table containing date and time, formatted according to the given string `format`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.date)", + "name": "os.date", + "rawdesc": "\nReturns a string or a table containing date and time, formatted according to the given string `format`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.date)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 950023, + "name": "t2", + "start": 950021, + "type": "local", + "view": "integer" + }, + { + "finish": 950027, + "name": "t1", + "start": 950025, + "type": "local", + "view": "integer" + } + ], + "desc": "\nReturns the difference, in seconds, from time `t1` to time `t2`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.difftime)", + "finish": 950032, + "rawdesc": "\nReturns the difference, in seconds, from time `t1` to time `t2`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.difftime)", + "returns": [ + { + "type": "function.return", + "view": "integer" + } + ], + "start": 950000, + "type": "function", + "view": "function os.difftime(t2: integer, t1: integer)\n -> integer" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/os.lua", + "finish": 950020, + "start": 950009, + "type": "setfield" + } + ], + "desc": "\nReturns the difference, in seconds, from time `t1` to time `t2`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.difftime)", + "name": "os.difftime", + "rawdesc": "\nReturns the difference, in seconds, from time `t1` to time `t2`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.difftime)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1060027, + "name": "command", + "start": 1060020, + "type": "local", + "view": "string?" + } + ], + "desc": "\nPasses `command` to be executed by an operating system shell.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.execute)\n\n\n```lua\nexitcode:\n | \"exit\"\n | \"signal\"\n```", + "finish": 1060032, + "rawdesc": "\nPasses `command` to be executed by an operating system shell.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.execute)\n\n\n```lua\nexitcode:\n | \"exit\"\n | \"signal\"\n```", + "returns": [ + { + "name": "suc", + "type": "function.return", + "view": "boolean?" + }, + { + "name": "exitcode", + "type": "function.return", + "view": "(\"exit\"|\"signal\")?" + }, + { + "name": "code", + "type": "function.return", + "view": "integer?" + } + ], + "start": 1060000, + "type": "function", + "view": "function os.execute(command?: string)\n -> suc: boolean?\n 2. exitcode: (\"exit\"|\"signal\")?\n 3. code: integer?" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/os.lua", + "finish": 1060019, + "start": 1060009, + "type": "setfield" + } + ], + "desc": "\nPasses `command` to be executed by an operating system shell.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.execute)\n\n\n```lua\nexitcode:\n | \"exit\"\n | \"signal\"\n```", + "name": "os.execute", + "rawdesc": "\nPasses `command` to be executed by an operating system shell.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.execute)\n\n\n```lua\nexitcode:\n | \"exit\"\n | \"signal\"\n```", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1150021, + "name": "code", + "start": 1150017, + "type": "local", + "view": "(boolean|integer)?" + }, + { + "finish": 1150028, + "name": "close", + "start": 1150023, + "type": "local", + "view": "boolean?" + } + ], + "desc": "\nCalls the ISO C function `exit` to terminate the host program.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.exit)", + "finish": 1150033, + "rawdesc": "\nCalls the ISO C function `exit` to terminate the host program.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.exit)", + "start": 1150000, + "type": "function", + "view": "function os.exit(code?: boolean|integer, close?: boolean)" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/os.lua", + "finish": 1150016, + "start": 1150009, + "type": "setfield" + } + ], + "desc": "\nCalls the ISO C function `exit` to terminate the host program.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.exit)", + "name": "os.exit", + "rawdesc": "\nCalls the ISO C function `exit` to terminate the host program.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.exit)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1250026, + "name": "varname", + "start": 1250019, + "type": "local", + "view": "string" + } + ], + "desc": "\nReturns the value of the process environment variable `varname`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.getenv)", + "finish": 1250031, + "rawdesc": "\nReturns the value of the process environment variable `varname`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.getenv)", + "returns": [ + { + "type": "function.return", + "view": "string?" + } + ], + "start": 1250000, + "type": "function", + "view": "function os.getenv(varname: string)\n -> string?" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/os.lua", + "finish": 1250018, + "start": 1250009, + "type": "setfield" + } + ], + "desc": "\nReturns the value of the process environment variable `varname`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.getenv)", + "name": "os.getenv", + "rawdesc": "\nReturns the value of the process environment variable `varname`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.getenv)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1350027, + "name": "filename", + "start": 1350019, + "type": "local", + "view": "string" + } + ], + "desc": "\nDeletes the file with the given name.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.remove)", + "finish": 1350032, + "rawdesc": "\nDeletes the file with the given name.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.remove)", + "returns": [ + { + "name": "suc", + "type": "function.return", + "view": "boolean" + }, + { + "name": "errmsg", + "type": "function.return", + "view": "string?" + } + ], + "start": 1350000, + "type": "function", + "view": "function os.remove(filename: string)\n -> suc: boolean\n 2. errmsg: string?" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/os.lua", + "finish": 1350018, + "start": 1350009, + "type": "setfield" + } + ], + "desc": "\nDeletes the file with the given name.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.remove)", + "name": "os.remove", + "rawdesc": "\nDeletes the file with the given name.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.remove)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1460026, + "name": "oldname", + "start": 1460019, + "type": "local", + "view": "string" + }, + { + "finish": 1460035, + "name": "newname", + "start": 1460028, + "type": "local", + "view": "string" + } + ], + "desc": "\nRenames the file or directory named `oldname` to `newname`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.rename)", + "finish": 1460040, + "rawdesc": "\nRenames the file or directory named `oldname` to `newname`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.rename)", + "returns": [ + { + "name": "suc", + "type": "function.return", + "view": "boolean" + }, + { + "name": "errmsg", + "type": "function.return", + "view": "string?" + } + ], + "start": 1460000, + "type": "function", + "view": "function os.rename(oldname: string, newname: string)\n -> suc: boolean\n 2. errmsg: string?" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/os.lua", + "finish": 1460018, + "start": 1460009, + "type": "setfield" + } + ], + "desc": "\nRenames the file or directory named `oldname` to `newname`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.rename)", + "name": "os.rename", + "rawdesc": "\nRenames the file or directory named `oldname` to `newname`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.rename)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1640028, + "name": "locale", + "start": 1640022, + "type": "local", + "view": "string|nil" + }, + { + "finish": 1640038, + "name": "category", + "start": 1640030, + "type": "local", + "view": "(\"all\"|\"collate\"|\"ctype\"|\"monetary\"|\"numeric\"...(+1))?" + } + ], + "desc": "\nSets the current locale of the program.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.setlocale)\n\n\n```lua\ncategory:\n -> \"all\"\n | \"collate\"\n | \"ctype\"\n | \"monetary\"\n | \"numeric\"\n | \"time\"\n```", + "finish": 1640043, + "rawdesc": "\nSets the current locale of the program.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.setlocale)\n\n\n```lua\ncategory:\n -> \"all\"\n | \"collate\"\n | \"ctype\"\n | \"monetary\"\n | \"numeric\"\n | \"time\"\n```", + "returns": [ + { + "name": "localecategory", + "type": "function.return", + "view": "string" + } + ], + "start": 1640000, + "type": "function", + "view": "function os.setlocale(locale: string|nil, category?: \"all\"|\"collate\"|\"ctype\"|\"monetary\"|\"numeric\"...(+1))\n -> localecategory: string" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/os.lua", + "finish": 1640021, + "start": 1640009, + "type": "setfield" + } + ], + "desc": "\nSets the current locale of the program.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.setlocale)\n\n\n```lua\ncategory:\n -> \"all\"\n | \"collate\"\n | \"ctype\"\n | \"monetary\"\n | \"numeric\"\n | \"time\"\n```", + "name": "os.setlocale", + "rawdesc": "\nSets the current locale of the program.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.setlocale)\n\n\n```lua\ncategory:\n -> \"all\"\n | \"collate\"\n | \"ctype\"\n | \"monetary\"\n | \"numeric\"\n | \"time\"\n```", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 2300021, + "name": "date", + "start": 2300017, + "type": "local", + "view": "osdateparam?" + } + ], + "desc": "\nReturns the current time when called without arguments, or a time representing the local date and time specified by the given table.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.time)", + "finish": 2300026, + "rawdesc": "\nReturns the current time when called without arguments, or a time representing the local date and time specified by the given table.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.time)", + "returns": [ + { + "type": "function.return", + "view": "integer" + } + ], + "start": 2300000, + "type": "function", + "view": "function os.time(date?: osdateparam)\n -> integer" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/os.lua", + "finish": 2300016, + "start": 2300009, + "type": "setfield" + } + ], + "desc": "\nReturns the current time when called without arguments, or a time representing the local date and time specified by the given table.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.time)", + "name": "os.time", + "rawdesc": "\nReturns the current time when called without arguments, or a time representing the local date and time specified by the given table.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.time)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [], + "desc": "\nReturns a string with a file name that can be used for a temporary file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.tmpname)", + "finish": 2390025, + "rawdesc": "\nReturns a string with a file name that can be used for a temporary file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.tmpname)", + "returns": [ + { + "type": "function.return", + "view": "string" + } + ], + "start": 2390000, + "type": "function", + "view": "function os.tmpname()\n -> string" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/os.lua", + "finish": 2390019, + "start": 2390009, + "type": "setfield" + } + ], + "desc": "\nReturns a string with a file name that can be used for a temporary file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.tmpname)", + "name": "os.tmpname", + "rawdesc": "\nReturns a string with a file name that can be used for a temporary file.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.tmpname)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "desc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package)\n", + "finish": 420012, + "rawdesc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package)\n", + "start": 420010, + "type": "table", + "view": "packagelib" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/package.lua", + "finish": 420007, + "start": 420000, + "type": "setglobal" + } + ], + "desc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package)\n", + "name": "package", + "rawdesc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package)\n", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "desc": "\nA string describing some compile-time configurations for packages.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.config)\n", + "finish": 540003, + "rawdesc": "\nA string describing some compile-time configurations for packages.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.config)\n", + "start": 490017, + "type": "string", + "view": "string" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/package.lua", + "finish": 490014, + "start": 490000, + "type": "setfield" + } + ], + "desc": "\nA string describing some compile-time configurations for packages.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.config)\n", + "name": "package.config", + "rawdesc": "\nA string describing some compile-time configurations for packages.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.config)\n", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "desc": "\nA table used by `require` to control how to load modules.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.loaders)\n", + "finish": 620020, + "rawdesc": "\nA table used by `require` to control how to load modules.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.loaders)\n", + "start": 620018, + "type": "table", + "view": "table" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/package.lua", + "finish": 620015, + "start": 620000, + "type": "setfield" + } + ], + "desc": "\nA table used by `require` to control how to load modules.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.loaders)\n", + "name": "package.loaders", + "rawdesc": "\nA table used by `require` to control how to load modules.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.loaders)\n", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 720032, + "name": "libname", + "start": 720025, + "type": "local", + "view": "string" + }, + { + "finish": 720042, + "name": "funcname", + "start": 720034, + "type": "local", + "view": "string" + } + ], + "desc": "\nDynamically links the host program with the C library `libname`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.loadlib)", + "finish": 720047, + "rawdesc": "\nDynamically links the host program with the C library `libname`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.loadlib)", + "returns": [ + { + "type": "function.return", + "view": "any" + } + ], + "start": 720000, + "type": "function", + "view": "function package.loadlib(libname: string, funcname: string)\n -> any" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/package.lua", + "finish": 720024, + "start": 720009, + "type": "setfield" + } + ], + "desc": "\nDynamically links the host program with the C library `libname`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.loadlib)", + "name": "package.loadlib", + "rawdesc": "\nDynamically links the host program with the C library `libname`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.loadlib)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "desc": "\nA table used by `require` to control how to load modules.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.searchers)\n", + "finish": 800022, + "rawdesc": "\nA table used by `require` to control how to load modules.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.searchers)\n", + "start": 800020, + "type": "table", + "view": "table" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/package.lua", + "finish": 800017, + "start": 800000, + "type": "setfield" + } + ], + "desc": "\nA table used by `require` to control how to load modules.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.searchers)\n", + "name": "package.searchers", + "rawdesc": "\nA table used by `require` to control how to load modules.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.searchers)\n", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 950032, + "name": "name", + "start": 950028, + "type": "local", + "view": "string" + }, + { + "finish": 950038, + "name": "path", + "start": 950034, + "type": "local", + "view": "string" + }, + { + "finish": 950043, + "name": "sep", + "start": 950040, + "type": "local", + "view": "string?" + }, + { + "finish": 950048, + "name": "rep", + "start": 950045, + "type": "local", + "view": "string?" + } + ], + "desc": "\nSearches for the given `name` in the given `path`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.searchpath)", + "finish": 950053, + "rawdesc": "\nSearches for the given `name` in the given `path`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.searchpath)", + "returns": [ + { + "name": "filename", + "type": "function.return", + "view": "string?" + }, + { + "name": "errmsg", + "type": "function.return", + "view": "string?" + } + ], + "start": 950000, + "type": "function", + "view": "function package.searchpath(name: string, path: string, sep?: string, rep?: string)\n -> filename: string?\n 2. errmsg: string?" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/package.lua", + "finish": 950027, + "start": 950009, + "type": "setfield" + } + ], + "desc": "\nSearches for the given `name` in the given `path`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.searchpath)", + "name": "package.searchpath", + "rawdesc": "\nSearches for the given `name` in the given `path`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.searchpath)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1040030, + "name": "module", + "start": 1040024, + "type": "local", + "view": "table" + } + ], + "desc": "\nSets a metatable for `module` with its `__index` field referring to the global environment, so that this module inherits values from the global environment. To be used as an option to function `module` .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.seeall)", + "finish": 1040035, + "rawdesc": "\nSets a metatable for `module` with its `__index` field referring to the global environment, so that this module inherits values from the global environment. To be used as an option to function `module` .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.seeall)", + "start": 1040000, + "type": "function", + "view": "function package.seeall(module: table)" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/package.lua", + "finish": 1040023, + "start": 1040009, + "type": "setfield" + } + ], + "desc": "\nSets a metatable for `module` with its `__index` field referring to the global environment, so that this module inherits values from the global environment. To be used as an option to function `module` .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.seeall)", + "name": "package.seeall", + "rawdesc": "\nSets a metatable for `module` with its `__index` field referring to the global environment, so that this module inherits values from the global environment. To be used as an option to function `module` .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.seeall)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 2100016, + "name": "t", + "start": 2100015, + "type": "local", + "view": "" + } + ], + "desc": "\nIf `t` has a metamethod `__pairs`, calls it with t as argument and returns the first three results from the call.\n\nOtherwise, returns three values: the [next](http://www.lua.org/manual/5.4/manual.html#pdf-next) function, the table `t`, and `nil`, so that the construction\n```lua\n for k,v in pairs(t) do body end\n```\nwill iterate over all key–value pairs of table `t`.\n\nSee function [next](http://www.lua.org/manual/5.4/manual.html#pdf-next) for the caveats of modifying the table during its traversal.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-pairs)", + "finish": 2100021, + "rawdesc": "\nIf `t` has a metamethod `__pairs`, calls it with t as argument and returns the first three results from the call.\n\nOtherwise, returns three values: the [next](http://www.lua.org/manual/5.4/manual.html#pdf-next) function, the table `t`, and `nil`, so that the construction\n```lua\n for k,v in pairs(t) do body end\n```\nwill iterate over all key–value pairs of table `t`.\n\nSee function [next](http://www.lua.org/manual/5.4/manual.html#pdf-next) for the caveats of modifying the table during its traversal.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-pairs)", + "returns": [ + { + "type": "function.return", + "view": "fun(table: table<, >, index?: ):, " + }, + { + "type": "function.return", + "view": "" + } + ], + "start": 2100000, + "type": "function", + "view": "function pairs(t: )\n -> fun(table: table<, >, index?: ):, \n 2. " + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 2100014, + "start": 2100009, + "type": "setglobal" + } + ], + "desc": "\nIf `t` has a metamethod `__pairs`, calls it with t as argument and returns the first three results from the call.\n\nOtherwise, returns three values: the [next](http://www.lua.org/manual/5.4/manual.html#pdf-next) function, the table `t`, and `nil`, so that the construction\n```lua\n for k,v in pairs(t) do body end\n```\nwill iterate over all key–value pairs of table `t`.\n\nSee function [next](http://www.lua.org/manual/5.4/manual.html#pdf-next) for the caveats of modifying the table during its traversal.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-pairs)", + "name": "pairs", + "rawdesc": "\nIf `t` has a metamethod `__pairs`, calls it with t as argument and returns the first three results from the call.\n\nOtherwise, returns three values: the [next](http://www.lua.org/manual/5.4/manual.html#pdf-next) function, the table `t`, and `nil`, so that the construction\n```lua\n for k,v in pairs(t) do body end\n```\nwill iterate over all key–value pairs of table `t`.\n\nSee function [next](http://www.lua.org/manual/5.4/manual.html#pdf-next) for the caveats of modifying the table during its traversal.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-pairs)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 2240016, + "name": "f", + "start": 2240015, + "type": "local", + "view": "fun(...any):...unknown" + }, + { + "finish": 2240022, + "name": "arg1", + "start": 2240018, + "type": "local", + "view": "any" + }, + { + "finish": 2240027, + "start": 2240024, + "type": "...", + "view": "any" + } + ], + "desc": "\nCalls the function `f` with the given arguments in *protected mode*. This means that any error inside `f` is not propagated; instead, `pcall` catches the error and returns a status code. Its first result is the status code (a boolean), which is true if the call succeeds without errors. In such case, `pcall` also returns all results from the call, after this first result. In case of any error, `pcall` returns `false` plus the error object.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-pcall)", + "finish": 2240032, + "rawdesc": "\nCalls the function `f` with the given arguments in *protected mode*. This means that any error inside `f` is not propagated; instead, `pcall` catches the error and returns a status code. Its first result is the status code (a boolean), which is true if the call succeeds without errors. In such case, `pcall` also returns all results from the call, after this first result. In case of any error, `pcall` returns `false` plus the error object.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-pcall)", + "returns": [ + { + "name": "success", + "type": "function.return", + "view": "boolean" + }, + { + "name": "result", + "type": "function.return", + "view": "any" + }, + { + "name": "...", + "type": "function.return", + "view": "any" + } + ], + "start": 2240000, + "type": "function", + "view": "function pcall(f: fun(...any):...unknown, arg1?: any, ...any)\n -> success: boolean\n 2. result: any\n 3. ...any" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 2240014, + "start": 2240009, + "type": "setglobal" + } + ], + "desc": "\nCalls the function `f` with the given arguments in *protected mode*. This means that any error inside `f` is not propagated; instead, `pcall` catches the error and returns a status code. Its first result is the status code (a boolean), which is true if the call succeeds without errors. In such case, `pcall` also returns all results from the call, after this first result. In case of any error, `pcall` returns `false` plus the error object.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-pcall)", + "name": "pcall", + "rawdesc": "\nCalls the function `f` with the given arguments in *protected mode*. This means that any error inside `f` is not propagated; instead, `pcall` catches the error and returns a status code. Its first result is the status code (a boolean), which is true if the call succeeds without errors. In such case, `pcall` also returns all results from the call, after this first result. In case of any error, `pcall` returns `false` plus the error object.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-pcall)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 2340018, + "start": 2340015, + "type": "...", + "view": "any" + } + ], + "desc": "\nReceives any number of arguments and prints their values to `stdout`, converting each argument to a string following the same rules of [tostring](http://www.lua.org/manual/5.4/manual.html#pdf-tostring).\nThe function print is not intended for formatted output, but only as a quick way to show a value, for instance for debugging. For complete control over the output, use [string.format](http://www.lua.org/manual/5.4/manual.html#pdf-string.format) and [io.write](http://www.lua.org/manual/5.4/manual.html#pdf-io.write).\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-print)", + "finish": 2340023, + "rawdesc": "\nReceives any number of arguments and prints their values to `stdout`, converting each argument to a string following the same rules of [tostring](http://www.lua.org/manual/5.4/manual.html#pdf-tostring).\nThe function print is not intended for formatted output, but only as a quick way to show a value, for instance for debugging. For complete control over the output, use [string.format](http://www.lua.org/manual/5.4/manual.html#pdf-string.format) and [io.write](http://www.lua.org/manual/5.4/manual.html#pdf-io.write).\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-print)", + "start": 2340000, + "type": "function", + "view": "function print(...any)" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 2340014, + "start": 2340009, + "type": "setglobal" + } + ], + "desc": "\nReceives any number of arguments and prints their values to `stdout`, converting each argument to a string following the same rules of [tostring](http://www.lua.org/manual/5.4/manual.html#pdf-tostring).\nThe function print is not intended for formatted output, but only as a quick way to show a value, for instance for debugging. For complete control over the output, use [string.format](http://www.lua.org/manual/5.4/manual.html#pdf-string.format) and [io.write](http://www.lua.org/manual/5.4/manual.html#pdf-io.write).\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-print)", + "name": "print", + "rawdesc": "\nReceives any number of arguments and prints their values to `stdout`, converting each argument to a string following the same rules of [tostring](http://www.lua.org/manual/5.4/manual.html#pdf-tostring).\nThe function print is not intended for formatted output, but only as a quick way to show a value, for instance for debugging. For complete control over the output, use [string.format](http://www.lua.org/manual/5.4/manual.html#pdf-string.format) and [io.write](http://www.lua.org/manual/5.4/manual.html#pdf-io.write).\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-print)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 2450020, + "name": "v1", + "start": 2450018, + "type": "local", + "view": "any" + }, + { + "finish": 2450024, + "name": "v2", + "start": 2450022, + "type": "local", + "view": "any" + } + ], + "desc": "\nChecks whether v1 is equal to v2, without invoking the `__eq` metamethod.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-rawequal)", + "finish": 2450029, + "rawdesc": "\nChecks whether v1 is equal to v2, without invoking the `__eq` metamethod.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-rawequal)", + "returns": [ + { + "type": "function.return", + "view": "boolean" + } + ], + "start": 2450000, + "type": "function", + "view": "function rawequal(v1: any, v2: any)\n -> boolean" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 2450017, + "start": 2450009, + "type": "setglobal" + } + ], + "desc": "\nChecks whether v1 is equal to v2, without invoking the `__eq` metamethod.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-rawequal)", + "name": "rawequal", + "rawdesc": "\nChecks whether v1 is equal to v2, without invoking the `__eq` metamethod.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-rawequal)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 2560021, + "name": "table", + "start": 2560016, + "type": "local", + "view": "table" + }, + { + "finish": 2560028, + "name": "index", + "start": 2560023, + "type": "local", + "view": "any" + } + ], + "desc": "\nGets the real value of `table[index]`, without invoking the `__index` metamethod.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-rawget)", + "finish": 2560033, + "rawdesc": "\nGets the real value of `table[index]`, without invoking the `__index` metamethod.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-rawget)", + "returns": [ + { + "type": "function.return", + "view": "any" + } + ], + "start": 2560000, + "type": "function", + "view": "function rawget(table: table, index: any)\n -> any" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 2560015, + "start": 2560009, + "type": "setglobal" + } + ], + "desc": "\nGets the real value of `table[index]`, without invoking the `__index` metamethod.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-rawget)", + "name": "rawget", + "rawdesc": "\nGets the real value of `table[index]`, without invoking the `__index` metamethod.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-rawget)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 2660017, + "name": "v", + "start": 2660016, + "type": "local", + "view": "string|table" + } + ], + "desc": "\nReturns the length of the object `v`, without invoking the `__len` metamethod.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-rawlen)", + "finish": 2660022, + "rawdesc": "\nReturns the length of the object `v`, without invoking the `__len` metamethod.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-rawlen)", + "returns": [ + { + "name": "len", + "type": "function.return", + "view": "integer" + } + ], + "start": 2660000, + "type": "function", + "view": "function rawlen(v: string|table)\n -> len: integer" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 2660015, + "start": 2660009, + "type": "setglobal" + } + ], + "desc": "\nReturns the length of the object `v`, without invoking the `__len` metamethod.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-rawlen)", + "name": "rawlen", + "rawdesc": "\nReturns the length of the object `v`, without invoking the `__len` metamethod.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-rawlen)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 2790021, + "name": "table", + "start": 2790016, + "type": "local", + "view": "table" + }, + { + "finish": 2790028, + "name": "index", + "start": 2790023, + "type": "local", + "view": "any" + }, + { + "finish": 2790035, + "name": "value", + "start": 2790030, + "type": "local", + "view": "any" + } + ], + "desc": "\nSets the real value of `table[index]` to `value`, without using the `__newindex` metavalue. `table` must be a table, `index` any value different from `nil` and `NaN`, and `value` any Lua value.\nThis function returns `table`.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-rawset)", + "finish": 2790040, + "rawdesc": "\nSets the real value of `table[index]` to `value`, without using the `__newindex` metavalue. `table` must be a table, `index` any value different from `nil` and `NaN`, and `value` any Lua value.\nThis function returns `table`.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-rawset)", + "returns": [ + { + "type": "function.return", + "view": "table" + } + ], + "start": 2790000, + "type": "function", + "view": "function rawset(table: table, index: any, value: any)\n -> table" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 2790015, + "start": 2790009, + "type": "setglobal" + } + ], + "desc": "\nSets the real value of `table[index]` to `value`, without using the `__newindex` metavalue. `table` must be a table, `index` any value different from `nil` and `NaN`, and `value` any Lua value.\nThis function returns `table`.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-rawset)", + "name": "rawset", + "rawdesc": "\nSets the real value of `table[index]` to `value`, without using the `__newindex` metavalue. `table` must be a table, `index` any value different from `nil` and `NaN`, and `value` any Lua value.\nThis function returns `table`.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-rawset)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 100024, + "name": "modname", + "start": 100017, + "type": "local", + "view": "string" + } + ], + "desc": "\nLoads the given module, returns any value returned by the searcher(`true` when `nil`). Besides that value, also returns as a second result the loader data returned by the searcher, which indicates how `require` found the module. (For instance, if the module came from a file, this loader data is the file path.)\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-require)", + "finish": 100029, + "rawdesc": "\nLoads the given module, returns any value returned by the searcher(`true` when `nil`). Besides that value, also returns as a second result the loader data returned by the searcher, which indicates how `require` found the module. (For instance, if the module came from a file, this loader data is the file path.)\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-require)", + "returns": [ + { + "type": "function.return", + "view": "unknown" + }, + { + "name": "loaderdata", + "type": "function.return", + "view": "unknown" + } + ], + "start": 100000, + "type": "function", + "view": "function require(modname: string)\n -> unknown\n 2. loaderdata: unknown" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/package.lua", + "finish": 100016, + "start": 100009, + "type": "setglobal" + } + ], + "desc": "\nLoads the given module, returns any value returned by the searcher(`true` when `nil`). Besides that value, also returns as a second result the loader data returned by the searcher, which indicates how `require` found the module. (For instance, if the module came from a file, this loader data is the file path.)\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-require)", + "name": "require", + "rawdesc": "\nLoads the given module, returns any value returned by the searcher(`true` when `nil`). Besides that value, also returns as a second result the loader data returned by the searcher, which indicates how `require` found the module. (For instance, if the module came from a file, this loader data is the file path.)\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-require)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 2900021, + "name": "index", + "start": 2900016, + "type": "local", + "view": "integer|\"#\"" + }, + { + "finish": 2900026, + "start": 2900023, + "type": "...", + "view": "any" + } + ], + "desc": "\nIf `index` is a number, returns all arguments after argument number `index`; a negative number indexes from the end (`-1` is the last argument). Otherwise, `index` must be the string `\"#\"`, and `select` returns the total number of extra arguments it received.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-select)\n\n\n```lua\nindex:\n | \"#\"\n```", + "finish": 2900031, + "rawdesc": "\nIf `index` is a number, returns all arguments after argument number `index`; a negative number indexes from the end (`-1` is the last argument). Otherwise, `index` must be the string `\"#\"`, and `select` returns the total number of extra arguments it received.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-select)\n\n\n```lua\nindex:\n | \"#\"\n```", + "returns": [ + { + "type": "function.return", + "view": "any" + } + ], + "start": 2900000, + "type": "function", + "view": "function select(index: integer|\"#\", ...any)\n -> any" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 2900015, + "start": 2900009, + "type": "setglobal" + } + ], + "desc": "\nIf `index` is a number, returns all arguments after argument number `index`; a negative number indexes from the end (`-1` is the last argument). Otherwise, `index` must be the string `\"#\"`, and `select` returns the total number of extra arguments it received.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-select)\n\n\n```lua\nindex:\n | \"#\"\n```", + "name": "select", + "rawdesc": "\nIf `index` is a number, returns all arguments after argument number `index`; a negative number indexes from the end (`-1` is the last argument). Otherwise, `index` must be the string `\"#\"`, and `select` returns the total number of extra arguments it received.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-select)\n\n\n```lua\nindex:\n | \"#\"\n```", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 3010018, + "name": "f", + "start": 3010017, + "type": "local", + "view": "fun(...any):...integer|unknown" + }, + { + "finish": 3010025, + "name": "table", + "start": 3010020, + "type": "local", + "view": "table" + } + ], + "desc": "\nSets the environment to be used by the given function.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-setfenv)", + "finish": 3010030, + "rawdesc": "\nSets the environment to be used by the given function.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-setfenv)", + "returns": [ + { + "type": "function.return", + "view": "function" + } + ], + "start": 3010000, + "type": "function", + "view": "function setfenv(f: fun(...any):...integer|unknown, table: table)\n -> function" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 3010016, + "start": 3010009, + "type": "setglobal" + } + ], + "desc": "\nSets the environment to be used by the given function.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-setfenv)", + "name": "setfenv", + "rawdesc": "\nSets the environment to be used by the given function.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-setfenv)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 3470027, + "name": "table", + "start": 3470022, + "type": "local", + "view": "table" + }, + { + "finish": 3470038, + "name": "metatable", + "start": 3470029, + "type": "local", + "view": "(table|metatable)?" + } + ], + "desc": "\nSets the metatable for the given table. If `metatable` is `nil`, removes the metatable of the given table. If the original metatable has a `__metatable` field, raises an error.\n\nThis function returns `table`.\n\nTo change the metatable of other types from Lua code, you must use the debug library ([§6.10](http://www.lua.org/manual/5.4/manual.html#6.10)).\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-setmetatable)", + "finish": 3470043, + "rawdesc": "\nSets the metatable for the given table. If `metatable` is `nil`, removes the metatable of the given table. If the original metatable has a `__metatable` field, raises an error.\n\nThis function returns `table`.\n\nTo change the metatable of other types from Lua code, you must use the debug library ([§6.10](http://www.lua.org/manual/5.4/manual.html#6.10)).\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-setmetatable)", + "returns": [ + { + "type": "function.return", + "view": "table" + } + ], + "start": 3470000, + "type": "function", + "view": "function setmetatable(table: table, metatable?: table|metatable)\n -> table" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 3470021, + "start": 3470009, + "type": "setglobal" + } + ], + "desc": "\nSets the metatable for the given table. If `metatable` is `nil`, removes the metatable of the given table. If the original metatable has a `__metatable` field, raises an error.\n\nThis function returns `table`.\n\nTo change the metatable of other types from Lua code, you must use the debug library ([§6.10](http://www.lua.org/manual/5.4/manual.html#6.10)).\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-setmetatable)", + "name": "setmetatable", + "rawdesc": "\nSets the metatable for the given table. If `metatable` is `nil`, removes the metatable of the given table. If the original metatable has a `__metatable` field, raises an error.\n\nThis function returns `table`.\n\nTo change the metatable of other types from Lua code, you must use the debug library ([§6.10](http://www.lua.org/manual/5.4/manual.html#6.10)).\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-setmetatable)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "desc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string)\n", + "finish": 80011, + "rawdesc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string)\n", + "start": 80009, + "type": "table", + "view": "stringlib" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/string.lua", + "finish": 80006, + "start": 80000, + "type": "setglobal" + } + ], + "desc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string)\n", + "name": "string", + "rawdesc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string)\n", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 200022, + "name": "s", + "start": 200021, + "type": "local", + "view": "string|number" + }, + { + "finish": 200025, + "name": "i", + "start": 200024, + "type": "local", + "view": "integer?" + }, + { + "finish": 200028, + "name": "j", + "start": 200027, + "type": "local", + "view": "integer?" + } + ], + "desc": "\nReturns the internal numeric codes of the characters `s[i], s[i+1], ..., s[j]`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.byte)", + "finish": 200033, + "rawdesc": "\nReturns the internal numeric codes of the characters `s[i], s[i+1], ..., s[j]`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.byte)", + "returns": [ + { + "name": "...", + "type": "function.return", + "view": "integer" + } + ], + "start": 200000, + "type": "function", + "view": "function string.byte(s: string|number, i?: integer, j?: integer)\n -> ...integer" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/string.lua", + "finish": 200020, + "start": 200009, + "type": "setfield" + } + ], + "desc": "\nReturns the internal numeric codes of the characters `s[i], s[i+1], ..., s[j]`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.byte)", + "name": "string.byte", + "rawdesc": "\nReturns the internal numeric codes of the characters `s[i], s[i+1], ..., s[j]`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.byte)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 310025, + "name": "byte", + "start": 310021, + "type": "local", + "view": "integer" + }, + { + "finish": 310030, + "start": 310027, + "type": "...", + "view": "integer" + } + ], + "desc": "\nReturns a string with length equal to the number of arguments, in which each character has the internal numeric code equal to its corresponding argument.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.char)", + "finish": 310035, + "rawdesc": "\nReturns a string with length equal to the number of arguments, in which each character has the internal numeric code equal to its corresponding argument.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.char)", + "returns": [ + { + "type": "function.return", + "view": "string" + } + ], + "start": 310000, + "type": "function", + "view": "function string.char(byte: integer, ...integer)\n -> string" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/string.lua", + "finish": 310020, + "start": 310009, + "type": "setfield" + } + ], + "desc": "\nReturns a string with length equal to the number of arguments, in which each character has the internal numeric code equal to its corresponding argument.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.char)", + "name": "string.char", + "rawdesc": "\nReturns a string with length equal to the number of arguments, in which each character has the internal numeric code equal to its corresponding argument.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.char)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 420022, + "name": "f", + "start": 420021, + "type": "local", + "view": "fun(...any):...unknown" + }, + { + "finish": 420029, + "name": "strip", + "start": 420024, + "type": "local", + "view": "boolean?" + } + ], + "desc": "\nReturns a string containing a binary representation (a *binary chunk*) of the given function.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.dump)", + "finish": 420034, + "rawdesc": "\nReturns a string containing a binary representation (a *binary chunk*) of the given function.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.dump)", + "returns": [ + { + "type": "function.return", + "view": "string" + } + ], + "start": 420000, + "type": "function", + "view": "function string.dump(f: fun(...any):...unknown, strip?: boolean)\n -> string" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/string.lua", + "finish": 420020, + "start": 420009, + "type": "setfield" + } + ], + "desc": "\nReturns a string containing a binary representation (a *binary chunk*) of the given function.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.dump)", + "name": "string.dump", + "rawdesc": "\nReturns a string containing a binary representation (a *binary chunk*) of the given function.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.dump)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 570022, + "name": "s", + "start": 570021, + "type": "local", + "view": "string|number" + }, + { + "finish": 570031, + "name": "pattern", + "start": 570024, + "type": "local", + "view": "string|number" + }, + { + "finish": 570037, + "name": "init", + "start": 570033, + "type": "local", + "view": "integer?" + }, + { + "finish": 570044, + "name": "plain", + "start": 570039, + "type": "local", + "view": "boolean?" + } + ], + "desc": "\nLooks for the first match of `pattern` (see [§6.4.1](http://www.lua.org/manual/5.4/manual.html#6.4.1)) in the string.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.find)\n\n@*return* `start`\n\n@*return* `end`\n\n@*return* `...` — captured", + "finish": 570049, + "rawdesc": "\nLooks for the first match of `pattern` (see [§6.4.1](http://www.lua.org/manual/5.4/manual.html#6.4.1)) in the string.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.find)", + "returns": [ + { + "name": "start", + "type": "function.return", + "view": "integer|nil" + }, + { + "name": "end", + "type": "function.return", + "view": "integer|nil" + }, + { + "desc": "captured", + "name": "...", + "rawdesc": "captured", + "type": "function.return", + "view": "any" + } + ], + "start": 570000, + "type": "function", + "view": "function string.find(s: string|number, pattern: string|number, init?: integer, plain?: boolean)\n -> start: integer|nil\n 2. end: integer|nil\n 3. ...any" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/string.lua", + "finish": 570020, + "start": 570009, + "type": "setfield" + } + ], + "desc": "\nLooks for the first match of `pattern` (see [§6.4.1](http://www.lua.org/manual/5.4/manual.html#6.4.1)) in the string.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.find)\n\n@*return* `start`\n\n@*return* `end`\n\n@*return* `...` — captured", + "name": "string.find", + "rawdesc": "\nLooks for the first match of `pattern` (see [§6.4.1](http://www.lua.org/manual/5.4/manual.html#6.4.1)) in the string.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.find)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 680024, + "name": "s", + "start": 680023, + "type": "local", + "view": "string|number" + }, + { + "finish": 680029, + "start": 680026, + "type": "...", + "view": "any" + } + ], + "desc": "\nReturns a formatted version of its variable number of arguments following the description given in its first argument.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.format)", + "finish": 680034, + "rawdesc": "\nReturns a formatted version of its variable number of arguments following the description given in its first argument.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.format)", + "returns": [ + { + "type": "function.return", + "view": "string" + } + ], + "start": 680000, + "type": "function", + "view": "function string.format(s: string|number, ...any)\n -> string" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/string.lua", + "finish": 680022, + "start": 680009, + "type": "setfield" + } + ], + "desc": "\nReturns a formatted version of its variable number of arguments following the description given in its first argument.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.format)", + "name": "string.format", + "rawdesc": "\nReturns a formatted version of its variable number of arguments following the description given in its first argument.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.format)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 890024, + "name": "s", + "start": 890023, + "type": "local", + "view": "string|number" + }, + { + "finish": 890033, + "name": "pattern", + "start": 890026, + "type": "local", + "view": "string|number" + }, + { + "finish": 890039, + "name": "init", + "start": 890035, + "type": "local", + "view": "integer?" + } + ], + "desc": "\nReturns an iterator function that, each time it is called, returns the next captures from `pattern` (see [§6.4.1](http://www.lua.org/manual/5.4/manual.html#6.4.1)) over the string s.\n\nAs an example, the following loop will iterate over all the words from string s, printing one per line:\n```lua\n s =\n\"hello world from Lua\"\n for w in string.gmatch(s, \"%a+\") do\n print(w)\n end\n```\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.gmatch)", + "finish": 890044, + "rawdesc": "\nReturns an iterator function that, each time it is called, returns the next captures from `pattern` (see [§6.4.1](http://www.lua.org/manual/5.4/manual.html#6.4.1)) over the string s.\n\nAs an example, the following loop will iterate over all the words from string s, printing one per line:\n```lua\n s =\n\"hello world from Lua\"\n for w in string.gmatch(s, \"%a+\") do\n print(w)\n end\n```\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.gmatch)", + "returns": [ + { + "type": "function.return", + "view": "fun():string, ...unknown" + } + ], + "start": 890000, + "type": "function", + "view": "function string.gmatch(s: string|number, pattern: string|number, init?: integer)\n -> fun():string, ...unknown" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/string.lua", + "finish": 890022, + "start": 890009, + "type": "setfield" + } + ], + "desc": "\nReturns an iterator function that, each time it is called, returns the next captures from `pattern` (see [§6.4.1](http://www.lua.org/manual/5.4/manual.html#6.4.1)) over the string s.\n\nAs an example, the following loop will iterate over all the words from string s, printing one per line:\n```lua\n s =\n\"hello world from Lua\"\n for w in string.gmatch(s, \"%a+\") do\n print(w)\n end\n```\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.gmatch)", + "name": "string.gmatch", + "rawdesc": "\nReturns an iterator function that, each time it is called, returns the next captures from `pattern` (see [§6.4.1](http://www.lua.org/manual/5.4/manual.html#6.4.1)) over the string s.\n\nAs an example, the following loop will iterate over all the words from string s, printing one per line:\n```lua\n s =\n\"hello world from Lua\"\n for w in string.gmatch(s, \"%a+\") do\n print(w)\n end\n```\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.gmatch)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1030022, + "name": "s", + "start": 1030021, + "type": "local", + "view": "string|number" + }, + { + "finish": 1030031, + "name": "pattern", + "start": 1030024, + "type": "local", + "view": "string|number" + }, + { + "finish": 1030037, + "name": "repl", + "start": 1030033, + "type": "local", + "view": "string|number|function|table" + }, + { + "finish": 1030040, + "name": "n", + "start": 1030039, + "type": "local", + "view": "integer?" + } + ], + "desc": "\nReturns a copy of s in which all (or the first `n`, if given) occurrences of the `pattern` (see [§6.4.1](http://www.lua.org/manual/5.4/manual.html#6.4.1)) have been replaced by a replacement string specified by `repl`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.gsub)", + "finish": 1030045, + "rawdesc": "\nReturns a copy of s in which all (or the first `n`, if given) occurrences of the `pattern` (see [§6.4.1](http://www.lua.org/manual/5.4/manual.html#6.4.1)) have been replaced by a replacement string specified by `repl`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.gsub)", + "returns": [ + { + "type": "function.return", + "view": "string" + }, + { + "name": "count", + "type": "function.return", + "view": "integer" + } + ], + "start": 1030000, + "type": "function", + "view": "function string.gsub(s: string|number, pattern: string|number, repl: string|number|function|table, n?: integer)\n -> string\n 2. count: integer" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/string.lua", + "finish": 1030020, + "start": 1030009, + "type": "setfield" + } + ], + "desc": "\nReturns a copy of s in which all (or the first `n`, if given) occurrences of the `pattern` (see [§6.4.1](http://www.lua.org/manual/5.4/manual.html#6.4.1)) have been replaced by a replacement string specified by `repl`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.gsub)", + "name": "string.gsub", + "rawdesc": "\nReturns a copy of s in which all (or the first `n`, if given) occurrences of the `pattern` (see [§6.4.1](http://www.lua.org/manual/5.4/manual.html#6.4.1)) have been replaced by a replacement string specified by `repl`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.gsub)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1130021, + "name": "s", + "start": 1130020, + "type": "local", + "view": "string|number" + } + ], + "desc": "\nReturns its length.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.len)", + "finish": 1130026, + "rawdesc": "\nReturns its length.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.len)", + "returns": [ + { + "type": "function.return", + "view": "integer" + } + ], + "start": 1130000, + "type": "function", + "view": "function string.len(s: string|number)\n -> integer" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/string.lua", + "finish": 1130019, + "start": 1130009, + "type": "setfield" + } + ], + "desc": "\nReturns its length.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.len)", + "name": "string.len", + "rawdesc": "\nReturns its length.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.len)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1230023, + "name": "s", + "start": 1230022, + "type": "local", + "view": "string|number" + } + ], + "desc": "\nReturns a copy of this string with all uppercase letters changed to lowercase.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.lower)", + "finish": 1230028, + "rawdesc": "\nReturns a copy of this string with all uppercase letters changed to lowercase.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.lower)", + "returns": [ + { + "type": "function.return", + "view": "string" + } + ], + "start": 1230000, + "type": "function", + "view": "function string.lower(s: string|number)\n -> string" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/string.lua", + "finish": 1230021, + "start": 1230009, + "type": "setfield" + } + ], + "desc": "\nReturns a copy of this string with all uppercase letters changed to lowercase.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.lower)", + "name": "string.lower", + "rawdesc": "\nReturns a copy of this string with all uppercase letters changed to lowercase.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.lower)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1350023, + "name": "s", + "start": 1350022, + "type": "local", + "view": "string|number" + }, + { + "finish": 1350032, + "name": "pattern", + "start": 1350025, + "type": "local", + "view": "string|number" + }, + { + "finish": 1350038, + "name": "init", + "start": 1350034, + "type": "local", + "view": "integer?" + } + ], + "desc": "\nLooks for the first match of `pattern` (see [§6.4.1](http://www.lua.org/manual/5.4/manual.html#6.4.1)) in the string.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.match)", + "finish": 1350043, + "rawdesc": "\nLooks for the first match of `pattern` (see [§6.4.1](http://www.lua.org/manual/5.4/manual.html#6.4.1)) in the string.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.match)", + "returns": [ + { + "name": "...", + "type": "function.return", + "view": "any" + } + ], + "start": 1350000, + "type": "function", + "view": "function string.match(s: string|number, pattern: string|number, init?: integer)\n -> ...any" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/string.lua", + "finish": 1350021, + "start": 1350009, + "type": "setfield" + } + ], + "desc": "\nLooks for the first match of `pattern` (see [§6.4.1](http://www.lua.org/manual/5.4/manual.html#6.4.1)) in the string.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.match)", + "name": "string.match", + "rawdesc": "\nLooks for the first match of `pattern` (see [§6.4.1](http://www.lua.org/manual/5.4/manual.html#6.4.1)) in the string.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.match)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1490024, + "name": "fmt", + "start": 1490021, + "type": "local", + "view": "string" + }, + { + "finish": 1490028, + "name": "v1", + "start": 1490026, + "type": "local", + "view": "string|number" + }, + { + "finish": 1490032, + "name": "v2", + "start": 1490030, + "type": "local", + "view": "(string|number)?" + }, + { + "finish": 1490037, + "start": 1490034, + "type": "...", + "view": "string|number" + } + ], + "desc": "\nReturns a binary string containing the values `v1`, `v2`, etc. packed (that is, serialized in binary form) according to the format string `fmt` (see [§6.4.2](http://www.lua.org/manual/5.4/manual.html#6.4.2)) .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.pack)", + "finish": 1490042, + "rawdesc": "\nReturns a binary string containing the values `v1`, `v2`, etc. packed (that is, serialized in binary form) according to the format string `fmt` (see [§6.4.2](http://www.lua.org/manual/5.4/manual.html#6.4.2)) .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.pack)", + "returns": [ + { + "name": "binary", + "type": "function.return", + "view": "string" + } + ], + "start": 1490000, + "type": "function", + "view": "function string.pack(fmt: string, v1: string|number, v2?: string|number, ...string|number)\n -> binary: string" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/string.lua", + "finish": 1490020, + "start": 1490009, + "type": "setfield" + } + ], + "desc": "\nReturns a binary string containing the values `v1`, `v2`, etc. packed (that is, serialized in binary form) according to the format string `fmt` (see [§6.4.2](http://www.lua.org/manual/5.4/manual.html#6.4.2)) .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.pack)", + "name": "string.pack", + "rawdesc": "\nReturns a binary string containing the values `v1`, `v2`, etc. packed (that is, serialized in binary form) according to the format string `fmt` (see [§6.4.2](http://www.lua.org/manual/5.4/manual.html#6.4.2)) .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.pack)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1600028, + "name": "fmt", + "start": 1600025, + "type": "local", + "view": "string" + } + ], + "desc": "\nReturns the size of a string resulting from `string.pack` with the given format string `fmt` (see [§6.4.2](http://www.lua.org/manual/5.4/manual.html#6.4.2)) .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.packsize)", + "finish": 1600033, + "rawdesc": "\nReturns the size of a string resulting from `string.pack` with the given format string `fmt` (see [§6.4.2](http://www.lua.org/manual/5.4/manual.html#6.4.2)) .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.packsize)", + "returns": [ + { + "type": "function.return", + "view": "integer" + } + ], + "start": 1600000, + "type": "function", + "view": "function string.packsize(fmt: string)\n -> integer" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/string.lua", + "finish": 1600024, + "start": 1600009, + "type": "setfield" + } + ], + "desc": "\nReturns the size of a string resulting from `string.pack` with the given format string `fmt` (see [§6.4.2](http://www.lua.org/manual/5.4/manual.html#6.4.2)) .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.packsize)", + "name": "string.packsize", + "rawdesc": "\nReturns the size of a string resulting from `string.pack` with the given format string `fmt` (see [§6.4.2](http://www.lua.org/manual/5.4/manual.html#6.4.2)) .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.packsize)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1720021, + "name": "s", + "start": 1720020, + "type": "local", + "view": "string|number" + }, + { + "finish": 1720024, + "name": "n", + "start": 1720023, + "type": "local", + "view": "integer" + }, + { + "finish": 1720029, + "name": "sep", + "start": 1720026, + "type": "local", + "view": "(string|number)?" + } + ], + "desc": "\nReturns a string that is the concatenation of `n` copies of the string `s` separated by the string `sep`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.rep)", + "finish": 1720034, + "rawdesc": "\nReturns a string that is the concatenation of `n` copies of the string `s` separated by the string `sep`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.rep)", + "returns": [ + { + "type": "function.return", + "view": "string" + } + ], + "start": 1720000, + "type": "function", + "view": "function string.rep(s: string|number, n: integer, sep?: string|number)\n -> string" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/string.lua", + "finish": 1720019, + "start": 1720009, + "type": "setfield" + } + ], + "desc": "\nReturns a string that is the concatenation of `n` copies of the string `s` separated by the string `sep`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.rep)", + "name": "string.rep", + "rawdesc": "\nReturns a string that is the concatenation of `n` copies of the string `s` separated by the string `sep`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.rep)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1820025, + "name": "s", + "start": 1820024, + "type": "local", + "view": "string|number" + } + ], + "desc": "\nReturns a string that is the string `s` reversed.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.reverse)", + "finish": 1820030, + "rawdesc": "\nReturns a string that is the string `s` reversed.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.reverse)", + "returns": [ + { + "type": "function.return", + "view": "string" + } + ], + "start": 1820000, + "type": "function", + "view": "function string.reverse(s: string|number)\n -> string" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/string.lua", + "finish": 1820023, + "start": 1820009, + "type": "setfield" + } + ], + "desc": "\nReturns a string that is the string `s` reversed.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.reverse)", + "name": "string.reverse", + "rawdesc": "\nReturns a string that is the string `s` reversed.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.reverse)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1940021, + "name": "s", + "start": 1940020, + "type": "local", + "view": "string|number" + }, + { + "finish": 1940024, + "name": "i", + "start": 1940023, + "type": "local", + "view": "integer" + }, + { + "finish": 1940027, + "name": "j", + "start": 1940026, + "type": "local", + "view": "integer?" + } + ], + "desc": "\nReturns the substring of the string that starts at `i` and continues until `j`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.sub)", + "finish": 1940032, + "rawdesc": "\nReturns the substring of the string that starts at `i` and continues until `j`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.sub)", + "returns": [ + { + "type": "function.return", + "view": "string" + } + ], + "start": 1940000, + "type": "function", + "view": "function string.sub(s: string|number, i: integer, j?: integer)\n -> string" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/string.lua", + "finish": 1940019, + "start": 1940009, + "type": "setfield" + } + ], + "desc": "\nReturns the substring of the string that starts at `i` and continues until `j`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.sub)", + "name": "string.sub", + "rawdesc": "\nReturns the substring of the string that starts at `i` and continues until `j`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.sub)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 2080026, + "name": "fmt", + "start": 2080023, + "type": "local", + "view": "string" + }, + { + "finish": 2080029, + "name": "s", + "start": 2080028, + "type": "local", + "view": "string" + }, + { + "finish": 2080034, + "name": "pos", + "start": 2080031, + "type": "local", + "view": "integer?" + } + ], + "desc": "\nReturns the values packed in string according to the format string `fmt` (see [§6.4.2](http://www.lua.org/manual/5.4/manual.html#6.4.2)) .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.unpack)", + "finish": 2080039, + "rawdesc": "\nReturns the values packed in string according to the format string `fmt` (see [§6.4.2](http://www.lua.org/manual/5.4/manual.html#6.4.2)) .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.unpack)", + "returns": [ + { + "name": "...", + "type": "function.return", + "view": "any" + }, + { + "name": "offset", + "type": "function.return", + "view": "integer" + } + ], + "start": 2080000, + "type": "function", + "view": "function string.unpack(fmt: string, s: string, pos?: integer)\n -> ...any\n 2. offset: integer" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/string.lua", + "finish": 2080022, + "start": 2080009, + "type": "setfield" + } + ], + "desc": "\nReturns the values packed in string according to the format string `fmt` (see [§6.4.2](http://www.lua.org/manual/5.4/manual.html#6.4.2)) .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.unpack)", + "name": "string.unpack", + "rawdesc": "\nReturns the values packed in string according to the format string `fmt` (see [§6.4.2](http://www.lua.org/manual/5.4/manual.html#6.4.2)) .\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.unpack)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 2180023, + "name": "s", + "start": 2180022, + "type": "local", + "view": "string|number" + } + ], + "desc": "\nReturns a copy of this string with all lowercase letters changed to uppercase.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.upper)", + "finish": 2180028, + "rawdesc": "\nReturns a copy of this string with all lowercase letters changed to uppercase.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.upper)", + "returns": [ + { + "type": "function.return", + "view": "string" + } + ], + "start": 2180000, + "type": "function", + "view": "function string.upper(s: string|number)\n -> string" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/string.lua", + "finish": 2180021, + "start": 2180009, + "type": "setfield" + } + ], + "desc": "\nReturns a copy of this string with all lowercase letters changed to uppercase.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.upper)", + "name": "string.upper", + "rawdesc": "\nReturns a copy of this string with all lowercase letters changed to uppercase.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.upper)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "desc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table)\n", + "finish": 80010, + "rawdesc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table)\n", + "start": 80008, + "type": "table", + "view": "tablelib" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/table.lua", + "finish": 80005, + "start": 80000, + "type": "setglobal" + } + ], + "desc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table)\n", + "name": "table", + "rawdesc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table)\n", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 210026, + "name": "list", + "start": 210022, + "type": "local", + "view": "table" + }, + { + "finish": 210031, + "name": "sep", + "start": 210028, + "type": "local", + "view": "string?" + }, + { + "finish": 210034, + "name": "i", + "start": 210033, + "type": "local", + "view": "integer?" + }, + { + "finish": 210037, + "name": "j", + "start": 210036, + "type": "local", + "view": "integer?" + } + ], + "desc": "\nGiven a list where all elements are strings or numbers, returns the string `list[i]..sep..list[i+1] ··· sep..list[j]`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.concat)", + "finish": 210042, + "rawdesc": "\nGiven a list where all elements are strings or numbers, returns the string `list[i]..sep..list[i+1] ··· sep..list[j]`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.concat)", + "returns": [ + { + "type": "function.return", + "view": "string" + } + ], + "start": 210000, + "type": "function", + "view": "function table.concat(list: table, sep?: string, i?: integer, j?: integer)\n -> string" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/table.lua", + "finish": 210021, + "start": 210009, + "type": "setfield" + } + ], + "desc": "\nGiven a list where all elements are strings or numbers, returns the string `list[i]..sep..list[i+1] ··· sep..list[j]`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.concat)", + "name": "table.concat", + "rawdesc": "\nGiven a list where all elements are strings or numbers, returns the string `list[i]..sep..list[i+1] ··· sep..list[j]`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.concat)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1250027, + "name": "list", + "start": 1250023, + "type": "local", + "view": "any" + }, + { + "finish": 1250037, + "name": "callback", + "start": 1250029, + "type": "local", + "view": "fun(key: string, value: any):|nil" + } + ], + "desc": "\nExecutes the given f over all elements of table. For each element, f is called with the index and respective value as arguments. If f returns a non-nil value, then the loop is broken, and this value is returned as the final value of foreach.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.foreach)", + "finish": 1250042, + "rawdesc": "\nExecutes the given f over all elements of table. For each element, f is called with the index and respective value as arguments. If f returns a non-nil value, then the loop is broken, and this value is returned as the final value of foreach.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.foreach)", + "returns": [ + { + "type": "function.return", + "view": "|nil" + } + ], + "start": 1250000, + "type": "function", + "view": "function table.foreach(list: any, callback: fun(key: string, value: any):|nil)\n -> |nil" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/table.lua", + "finish": 1250022, + "start": 1250009, + "type": "setfield" + } + ], + "desc": "\nExecutes the given f over all elements of table. For each element, f is called with the index and respective value as arguments. If f returns a non-nil value, then the loop is broken, and this value is returned as the final value of foreach.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.foreach)", + "name": "table.foreach", + "rawdesc": "\nExecutes the given f over all elements of table. For each element, f is called with the index and respective value as arguments. If f returns a non-nil value, then the loop is broken, and this value is returned as the final value of foreach.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.foreach)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1380028, + "name": "list", + "start": 1380024, + "type": "local", + "view": "any" + }, + { + "finish": 1380038, + "name": "callback", + "start": 1380030, + "type": "local", + "view": "fun(key: string, value: any):|nil" + } + ], + "desc": "\nExecutes the given f over the numerical indices of table. For each index, f is called with the index and respective value as arguments. Indices are visited in sequential order, from 1 to n, where n is the size of the table. If f returns a non-nil value, then the loop is broken and this value is returned as the result of foreachi.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.foreachi)", + "finish": 1380043, + "rawdesc": "\nExecutes the given f over the numerical indices of table. For each index, f is called with the index and respective value as arguments. Indices are visited in sequential order, from 1 to n, where n is the size of the table. If f returns a non-nil value, then the loop is broken and this value is returned as the result of foreachi.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.foreachi)", + "returns": [ + { + "type": "function.return", + "view": "|nil" + } + ], + "start": 1380000, + "type": "function", + "view": "function table.foreachi(list: any, callback: fun(key: string, value: any):|nil)\n -> |nil" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/table.lua", + "finish": 1380023, + "start": 1380009, + "type": "setfield" + } + ], + "desc": "\nExecutes the given f over the numerical indices of table. For each index, f is called with the index and respective value as arguments. Indices are visited in sequential order, from 1 to n, where n is the size of the table. If f returns a non-nil value, then the loop is broken and this value is returned as the result of foreachi.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.foreachi)", + "name": "table.foreachi", + "rawdesc": "\nExecutes the given f over the numerical indices of table. For each index, f is called with the index and respective value as arguments. Indices are visited in sequential order, from 1 to n, where n is the size of the table. If f returns a non-nil value, then the loop is broken and this value is returned as the result of foreachi.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.foreachi)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1510024, + "name": "list", + "start": 1510020, + "type": "local", + "view": "[]" + } + ], + "desc": "\nReturns the number of elements in the table. This function is equivalent to `#list`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.getn)", + "finish": 1510029, + "rawdesc": "\nReturns the number of elements in the table. This function is equivalent to `#list`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.getn)", + "returns": [ + { + "type": "function.return", + "view": "integer" + } + ], + "start": 1510000, + "type": "function", + "view": "function table.getn(list: [])\n -> integer" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/table.lua", + "finish": 1510019, + "start": 1510009, + "type": "setfield" + } + ], + "desc": "\nReturns the number of elements in the table. This function is equivalent to `#list`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.getn)", + "name": "table.getn", + "rawdesc": "\nReturns the number of elements in the table. This function is equivalent to `#list`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.getn)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 320026, + "name": "list", + "start": 320022, + "type": "local", + "view": "table" + }, + { + "finish": 320031, + "name": "pos", + "start": 320028, + "type": "local", + "view": "integer" + }, + { + "finish": 320038, + "name": "value", + "start": 320033, + "type": "local", + "view": "any" + } + ], + "desc": "\nInserts element `value` at position `pos` in `list`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.insert)", + "finish": 320043, + "rawdesc": "\nInserts element `value` at position `pos` in `list`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.insert)", + "start": 320000, + "type": "function", + "view": "function table.insert(list: table, pos: integer, value: any)" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/table.lua", + "finish": 320021, + "start": 320009, + "type": "setfield" + } + ], + "desc": "\nInserts element `value` at position `pos` in `list`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.insert)", + "name": "table.insert", + "rawdesc": "\nInserts element `value` at position `pos` in `list`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.insert)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 430025, + "name": "table", + "start": 430020, + "type": "local", + "view": "table" + } + ], + "desc": "\nReturns the largest positive numerical index of the given table, or zero if the table has no positive numerical indices.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.maxn)", + "finish": 430030, + "rawdesc": "\nReturns the largest positive numerical index of the given table, or zero if the table has no positive numerical indices.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.maxn)", + "returns": [ + { + "type": "function.return", + "view": "integer" + } + ], + "start": 430000, + "type": "function", + "view": "function table.maxn(table: table)\n -> integer" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/table.lua", + "finish": 430019, + "start": 430009, + "type": "setfield" + } + ], + "desc": "\nReturns the largest positive numerical index of the given table, or zero if the table has no positive numerical indices.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.maxn)", + "name": "table.maxn", + "rawdesc": "\nReturns the largest positive numerical index of the given table, or zero if the table has no positive numerical indices.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.maxn)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 630022, + "name": "a1", + "start": 630020, + "type": "local", + "view": "table" + }, + { + "finish": 630025, + "name": "f", + "start": 630024, + "type": "local", + "view": "integer" + }, + { + "finish": 630028, + "name": "e", + "start": 630027, + "type": "local", + "view": "integer" + }, + { + "finish": 630031, + "name": "t", + "start": 630030, + "type": "local", + "view": "integer" + }, + { + "finish": 630035, + "name": "a2", + "start": 630033, + "type": "local", + "view": "table?" + } + ], + "desc": "\nMoves elements from table `a1` to table `a2`.\n```lua\na2[t],··· =\na1[f],···,a1[e]\nreturn a2\n```\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.move)", + "finish": 630040, + "rawdesc": "\nMoves elements from table `a1` to table `a2`.\n```lua\na2[t],··· =\na1[f],···,a1[e]\nreturn a2\n```\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.move)", + "returns": [ + { + "name": "a2", + "type": "function.return", + "view": "table" + } + ], + "start": 630000, + "type": "function", + "view": "function table.move(a1: table, f: integer, e: integer, t: integer, a2?: table)\n -> a2: table" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/table.lua", + "finish": 630019, + "start": 630009, + "type": "setfield" + } + ], + "desc": "\nMoves elements from table `a1` to table `a2`.\n```lua\na2[t],··· =\na1[f],···,a1[e]\nreturn a2\n```\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.move)", + "name": "table.move", + "rawdesc": "\nMoves elements from table `a1` to table `a2`.\n```lua\na2[t],··· =\na1[f],···,a1[e]\nreturn a2\n```\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.move)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 730023, + "start": 730020, + "type": "...", + "view": "unknown" + } + ], + "desc": "\nReturns a new table with all arguments stored into keys `1`, `2`, etc. and with a field `\"n\"` with the total number of arguments.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.pack)", + "finish": 730028, + "rawdesc": "\nReturns a new table with all arguments stored into keys `1`, `2`, etc. and with a field `\"n\"` with the total number of arguments.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.pack)", + "returns": [ + { + "type": "function.return", + "view": "table" + } + ], + "start": 730000, + "type": "function", + "view": "function table.pack(...any)\n -> table" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/table.lua", + "finish": 730019, + "start": 730009, + "type": "setfield" + } + ], + "desc": "\nReturns a new table with all arguments stored into keys `1`, `2`, etc. and with a field `\"n\"` with the total number of arguments.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.pack)", + "name": "table.pack", + "rawdesc": "\nReturns a new table with all arguments stored into keys `1`, `2`, etc. and with a field `\"n\"` with the total number of arguments.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.pack)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 830026, + "name": "list", + "start": 830022, + "type": "local", + "view": "table" + }, + { + "finish": 830031, + "name": "pos", + "start": 830028, + "type": "local", + "view": "integer?" + } + ], + "desc": "\nRemoves from `list` the element at position `pos`, returning the value of the removed element.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.remove)", + "finish": 830036, + "rawdesc": "\nRemoves from `list` the element at position `pos`, returning the value of the removed element.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.remove)", + "returns": [ + { + "type": "function.return", + "view": "any" + } + ], + "start": 830000, + "type": "function", + "view": "function table.remove(list: table, pos?: integer)\n -> any" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/table.lua", + "finish": 830021, + "start": 830009, + "type": "setfield" + } + ], + "desc": "\nRemoves from `list` the element at position `pos`, returning the value of the removed element.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.remove)", + "name": "table.remove", + "rawdesc": "\nRemoves from `list` the element at position `pos`, returning the value of the removed element.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.remove)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 930024, + "name": "list", + "start": 930020, + "type": "local", + "view": "[]" + }, + { + "finish": 930030, + "name": "comp", + "start": 930026, + "type": "local", + "view": "(fun(a: , b: ):boolean)?" + } + ], + "desc": "\nSorts list elements in a given order, *in-place*, from `list[1]` to `list[#list]`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.sort)", + "finish": 930035, + "rawdesc": "\nSorts list elements in a given order, *in-place*, from `list[1]` to `list[#list]`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.sort)", + "start": 930000, + "type": "function", + "view": "function table.sort(list: [], comp?: fun(a: , b: ):boolean)" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/table.lua", + "finish": 930019, + "start": 930009, + "type": "setfield" + } + ], + "desc": "\nSorts list elements in a given order, *in-place*, from `list[1]` to `list[#list]`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.sort)", + "name": "table.sort", + "rawdesc": "\nSorts list elements in a given order, *in-place*, from `list[1]` to `list[#list]`.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.sort)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 1120026, + "name": "list", + "start": 1120022, + "type": "local", + "view": "[]" + }, + { + "finish": 1120029, + "name": "i", + "start": 1120028, + "type": "local", + "view": "integer?" + }, + { + "finish": 1120032, + "name": "j", + "start": 1120031, + "type": "local", + "view": "integer?" + } + ], + "desc": "\nReturns the elements from the given list. This function is equivalent to\n```lua\n return list[i], list[i+1], ···, list[j]\n```\nBy default, `i` is `1` and `j` is `#list`.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.unpack)", + "finish": 1120037, + "rawdesc": "\nReturns the elements from the given list. This function is equivalent to\n```lua\n return list[i], list[i+1], ···, list[j]\n```\nBy default, `i` is `1` and `j` is `#list`.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.unpack)", + "returns": [ + { + "name": "...", + "type": "function.return", + "view": "" + } + ], + "start": 1120000, + "type": "function", + "view": "function table.unpack(list: [], i?: integer, j?: integer)\n -> ..." + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/table.lua", + "finish": 1120021, + "start": 1120009, + "type": "setfield" + } + ], + "desc": "\nReturns the elements from the given list. This function is equivalent to\n```lua\n return list[i], list[i+1], ···, list[j]\n```\nBy default, `i` is `1` and `j` is `#list`.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.unpack)", + "name": "table.unpack", + "rawdesc": "\nReturns the elements from the given list. This function is equivalent to\n```lua\n return list[i], list[i+1], ···, list[j]\n```\nBy default, `i` is `1` and `j` is `#list`.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.unpack)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 3610019, + "name": "e", + "start": 3610018, + "type": "local", + "view": "any" + } + ], + "desc": "\nWhen called with no `base`, `tonumber` tries to convert its argument to a number. If the argument is already a number or a string convertible to a number, then `tonumber` returns this number; otherwise, it returns `fail`.\n\nThe conversion of strings can result in integers or floats, according to the lexical conventions of Lua (see [§3.1](http://www.lua.org/manual/5.4/manual.html#3.1)). The string may have leading and trailing spaces and a sign.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-tonumber)", + "finish": 3610024, + "rawdesc": "\nWhen called with no `base`, `tonumber` tries to convert its argument to a number. If the argument is already a number or a string convertible to a number, then `tonumber` returns this number; otherwise, it returns `fail`.\n\nThe conversion of strings can result in integers or floats, according to the lexical conventions of Lua (see [§3.1](http://www.lua.org/manual/5.4/manual.html#3.1)). The string may have leading and trailing spaces and a sign.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-tonumber)", + "returns": [ + { + "type": "function.return", + "view": "number?" + } + ], + "start": 3610000, + "type": "function", + "view": "function tonumber(e: any)\n -> number?" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 3610017, + "start": 3610009, + "type": "setglobal" + } + ], + "desc": "\nWhen called with no `base`, `tonumber` tries to convert its argument to a number. If the argument is already a number or a string convertible to a number, then `tonumber` returns this number; otherwise, it returns `fail`.\n\nThe conversion of strings can result in integers or floats, according to the lexical conventions of Lua (see [§3.1](http://www.lua.org/manual/5.4/manual.html#3.1)). The string may have leading and trailing spaces and a sign.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-tonumber)", + "name": "tonumber", + "rawdesc": "\nWhen called with no `base`, `tonumber` tries to convert its argument to a number. If the argument is already a number or a string convertible to a number, then `tonumber` returns this number; otherwise, it returns `fail`.\n\nThe conversion of strings can result in integers or floats, according to the lexical conventions of Lua (see [§3.1](http://www.lua.org/manual/5.4/manual.html#3.1)). The string may have leading and trailing spaces and a sign.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-tonumber)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 3760019, + "name": "v", + "start": 3760018, + "type": "local", + "view": "any" + } + ], + "desc": "\nReceives a value of any type and converts it to a string in a human-readable format.\n\nIf the metatable of `v` has a `__tostring` field, then `tostring` calls the corresponding value with `v` as argument, and uses the result of the call as its result. Otherwise, if the metatable of `v` has a `__name` field with a string value, `tostring` may use that string in its final result.\n\nFor complete control of how numbers are converted, use [string.format](http://www.lua.org/manual/5.4/manual.html#pdf-string.format).\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-tostring)", + "finish": 3760024, + "rawdesc": "\nReceives a value of any type and converts it to a string in a human-readable format.\n\nIf the metatable of `v` has a `__tostring` field, then `tostring` calls the corresponding value with `v` as argument, and uses the result of the call as its result. Otherwise, if the metatable of `v` has a `__name` field with a string value, `tostring` may use that string in its final result.\n\nFor complete control of how numbers are converted, use [string.format](http://www.lua.org/manual/5.4/manual.html#pdf-string.format).\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-tostring)", + "returns": [ + { + "type": "function.return", + "view": "string" + } + ], + "start": 3760000, + "type": "function", + "view": "function tostring(v: any)\n -> string" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 3760017, + "start": 3760009, + "type": "setglobal" + } + ], + "desc": "\nReceives a value of any type and converts it to a string in a human-readable format.\n\nIf the metatable of `v` has a `__tostring` field, then `tostring` calls the corresponding value with `v` as argument, and uses the result of the call as its result. Otherwise, if the metatable of `v` has a `__name` field with a string value, `tostring` may use that string in its final result.\n\nFor complete control of how numbers are converted, use [string.format](http://www.lua.org/manual/5.4/manual.html#pdf-string.format).\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-tostring)", + "name": "tostring", + "rawdesc": "\nReceives a value of any type and converts it to a string in a human-readable format.\n\nIf the metatable of `v` has a `__tostring` field, then `tostring` calls the corresponding value with `v` as argument, and uses the result of the call as its result. Otherwise, if the metatable of `v` has a `__name` field with a string value, `tostring` may use that string in its final result.\n\nFor complete control of how numbers are converted, use [string.format](http://www.lua.org/manual/5.4/manual.html#pdf-string.format).\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-tostring)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 3970015, + "name": "v", + "start": 3970014, + "type": "local", + "view": "any" + } + ], + "desc": "\nReturns the type of its only argument, coded as a string. The possible results of this function are `\"nil\"` (a string, not the value `nil`), `\"number\"`, `\"string\"`, `\"boolean\"`, `\"table\"`, `\"function\"`, `\"thread\"`, and `\"userdata\"`.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-type)\n\n\n```lua\ntype:\n | \"nil\"\n | \"number\"\n | \"string\"\n | \"boolean\"\n | \"table\"\n | \"function\"\n | \"thread\"\n | \"userdata\"\n```", + "finish": 3970020, + "rawdesc": "\nReturns the type of its only argument, coded as a string. The possible results of this function are `\"nil\"` (a string, not the value `nil`), `\"number\"`, `\"string\"`, `\"boolean\"`, `\"table\"`, `\"function\"`, `\"thread\"`, and `\"userdata\"`.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-type)\n\n\n```lua\ntype:\n | \"nil\"\n | \"number\"\n | \"string\"\n | \"boolean\"\n | \"table\"\n | \"function\"\n | \"thread\"\n | \"userdata\"\n```", + "returns": [ + { + "name": "type", + "type": "function.return", + "view": "\"boolean\"|\"function\"|\"nil\"|\"number\"|\"string\"...(+3)" + } + ], + "start": 3970000, + "type": "function", + "view": "function type(v: any)\n -> type: \"boolean\"|\"function\"|\"nil\"|\"number\"|\"string\"...(+3)" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 3970013, + "start": 3970009, + "type": "setglobal" + } + ], + "desc": "\nReturns the type of its only argument, coded as a string. The possible results of this function are `\"nil\"` (a string, not the value `nil`), `\"number\"`, `\"string\"`, `\"boolean\"`, `\"table\"`, `\"function\"`, `\"thread\"`, and `\"userdata\"`.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-type)\n\n\n```lua\ntype:\n | \"nil\"\n | \"number\"\n | \"string\"\n | \"boolean\"\n | \"table\"\n | \"function\"\n | \"thread\"\n | \"userdata\"\n```", + "name": "type", + "rawdesc": "\nReturns the type of its only argument, coded as a string. The possible results of this function are `\"nil\"` (a string, not the value `nil`), `\"number\"`, `\"string\"`, `\"boolean\"`, `\"table\"`, `\"function\"`, `\"thread\"`, and `\"userdata\"`.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-type)\n\n\n```lua\ntype:\n | \"nil\"\n | \"number\"\n | \"string\"\n | \"boolean\"\n | \"table\"\n | \"function\"\n | \"thread\"\n | \"userdata\"\n```", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 4460020, + "name": "list", + "start": 4460016, + "type": "local", + "view": "[]" + }, + { + "finish": 4460023, + "name": "i", + "start": 4460022, + "type": "local", + "view": "integer?" + }, + { + "finish": 4460026, + "name": "j", + "start": 4460025, + "type": "local", + "view": "integer?" + } + ], + "desc": "\nReturns the elements from the given `list`. This function is equivalent to\n```lua\n return list[i], list[i+1], ···, list[j]\n```\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-unpack)", + "finish": 4460031, + "rawdesc": "\nReturns the elements from the given `list`. This function is equivalent to\n```lua\n return list[i], list[i+1], ···, list[j]\n```\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-unpack)", + "returns": [ + { + "name": "...", + "type": "function.return", + "view": "" + } + ], + "start": 4460000, + "type": "function", + "view": "function unpack(list: [], i?: integer, j?: integer)\n -> ..." + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 4460015, + "start": 4460009, + "type": "setglobal" + }, + { + "extends": { + "args": [ + { + "finish": 4530020, + "name": "list", + "start": 4530016, + "type": "local", + "view": "{ [1]: , [2]: , [3]: , [4]: , [5]: , [6]: , [7]: , [8]: , [9]: }" + } + ], + "finish": 4530025, + "returns": [ + { + "type": "function.return", + "view": "" + }, + { + "type": "function.return", + "view": "" + }, + { + "type": "function.return", + "view": "" + }, + { + "type": "function.return", + "view": "" + }, + { + "type": "function.return", + "view": "" + }, + { + "type": "function.return", + "view": "" + }, + { + "type": "function.return", + "view": "" + }, + { + "type": "function.return", + "view": "" + }, + { + "type": "function.return", + "view": "" + } + ], + "start": 4530000, + "type": "function", + "view": "function unpack(list: { [1]: , [2]: , [3]: , [4]: , [5]: , [6]: , [7]: , [8]: , [9]: })\n -> \n 2. \n 3. \n 4. \n 5. \n 6. \n 7. \n 8. \n 9. " + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 4530015, + "start": 4530009, + "type": "setglobal" + } + ], + "desc": "\nReturns the elements from the given `list`. This function is equivalent to\n```lua\n return list[i], list[i+1], ···, list[j]\n```\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-unpack)", + "name": "unpack", + "rawdesc": "\nReturns the elements from the given `list`. This function is equivalent to\n```lua\n return list[i], list[i+1], ···, list[j]\n```\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-unpack)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "desc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8)\n", + "finish": 150009, + "rawdesc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8)\n", + "start": 150007, + "type": "table", + "view": "utf8lib" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/utf8.lua", + "finish": 150004, + "start": 150000, + "type": "setglobal" + } + ], + "desc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8)\n", + "name": "utf8", + "rawdesc": "\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8)\n", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 260023, + "name": "code", + "start": 260019, + "type": "local", + "view": "integer" + }, + { + "finish": 260028, + "start": 260025, + "type": "...", + "view": "integer" + } + ], + "desc": "\nReceives zero or more integers, converts each one to its corresponding UTF-8 byte sequence and returns a string with the concatenation of all these sequences.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8.char)", + "finish": 260033, + "rawdesc": "\nReceives zero or more integers, converts each one to its corresponding UTF-8 byte sequence and returns a string with the concatenation of all these sequences.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8.char)", + "returns": [ + { + "type": "function.return", + "view": "string" + } + ], + "start": 260000, + "type": "function", + "view": "function utf8.char(code: integer, ...integer)\n -> string" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/utf8.lua", + "finish": 260018, + "start": 260009, + "type": "setfield" + } + ], + "desc": "\nReceives zero or more integers, converts each one to its corresponding UTF-8 byte sequence and returns a string with the concatenation of all these sequences.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8.char)", + "name": "utf8.char", + "rawdesc": "\nReceives zero or more integers, converts each one to its corresponding UTF-8 byte sequence and returns a string with the concatenation of all these sequences.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8.char)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 570025, + "name": "s", + "start": 570024, + "type": "local", + "view": "string" + }, + { + "finish": 570028, + "name": "i", + "start": 570027, + "type": "local", + "view": "integer?" + }, + { + "finish": 570031, + "name": "j", + "start": 570030, + "type": "local", + "view": "integer?" + }, + { + "finish": 570036, + "name": "lax", + "start": 570033, + "type": "local", + "view": "boolean?" + } + ], + "desc": "\nReturns the codepoints (as integers) from all characters in `s` that start between byte position `i` and `j` (both included).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8.codepoint)", + "finish": 570041, + "rawdesc": "\nReturns the codepoints (as integers) from all characters in `s` that start between byte position `i` and `j` (both included).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8.codepoint)", + "returns": [ + { + "name": "code", + "type": "function.return", + "view": "integer" + }, + { + "name": "...", + "type": "function.return", + "view": "integer" + } + ], + "start": 570000, + "type": "function", + "view": "function utf8.codepoint(s: string, i?: integer, j?: integer, lax?: boolean)\n -> code: integer\n 2. ...integer" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/utf8.lua", + "finish": 570023, + "start": 570009, + "type": "setfield" + } + ], + "desc": "\nReturns the codepoints (as integers) from all characters in `s` that start between byte position `i` and `j` (both included).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8.codepoint)", + "name": "utf8.codepoint", + "rawdesc": "\nReturns the codepoints (as integers) from all characters in `s` that start between byte position `i` and `j` (both included).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8.codepoint)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 430021, + "name": "s", + "start": 430020, + "type": "local", + "view": "string" + }, + { + "finish": 430026, + "name": "lax", + "start": 430023, + "type": "local", + "view": "boolean?" + } + ], + "desc": "\nReturns values so that the construction\n```lua\nfor p, c in utf8.codes(s) do\n body\nend\n```\nwill iterate over all UTF-8 characters in string s, with p being the position (in bytes) and c the code point of each character. It raises an error if it meets any invalid byte sequence.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8.codes)", + "finish": 430031, + "rawdesc": "\nReturns values so that the construction\n```lua\nfor p, c in utf8.codes(s) do\n body\nend\n```\nwill iterate over all UTF-8 characters in string s, with p being the position (in bytes) and c the code point of each character. It raises an error if it meets any invalid byte sequence.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8.codes)", + "returns": [ + { + "type": "function.return", + "view": "fun(s: string, p: integer):integer, integer" + } + ], + "start": 430000, + "type": "function", + "view": "function utf8.codes(s: string, lax?: boolean)\n -> fun(s: string, p: integer):integer, integer" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/utf8.lua", + "finish": 430019, + "start": 430009, + "type": "setfield" + } + ], + "desc": "\nReturns values so that the construction\n```lua\nfor p, c in utf8.codes(s) do\n body\nend\n```\nwill iterate over all UTF-8 characters in string s, with p being the position (in bytes) and c the code point of each character. It raises an error if it meets any invalid byte sequence.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8.codes)", + "name": "utf8.codes", + "rawdesc": "\nReturns values so that the construction\n```lua\nfor p, c in utf8.codes(s) do\n body\nend\n```\nwill iterate over all UTF-8 characters in string s, with p being the position (in bytes) and c the code point of each character. It raises an error if it meets any invalid byte sequence.\n\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8.codes)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 710019, + "name": "s", + "start": 710018, + "type": "local", + "view": "string" + }, + { + "finish": 710022, + "name": "i", + "start": 710021, + "type": "local", + "view": "integer?" + }, + { + "finish": 710025, + "name": "j", + "start": 710024, + "type": "local", + "view": "integer?" + }, + { + "finish": 710030, + "name": "lax", + "start": 710027, + "type": "local", + "view": "boolean?" + } + ], + "desc": "\nReturns the number of UTF-8 characters in string `s` that start between positions `i` and `j` (both inclusive).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8.len)", + "finish": 710035, + "rawdesc": "\nReturns the number of UTF-8 characters in string `s` that start between positions `i` and `j` (both inclusive).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8.len)", + "returns": [ + { + "type": "function.return", + "view": "integer?" + }, + { + "name": "errpos", + "type": "function.return", + "view": "integer?" + } + ], + "start": 710000, + "type": "function", + "view": "function utf8.len(s: string, i?: integer, j?: integer, lax?: boolean)\n -> integer?\n 2. errpos: integer?" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/utf8.lua", + "finish": 710017, + "start": 710009, + "type": "setfield" + } + ], + "desc": "\nReturns the number of UTF-8 characters in string `s` that start between positions `i` and `j` (both inclusive).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8.len)", + "name": "utf8.len", + "rawdesc": "\nReturns the number of UTF-8 characters in string `s` that start between positions `i` and `j` (both inclusive).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8.len)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 830022, + "name": "s", + "start": 830021, + "type": "local", + "view": "string" + }, + { + "finish": 830025, + "name": "n", + "start": 830024, + "type": "local", + "view": "integer" + }, + { + "finish": 830028, + "name": "i", + "start": 830027, + "type": "local", + "view": "integer?" + } + ], + "desc": "\nReturns the position (in bytes) where the encoding of the `n`-th character of `s` (counting from position `i`) starts.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8.offset)", + "finish": 830033, + "rawdesc": "\nReturns the position (in bytes) where the encoding of the `n`-th character of `s` (counting from position `i`) starts.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8.offset)", + "returns": [ + { + "name": "p", + "type": "function.return", + "view": "integer" + } + ], + "start": 830000, + "type": "function", + "view": "function utf8.offset(s: string, n: integer, i?: integer)\n -> p: integer" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/utf8.lua", + "finish": 830020, + "start": 830009, + "type": "setfield" + } + ], + "desc": "\nReturns the position (in bytes) where the encoding of the `n`-th character of `s` (counting from position `i`) starts.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8.offset)", + "name": "utf8.offset", + "rawdesc": "\nReturns the position (in bytes) where the encoding of the `n`-th character of `s` (counting from position `i`) starts.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8.offset)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 4140021, + "name": "message", + "start": 4140014, + "type": "local", + "view": "string" + }, + { + "finish": 4140026, + "start": 4140023, + "type": "...", + "view": "any" + } + ], + "desc": "\nEmits a warning with a message composed by the concatenation of all its arguments (which should be strings).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-warn)", + "finish": 4140031, + "rawdesc": "\nEmits a warning with a message composed by the concatenation of all its arguments (which should be strings).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-warn)", + "start": 4140000, + "type": "function", + "view": "function warn(message: string, ...any)" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 4140013, + "start": 4140009, + "type": "setglobal" + } + ], + "desc": "\nEmits a warning with a message composed by the concatenation of all its arguments (which should be strings).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-warn)", + "name": "warn", + "rawdesc": "\nEmits a warning with a message composed by the concatenation of all its arguments (which should be strings).\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-warn)", + "type": "variable" + }, + { + "defines": [ + { + "extends": { + "args": [ + { + "finish": 4280017, + "name": "f", + "start": 4280016, + "type": "local", + "view": "fun(...any):...unknown" + }, + { + "finish": 4280023, + "name": "msgh", + "start": 4280019, + "type": "local", + "view": "function" + }, + { + "finish": 4280029, + "name": "arg1", + "start": 4280025, + "type": "local", + "view": "any" + }, + { + "finish": 4280034, + "start": 4280031, + "type": "...", + "view": "any" + } + ], + "desc": "\nCalls function `f` with the given arguments in protected mode with a new message handler.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-xpcall)", + "finish": 4280039, + "rawdesc": "\nCalls function `f` with the given arguments in protected mode with a new message handler.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-xpcall)", + "returns": [ + { + "name": "success", + "type": "function.return", + "view": "boolean" + }, + { + "name": "result", + "type": "function.return", + "view": "any" + }, + { + "name": "...", + "type": "function.return", + "view": "any" + } + ], + "start": 4280000, + "type": "function", + "view": "function xpcall(f: fun(...any):...unknown, msgh: function, arg1?: any, ...any)\n -> success: boolean\n 2. result: any\n 3. ...any" + }, + "file": "file:///home/lemarsu/.cache/lua-language-server/meta/Lua%205.4%20en-us%20utf8/basic.lua", + "finish": 4280015, + "start": 4280009, + "type": "setglobal" + } + ], + "desc": "\nCalls function `f` with the given arguments in protected mode with a new message handler.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-xpcall)", + "name": "xpcall", + "rawdesc": "\nCalls function `f` with the given arguments in protected mode with a new message handler.\n\n[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-xpcall)", + "type": "variable" + } +] \ No newline at end of file diff --git a/doc/doc.md b/doc/doc.md new file mode 100644 index 0000000..8eaba07 --- /dev/null +++ b/doc/doc.md @@ -0,0 +1,2881 @@ +# LuaLS + + +--- + +# _G + + +A global variable (not a function) that holds the global environment (see [§2.2](http://www.lua.org/manual/5.4/manual.html#2.2)). Lua itself does not use this variable; changing its value does not affect any environment, nor vice versa. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-_G) + + + +```lua +_G +``` + + +--- + +# _VERSION + + +A global variable (not a function) that holds a string containing the running Lua version. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-_VERSION) + + + +```lua +string +``` + + +--- + +# arg + + +Command-line arguments of Lua Standalone. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-arg) + + + +```lua +string[] +``` + + +--- + +# assert + + +Raises an error if the value of its argument v is false (i.e., `nil` or `false`); otherwise, returns all its arguments. In case of error, `message` is the error object; when absent, it defaults to `"assertion failed!"` + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-assert) + + +```lua +function assert(v?: , message?: any, ...any) + -> + 2. ...any +``` + + +--- + +# collectgarbage + + +This function is a generic interface to the garbage collector. It performs different functions according to its first argument, `opt`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-collectgarbage) + + +```lua +opt: + -> "collect" -- Performs a full garbage-collection cycle. + | "stop" -- Stops automatic execution. + | "restart" -- Restarts automatic execution. + | "count" -- Returns the total memory in Kbytes. + | "step" -- Performs a garbage-collection step. + | "isrunning" -- Returns whether the collector is running. + | "incremental" -- Change the collector mode to incremental. + | "generational" -- Change the collector mode to generational. +``` + + +```lua +function collectgarbage(opt?: "collect"|"count"|"generational"|"incremental"|"isrunning"...(+3), ...any) + -> any +``` + + +--- + +# coroutine + + + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine) + + + +```lua +coroutinelib +``` + + +--- + +# coroutine.close + + +Closes coroutine `co` , closing all its pending to-be-closed variables and putting the coroutine in a dead state. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.close) + + +```lua +function coroutine.close(co: thread) + -> noerror: boolean + 2. errorobject: any +``` + + +--- + +# coroutine.create + + +Creates a new coroutine, with body `f`. `f` must be a function. Returns this new coroutine, an object with type `"thread"`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.create) + + +```lua +function coroutine.create(f: fun(...any):...unknown) + -> thread +``` + + +--- + +# coroutine.isyieldable + + +Returns true when the coroutine `co` can yield. The default for `co` is the running coroutine. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.isyieldable) + + +```lua +function coroutine.isyieldable(co?: thread) + -> boolean +``` + + +--- + +# coroutine.resume + + +Starts or continues the execution of coroutine `co`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.resume) + + +```lua +function coroutine.resume(co: thread, val1?: any, ...any) + -> success: boolean + 2. ...any +``` + + +--- + +# coroutine.running + + +Returns the running coroutine plus a boolean, true when the running coroutine is the main one. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.running) + + +```lua +function coroutine.running() + -> running: thread + 2. ismain: boolean +``` + + +--- + +# coroutine.status + + +Returns the status of coroutine `co`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.status) + + +```lua +return #1: + | "running" -- Is running. + | "suspended" -- Is suspended or not started. + | "normal" -- Is active but not running. + | "dead" -- Has finished or stopped with an error. +``` + + +```lua +function coroutine.status(co: thread) + -> "dead"|"normal"|"running"|"suspended" +``` + + +--- + +# coroutine.wrap + + +Creates a new coroutine, with body `f`; `f` must be a function. Returns a function that resumes the coroutine each time it is called. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.wrap) + + +```lua +function coroutine.wrap(f: fun(...any):...unknown) + -> fun(...any):...unknown +``` + + +--- + +# coroutine.yield + + +Suspends the execution of the calling coroutine. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-coroutine.yield) + + +```lua +(async) function coroutine.yield(...any) + -> ...any +``` + + +--- + +# debug + + + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug) + + + +```lua +debuglib +``` + + +--- + +# debug.debug + + +Enters an interactive mode with the user, running each string that the user enters. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.debug) + + +```lua +function debug.debug() +``` + + +--- + +# debug.getfenv + + +Returns the environment of object `o` . + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getfenv) + + +```lua +function debug.getfenv(o: any) + -> table +``` + + +--- + +# debug.gethook + + +Returns the current hook settings of the thread. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.gethook) + + +```lua +function debug.gethook(co?: thread) + -> hook: function + 2. mask: string + 3. count: integer +``` + + +--- + +# debug.getinfo + + +Returns a table with information about a function. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getinfo) + + +--- + +```lua +what: + +> "n" -- `name` and `namewhat` + +> "S" -- `source`, `short_src`, `linedefined`, `lastlinedefined`, and `what` + +> "l" -- `currentline` + +> "t" -- `istailcall` + +> "u" -- `nups`, `nparams`, and `isvararg` + +> "f" -- `func` + +> "r" -- `ftransfer` and `ntransfer` + +> "L" -- `activelines` +``` + + +```lua +function debug.getinfo(thread: thread, f: integer|fun(...any):...unknown, what?: string|"L"|"S"|"f"|"l"...(+4)) + -> debuginfo +``` + + +--- + +# debug.getlocal + + +Returns the name and the value of the local variable with index `local` of the function at level `f` of the stack. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getlocal) + + +```lua +function debug.getlocal(thread: thread, f: integer|fun(...any):...unknown, index: integer) + -> name: string + 2. value: any +``` + + +--- + +# debug.getmetatable + + +Returns the metatable of the given value. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getmetatable) + + +```lua +function debug.getmetatable(object: any) + -> metatable: table +``` + + +--- + +# debug.getregistry + + +Returns the registry table. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getregistry) + + +```lua +function debug.getregistry() + -> table +``` + + +--- + +# debug.getupvalue + + +Returns the name and the value of the upvalue with index `up` of the function. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getupvalue) + + +```lua +function debug.getupvalue(f: fun(...any):...unknown, up: integer) + -> name: string + 2. value: any +``` + + +--- + +# debug.getuservalue + + +Returns the `n`-th user value associated +to the userdata `u` plus a boolean, +`false` if the userdata does not have that value. + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.getuservalue) + + +```lua +function debug.getuservalue(u: userdata, n?: integer) + -> any + 2. boolean +``` + + +--- + +# debug.setcstacklimit + + +### **Deprecated in `Lua 5.4.2`** + +Sets a new limit for the C stack. This limit controls how deeply nested calls can go in Lua, with the intent of avoiding a stack overflow. + +In case of success, this function returns the old limit. In case of error, it returns `false`. + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setcstacklimit) + + +```lua +function debug.setcstacklimit(limit: integer) + -> boolean|integer +``` + + +--- + +# debug.setfenv + + +Sets the environment of the given `object` to the given `table` . + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setfenv) + + +```lua +function debug.setfenv(object: , env: table) + -> object: +``` + + +--- + +# debug.sethook + + +Sets the given function as a hook. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.sethook) + + +--- + +```lua +mask: + +> "c" -- Calls hook when Lua calls a function. + +> "r" -- Calls hook when Lua returns from a function. + +> "l" -- Calls hook when Lua enters a new line of code. +``` + + +```lua +function debug.sethook(thread: thread, hook: fun(...any):...unknown, mask: string|"c"|"l"|"r", count?: integer) +``` + + +--- + +# debug.setlocal + + +Assigns the `value` to the local variable with index `local` of the function at `level` of the stack. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setlocal) + + +```lua +function debug.setlocal(thread: thread, level: integer, index: integer, value: any) + -> name: string +``` + + +--- + +# debug.setmetatable + + +Sets the metatable for the given value to the given table (which can be `nil`). + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setmetatable) + + +```lua +function debug.setmetatable(value: , meta?: table) + -> value: +``` + + +--- + +# debug.setupvalue + + +Assigns the `value` to the upvalue with index `up` of the function. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setupvalue) + + +```lua +function debug.setupvalue(f: fun(...any):...unknown, up: integer, value: any) + -> name: string +``` + + +--- + +# debug.setuservalue + + +Sets the given `value` as +the `n`-th user value associated to the given `udata`. +`udata` must be a full userdata. + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.setuservalue) + + +```lua +function debug.setuservalue(udata: userdata, value: any, n?: integer) + -> udata: userdata +``` + + +--- + +# debug.traceback + + +Returns a string with a traceback of the call stack. The optional message string is appended at the beginning of the traceback. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.traceback) + + +```lua +function debug.traceback(thread: thread, message?: any, level?: integer) + -> message: string +``` + + +--- + +# debug.upvalueid + + +Returns a unique identifier (as a light userdata) for the upvalue numbered `n` from the given function. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.upvalueid) + + +```lua +function debug.upvalueid(f: fun(...any):...unknown, n: integer) + -> id: lightuserdata +``` + + +--- + +# debug.upvaluejoin + + +Make the `n1`-th upvalue of the Lua closure `f1` refer to the `n2`-th upvalue of the Lua closure `f2`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-debug.upvaluejoin) + + +```lua +function debug.upvaluejoin(f1: fun(...any):...unknown, n1: integer, f2: fun(...any):...unknown, n2: integer) +``` + + +--- + +# dofile + + +Opens the named file and executes its content as a Lua chunk. When called without arguments, `dofile` executes the content of the standard input (`stdin`). Returns all values returned by the chunk. In case of errors, `dofile` propagates the error to its caller. (That is, `dofile` does not run in protected mode.) + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-dofile) + + +```lua +function dofile(filename?: string) + -> ...any +``` + + +--- + +# error + + +Terminates the last protected function called and returns message as the error object. + +Usually, `error` adds some information about the error position at the beginning of the message, if the message is a string. + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-error) + + +```lua +function error(message: any, level?: integer) +``` + + +--- + +# getfenv + + +Returns the current environment in use by the function. `f` can be a Lua function or a number that specifies the function at that stack level. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-getfenv) + + +```lua +function getfenv(f?: integer|fun(...any):...unknown) + -> table +``` + + +--- + +# getmetatable + + +If object does not have a metatable, returns nil. Otherwise, if the object's metatable has a __metatable field, returns the associated value. Otherwise, returns the metatable of the given object. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-getmetatable) + + +```lua +function getmetatable(object: any) + -> metatable: table +``` + + +--- + +# io + + + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io) + + + +```lua +iolib +``` + + +--- + +# io.close + + +Close `file` or default output file. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.close) + + +```lua +exitcode: + | "exit" + | "signal" +``` + + +```lua +function io.close(file?: file*) + -> suc: boolean? + 2. exitcode: ("exit"|"signal")? + 3. code: integer? +``` + + +--- + +# io.flush + + +Saves any written data to default output file. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.flush) + + +```lua +function io.flush() +``` + + +--- + +# io.input + + +Sets `file` as the default input file. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.input) + + +```lua +function io.input(file: string|file*) +``` + + +--- + +# io.lines + + +------ +```lua +for c in io.lines(filename, ...) do + body +end +``` + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.lines) + + +```lua +...(param): + | "n" -- Reads a numeral and returns it as number. + | "a" -- Reads the whole file. + -> "l" -- Reads the next line skipping the end of line. + | "L" -- Reads the next line keeping the end of line. +``` + + +```lua +function io.lines(filename?: string, ...string|integer|"L"|"a"|"l"...(+1)) + -> fun():any, ...unknown +``` + + +--- + +# io.open + + +Opens a file, in the mode specified in the string `mode`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.open) + + +```lua +mode: + -> "r" -- Read mode. + | "w" -- Write mode. + | "a" -- Append mode. + | "r+" -- Update mode, all previous data is preserved. + | "w+" -- Update mode, all previous data is erased. + | "a+" -- Append update mode, previous data is preserved, writing is only allowed at the end of file. + | "rb" -- Read mode. (in binary mode.) + | "wb" -- Write mode. (in binary mode.) + | "ab" -- Append mode. (in binary mode.) + | "r+b" -- Update mode, all previous data is preserved. (in binary mode.) + | "w+b" -- Update mode, all previous data is erased. (in binary mode.) + | "a+b" -- Append update mode, previous data is preserved, writing is only allowed at the end of file. (in binary mode.) +``` + + +```lua +function io.open(filename: string, mode?: "a"|"a+"|"a+b"|"ab"|"r"...(+7)) + -> file*? + 2. errmsg: string? +``` + + +--- + +# io.output + + +Sets `file` as the default output file. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.output) + + +```lua +function io.output(file: string|file*) +``` + + +--- + +# io.popen + + +Starts program prog in a separated process. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.popen) + + +```lua +mode: + | "r" -- Read data from this program by `file`. + | "w" -- Write data to this program by `file`. +``` + + +```lua +function io.popen(prog: string, mode?: "r"|"w") + -> file*? + 2. errmsg: string? +``` + + +--- + +# io.read + + +Reads the `file`, according to the given formats, which specify what to read. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.read) + + +```lua +...(param): + | "n" -- Reads a numeral and returns it as number. + | "a" -- Reads the whole file. + -> "l" -- Reads the next line skipping the end of line. + | "L" -- Reads the next line keeping the end of line. +``` + + +```lua +function io.read(...string|integer|"L"|"a"|"l"...(+1)) + -> any + 2. ...any +``` + + +--- + +# io.tmpfile + + +In case of success, returns a handle for a temporary file. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.tmpfile) + + +```lua +function io.tmpfile() + -> file* +``` + + +--- + +# io.type + + +Checks whether `obj` is a valid file handle. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.type) + + +```lua +return #1: + | "file" -- Is an open file handle. + | "closed file" -- Is a closed file handle. + | `nil` -- Is not a file handle. +``` + + +```lua +function io.type(file: file*) + -> "closed file"|"file"|`nil` +``` + + +--- + +# io.write + + +Writes the value of each of its arguments to default output file. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-io.write) + + +```lua +function io.write(...any) + -> file* + 2. errmsg: string? +``` + + +--- + +# ipairs + + +Returns three values (an iterator function, the table `t`, and `0`) so that the construction +```lua + for i,v in ipairs(t) do body end +``` +will iterate over the key–value pairs `(1,t[1]), (2,t[2]), ...`, up to the first absent index. + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-ipairs) + + +```lua +function ipairs(t: ) + -> fun(table: [], i?: integer):integer, + 2. + 3. i: integer +``` + + +--- + +# load + + +Loads a chunk. + +If `chunk` is a string, the chunk is this string. If `chunk` is a function, `load` calls it repeatedly to get the chunk pieces. Each call to `chunk` must return a string that concatenates with previous results. A return of an empty string, `nil`, or no value signals the end of the chunk. + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-load) + + +```lua +mode: + | "b" -- Only binary chunks. + | "t" -- Only text chunks. + -> "bt" -- Both binary and text. +``` + + +```lua +function load(chunk: string|function, chunkname?: string, mode?: "b"|"bt"|"t", env?: table) + -> function? + 2. error_message: string? +``` + + +--- + +# loadfile + + +Loads a chunk from file `filename` or from the standard input, if no file name is given. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-loadfile) + + +```lua +mode: + | "b" -- Only binary chunks. + | "t" -- Only text chunks. + -> "bt" -- Both binary and text. +``` + + +```lua +function loadfile(filename?: string, mode?: "b"|"bt"|"t", env?: table) + -> function? + 2. error_message: string? +``` + + +--- + +# loadstring + + +Loads a chunk from the given string. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-loadstring) + + +```lua +function loadstring(text: string, chunkname?: string) + -> function? + 2. error_message: string? +``` + + +--- + +# math + + + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math) + + + +```lua +mathlib +``` + + +--- + +# math.abs + + +Returns the absolute value of `x`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.abs) + + +```lua +function math.abs(x: ) + -> +``` + + +--- + +# math.acos + + +Returns the arc cosine of `x` (in radians). + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.acos) + + +```lua +function math.acos(x: number) + -> number +``` + + +--- + +# math.asin + + +Returns the arc sine of `x` (in radians). + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.asin) + + +```lua +function math.asin(x: number) + -> number +``` + + +--- + +# math.atan + + +Returns the arc tangent of `y/x` (in radians). + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.atan) + + +```lua +function math.atan(y: number, x?: number) + -> number +``` + + +--- + +# math.atan2 + + +Returns the arc tangent of `y/x` (in radians). + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.atan2) + + +```lua +function math.atan2(y: number, x: number) + -> number +``` + + +--- + +# math.ceil + + +Returns the smallest integral value larger than or equal to `x`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.ceil) + + +```lua +function math.ceil(x: number) + -> integer +``` + + +--- + +# math.cos + + +Returns the cosine of `x` (assumed to be in radians). + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.cos) + + +```lua +function math.cos(x: number) + -> number +``` + + +--- + +# math.cosh + + +Returns the hyperbolic cosine of `x` (assumed to be in radians). + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.cosh) + + +```lua +function math.cosh(x: number) + -> number +``` + + +--- + +# math.deg + + +Converts the angle `x` from radians to degrees. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.deg) + + +```lua +function math.deg(x: number) + -> number +``` + + +--- + +# math.exp + + +Returns the value `e^x` (where `e` is the base of natural logarithms). + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.exp) + + +```lua +function math.exp(x: number) + -> number +``` + + +--- + +# math.floor + + +Returns the largest integral value smaller than or equal to `x`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.floor) + + +```lua +function math.floor(x: number) + -> integer +``` + + +--- + +# math.fmod + + +Returns the remainder of the division of `x` by `y` that rounds the quotient towards zero. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.fmod) + + +```lua +function math.fmod(x: number, y: number) + -> number +``` + + +--- + +# math.frexp + + +Decompose `x` into tails and exponents. Returns `m` and `e` such that `x = m * (2 ^ e)`, `e` is an integer and the absolute value of `m` is in the range [0.5, 1) (or zero when `x` is zero). + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.frexp) + + +```lua +function math.frexp(x: number) + -> m: number + 2. e: number +``` + + +--- + +# math.ldexp + + +Returns `m * (2 ^ e)` . + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.ldexp) + + +```lua +function math.ldexp(m: number, e: number) + -> number +``` + + +--- + +# math.log + + +Returns the logarithm of `x` in the given base. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.log) + + +```lua +function math.log(x: number, base?: integer) + -> number +``` + + +--- + +# math.log10 + + +Returns the base-10 logarithm of x. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.log10) + + +```lua +function math.log10(x: number) + -> number +``` + + +--- + +# math.max + + +Returns the argument with the maximum value, according to the Lua operator `<`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.max) + + +```lua +function math.max(x: , ...) + -> +``` + + +--- + +# math.min + + +Returns the argument with the minimum value, according to the Lua operator `<`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.min) + + +```lua +function math.min(x: , ...) + -> +``` + + +--- + +# math.modf + + +Returns the integral part of `x` and the fractional part of `x`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.modf) + + +```lua +function math.modf(x: number) + -> integer + 2. number +``` + + +--- + +# math.pow + + +Returns `x ^ y` . + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.pow) + + +```lua +function math.pow(x: number, y: number) + -> number +``` + + +--- + +# math.rad + + +Converts the angle `x` from degrees to radians. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.rad) + + +```lua +function math.rad(x: number) + -> number +``` + + +--- + +# math.random + + +* `math.random()`: Returns a float in the range [0,1). +* `math.random(n)`: Returns a integer in the range [1, n]. +* `math.random(m, n)`: Returns a integer in the range [m, n]. + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.random) + + +```lua +function math.random(m: integer, n: integer) + -> integer +``` + + +--- + +# math.randomseed + + +* `math.randomseed(x, y)`: Concatenate `x` and `y` into a 128-bit `seed` to reinitialize the pseudo-random generator. +* `math.randomseed(x)`: Equate to `math.randomseed(x, 0)` . +* `math.randomseed()`: Generates a seed with a weak attempt for randomness. + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.randomseed) + + +```lua +function math.randomseed(x?: integer, y?: integer) +``` + + +--- + +# math.sin + + +Returns the sine of `x` (assumed to be in radians). + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.sin) + + +```lua +function math.sin(x: number) + -> number +``` + + +--- + +# math.sinh + + +Returns the hyperbolic sine of `x` (assumed to be in radians). + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.sinh) + + +```lua +function math.sinh(x: number) + -> number +``` + + +--- + +# math.sqrt + + +Returns the square root of `x`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.sqrt) + + +```lua +function math.sqrt(x: number) + -> number +``` + + +--- + +# math.tan + + +Returns the tangent of `x` (assumed to be in radians). + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.tan) + + +```lua +function math.tan(x: number) + -> number +``` + + +--- + +# math.tanh + + +Returns the hyperbolic tangent of `x` (assumed to be in radians). + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.tanh) + + +```lua +function math.tanh(x: number) + -> number +``` + + +--- + +# math.tointeger + + +Miss locale + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.tointeger) + + +```lua +function math.tointeger(x: any) + -> integer? +``` + + +--- + +# math.type + + +Miss locale + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.type) + + +```lua +return #1: + | "integer" + | "float" + | 'nil' +``` + + +```lua +function math.type(x: any) + -> "float"|"integer"|'nil' +``` + + +--- + +# math.ult + + +Miss locale + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-math.ult) + + +```lua +function math.ult(m: integer, n: integer) + -> boolean +``` + + +--- + +# module + + +Creates a module. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-module) + + +```lua +function module(name: string, ...any) +``` + + +--- + +# newproxy + + +```lua +function newproxy(proxy: boolean|table|userdata) + -> userdata +``` + + +--- + +# next + + +Allows a program to traverse all fields of a table. Its first argument is a table and its second argument is an index in this table. A call to `next` returns the next index of the table and its associated value. When called with `nil` as its second argument, `next` returns an initial index and its associated value. When called with the last index, or with `nil` in an empty table, `next` returns `nil`. If the second argument is absent, then it is interpreted as `nil`. In particular, you can use `next(t)` to check whether a table is empty. + +The order in which the indices are enumerated is not specified, *even for numeric indices*. (To traverse a table in numerical order, use a numerical `for`.) + +The behavior of `next` is undefined if, during the traversal, you assign any value to a non-existent field in the table. You may however modify existing fields. In particular, you may set existing fields to nil. + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-next) + + +```lua +function next(table: table<, >, index?: ) + -> ? + 2. ? +``` + + +--- + +# os + + + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os) + + + +```lua +oslib +``` + + +--- + +# os.clock + + +Returns an approximation of the amount in seconds of CPU time used by the program. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.clock) + + +```lua +function os.clock() + -> number +``` + + +--- + +# os.date + + +Returns a string or a table containing date and time, formatted according to the given string `format`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.date) + + +```lua +function os.date(format?: string, time?: integer) + -> string|osdate +``` + + +--- + +# os.difftime + + +Returns the difference, in seconds, from time `t1` to time `t2`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.difftime) + + +```lua +function os.difftime(t2: integer, t1: integer) + -> integer +``` + + +--- + +# os.execute + + +Passes `command` to be executed by an operating system shell. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.execute) + + +```lua +exitcode: + | "exit" + | "signal" +``` + + +```lua +function os.execute(command?: string) + -> suc: boolean? + 2. exitcode: ("exit"|"signal")? + 3. code: integer? +``` + + +--- + +# os.exit + + +Calls the ISO C function `exit` to terminate the host program. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.exit) + + +```lua +function os.exit(code?: boolean|integer, close?: boolean) +``` + + +--- + +# os.getenv + + +Returns the value of the process environment variable `varname`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.getenv) + + +```lua +function os.getenv(varname: string) + -> string? +``` + + +--- + +# os.remove + + +Deletes the file with the given name. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.remove) + + +```lua +function os.remove(filename: string) + -> suc: boolean + 2. errmsg: string? +``` + + +--- + +# os.rename + + +Renames the file or directory named `oldname` to `newname`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.rename) + + +```lua +function os.rename(oldname: string, newname: string) + -> suc: boolean + 2. errmsg: string? +``` + + +--- + +# os.setlocale + + +Sets the current locale of the program. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.setlocale) + + +```lua +category: + -> "all" + | "collate" + | "ctype" + | "monetary" + | "numeric" + | "time" +``` + + +```lua +function os.setlocale(locale: string|nil, category?: "all"|"collate"|"ctype"|"monetary"|"numeric"...(+1)) + -> localecategory: string +``` + + +--- + +# os.time + + +Returns the current time when called without arguments, or a time representing the local date and time specified by the given table. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.time) + + +```lua +function os.time(date?: osdateparam) + -> integer +``` + + +--- + +# os.tmpname + + +Returns a string with a file name that can be used for a temporary file. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-os.tmpname) + + +```lua +function os.tmpname() + -> string +``` + + +--- + +# package + + + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package) + + + +```lua +packagelib +``` + + +--- + +# package.config + + +A string describing some compile-time configurations for packages. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.config) + + + +```lua +string +``` + + +--- + +# package.loaders + + +A table used by `require` to control how to load modules. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.loaders) + + + +```lua +table +``` + + +--- + +# package.loadlib + + +Dynamically links the host program with the C library `libname`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.loadlib) + + +```lua +function package.loadlib(libname: string, funcname: string) + -> any +``` + + +--- + +# package.searchers + + +A table used by `require` to control how to load modules. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.searchers) + + + +```lua +table +``` + + +--- + +# package.searchpath + + +Searches for the given `name` in the given `path`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.searchpath) + + +```lua +function package.searchpath(name: string, path: string, sep?: string, rep?: string) + -> filename: string? + 2. errmsg: string? +``` + + +--- + +# package.seeall + + +Sets a metatable for `module` with its `__index` field referring to the global environment, so that this module inherits values from the global environment. To be used as an option to function `module` . + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-package.seeall) + + +```lua +function package.seeall(module: table) +``` + + +--- + +# pairs + + +If `t` has a metamethod `__pairs`, calls it with t as argument and returns the first three results from the call. + +Otherwise, returns three values: the [next](http://www.lua.org/manual/5.4/manual.html#pdf-next) function, the table `t`, and `nil`, so that the construction +```lua + for k,v in pairs(t) do body end +``` +will iterate over all key–value pairs of table `t`. + +See function [next](http://www.lua.org/manual/5.4/manual.html#pdf-next) for the caveats of modifying the table during its traversal. + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-pairs) + + +```lua +function pairs(t: ) + -> fun(table: table<, >, index?: ):, + 2. +``` + + +--- + +# pcall + + +Calls the function `f` with the given arguments in *protected mode*. This means that any error inside `f` is not propagated; instead, `pcall` catches the error and returns a status code. Its first result is the status code (a boolean), which is true if the call succeeds without errors. In such case, `pcall` also returns all results from the call, after this first result. In case of any error, `pcall` returns `false` plus the error object. + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-pcall) + + +```lua +function pcall(f: fun(...any):...unknown, arg1?: any, ...any) + -> success: boolean + 2. result: any + 3. ...any +``` + + +--- + +# print + + +Receives any number of arguments and prints their values to `stdout`, converting each argument to a string following the same rules of [tostring](http://www.lua.org/manual/5.4/manual.html#pdf-tostring). +The function print is not intended for formatted output, but only as a quick way to show a value, for instance for debugging. For complete control over the output, use [string.format](http://www.lua.org/manual/5.4/manual.html#pdf-string.format) and [io.write](http://www.lua.org/manual/5.4/manual.html#pdf-io.write). + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-print) + + +```lua +function print(...any) +``` + + +--- + +# rawequal + + +Checks whether v1 is equal to v2, without invoking the `__eq` metamethod. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-rawequal) + + +```lua +function rawequal(v1: any, v2: any) + -> boolean +``` + + +--- + +# rawget + + +Gets the real value of `table[index]`, without invoking the `__index` metamethod. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-rawget) + + +```lua +function rawget(table: table, index: any) + -> any +``` + + +--- + +# rawlen + + +Returns the length of the object `v`, without invoking the `__len` metamethod. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-rawlen) + + +```lua +function rawlen(v: string|table) + -> len: integer +``` + + +--- + +# rawset + + +Sets the real value of `table[index]` to `value`, without using the `__newindex` metavalue. `table` must be a table, `index` any value different from `nil` and `NaN`, and `value` any Lua value. +This function returns `table`. + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-rawset) + + +```lua +function rawset(table: table, index: any, value: any) + -> table +``` + + +--- + +# require + + +Loads the given module, returns any value returned by the searcher(`true` when `nil`). Besides that value, also returns as a second result the loader data returned by the searcher, which indicates how `require` found the module. (For instance, if the module came from a file, this loader data is the file path.) + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-require) + + +```lua +function require(modname: string) + -> unknown + 2. loaderdata: unknown +``` + + +--- + +# select + + +If `index` is a number, returns all arguments after argument number `index`; a negative number indexes from the end (`-1` is the last argument). Otherwise, `index` must be the string `"#"`, and `select` returns the total number of extra arguments it received. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-select) + + +```lua +index: + | "#" +``` + + +```lua +function select(index: integer|"#", ...any) + -> any +``` + + +--- + +# setfenv + + +Sets the environment to be used by the given function. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-setfenv) + + +```lua +function setfenv(f: fun(...any):...integer|unknown, table: table) + -> function +``` + + +--- + +# setmetatable + + +Sets the metatable for the given table. If `metatable` is `nil`, removes the metatable of the given table. If the original metatable has a `__metatable` field, raises an error. + +This function returns `table`. + +To change the metatable of other types from Lua code, you must use the debug library ([§6.10](http://www.lua.org/manual/5.4/manual.html#6.10)). + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-setmetatable) + + +```lua +function setmetatable(table: table, metatable?: table|metatable) + -> table +``` + + +--- + +# string + + + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string) + + + +```lua +stringlib +``` + + +--- + +# string.byte + + +Returns the internal numeric codes of the characters `s[i], s[i+1], ..., s[j]`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.byte) + + +```lua +function string.byte(s: string|number, i?: integer, j?: integer) + -> ...integer +``` + + +--- + +# string.char + + +Returns a string with length equal to the number of arguments, in which each character has the internal numeric code equal to its corresponding argument. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.char) + + +```lua +function string.char(byte: integer, ...integer) + -> string +``` + + +--- + +# string.dump + + +Returns a string containing a binary representation (a *binary chunk*) of the given function. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.dump) + + +```lua +function string.dump(f: fun(...any):...unknown, strip?: boolean) + -> string +``` + + +--- + +# string.find + + +Looks for the first match of `pattern` (see [§6.4.1](http://www.lua.org/manual/5.4/manual.html#6.4.1)) in the string. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.find) + +@*return* `start` + +@*return* `end` + +@*return* `...` — captured + + +```lua +function string.find(s: string|number, pattern: string|number, init?: integer, plain?: boolean) + -> start: integer|nil + 2. end: integer|nil + 3. ...any +``` + + +--- + +# string.format + + +Returns a formatted version of its variable number of arguments following the description given in its first argument. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.format) + + +```lua +function string.format(s: string|number, ...any) + -> string +``` + + +--- + +# string.gmatch + + +Returns an iterator function that, each time it is called, returns the next captures from `pattern` (see [§6.4.1](http://www.lua.org/manual/5.4/manual.html#6.4.1)) over the string s. + +As an example, the following loop will iterate over all the words from string s, printing one per line: +```lua + s = +"hello world from Lua" + for w in string.gmatch(s, "%a+") do + print(w) + end +``` + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.gmatch) + + +```lua +function string.gmatch(s: string|number, pattern: string|number, init?: integer) + -> fun():string, ...unknown +``` + + +--- + +# string.gsub + + +Returns a copy of s in which all (or the first `n`, if given) occurrences of the `pattern` (see [§6.4.1](http://www.lua.org/manual/5.4/manual.html#6.4.1)) have been replaced by a replacement string specified by `repl`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.gsub) + + +```lua +function string.gsub(s: string|number, pattern: string|number, repl: string|number|function|table, n?: integer) + -> string + 2. count: integer +``` + + +--- + +# string.len + + +Returns its length. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.len) + + +```lua +function string.len(s: string|number) + -> integer +``` + + +--- + +# string.lower + + +Returns a copy of this string with all uppercase letters changed to lowercase. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.lower) + + +```lua +function string.lower(s: string|number) + -> string +``` + + +--- + +# string.match + + +Looks for the first match of `pattern` (see [§6.4.1](http://www.lua.org/manual/5.4/manual.html#6.4.1)) in the string. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.match) + + +```lua +function string.match(s: string|number, pattern: string|number, init?: integer) + -> ...any +``` + + +--- + +# string.pack + + +Returns a binary string containing the values `v1`, `v2`, etc. packed (that is, serialized in binary form) according to the format string `fmt` (see [§6.4.2](http://www.lua.org/manual/5.4/manual.html#6.4.2)) . + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.pack) + + +```lua +function string.pack(fmt: string, v1: string|number, v2?: string|number, ...string|number) + -> binary: string +``` + + +--- + +# string.packsize + + +Returns the size of a string resulting from `string.pack` with the given format string `fmt` (see [§6.4.2](http://www.lua.org/manual/5.4/manual.html#6.4.2)) . + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.packsize) + + +```lua +function string.packsize(fmt: string) + -> integer +``` + + +--- + +# string.rep + + +Returns a string that is the concatenation of `n` copies of the string `s` separated by the string `sep`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.rep) + + +```lua +function string.rep(s: string|number, n: integer, sep?: string|number) + -> string +``` + + +--- + +# string.reverse + + +Returns a string that is the string `s` reversed. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.reverse) + + +```lua +function string.reverse(s: string|number) + -> string +``` + + +--- + +# string.sub + + +Returns the substring of the string that starts at `i` and continues until `j`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.sub) + + +```lua +function string.sub(s: string|number, i: integer, j?: integer) + -> string +``` + + +--- + +# string.unpack + + +Returns the values packed in string according to the format string `fmt` (see [§6.4.2](http://www.lua.org/manual/5.4/manual.html#6.4.2)) . + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.unpack) + + +```lua +function string.unpack(fmt: string, s: string, pos?: integer) + -> ...any + 2. offset: integer +``` + + +--- + +# string.upper + + +Returns a copy of this string with all lowercase letters changed to uppercase. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-string.upper) + + +```lua +function string.upper(s: string|number) + -> string +``` + + +--- + +# table + + + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table) + + + +```lua +tablelib +``` + + +--- + +# table.concat + + +Given a list where all elements are strings or numbers, returns the string `list[i]..sep..list[i+1] ··· sep..list[j]`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.concat) + + +```lua +function table.concat(list: table, sep?: string, i?: integer, j?: integer) + -> string +``` + + +--- + +# table.foreach + + +Executes the given f over all elements of table. For each element, f is called with the index and respective value as arguments. If f returns a non-nil value, then the loop is broken, and this value is returned as the final value of foreach. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.foreach) + + +```lua +function table.foreach(list: any, callback: fun(key: string, value: any):|nil) + -> |nil +``` + + +--- + +# table.foreachi + + +Executes the given f over the numerical indices of table. For each index, f is called with the index and respective value as arguments. Indices are visited in sequential order, from 1 to n, where n is the size of the table. If f returns a non-nil value, then the loop is broken and this value is returned as the result of foreachi. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.foreachi) + + +```lua +function table.foreachi(list: any, callback: fun(key: string, value: any):|nil) + -> |nil +``` + + +--- + +# table.getn + + +Returns the number of elements in the table. This function is equivalent to `#list`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.getn) + + +```lua +function table.getn(list: []) + -> integer +``` + + +--- + +# table.insert + + +Inserts element `value` at position `pos` in `list`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.insert) + + +```lua +function table.insert(list: table, pos: integer, value: any) +``` + + +--- + +# table.maxn + + +Returns the largest positive numerical index of the given table, or zero if the table has no positive numerical indices. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.maxn) + + +```lua +function table.maxn(table: table) + -> integer +``` + + +--- + +# table.move + + +Moves elements from table `a1` to table `a2`. +```lua +a2[t],··· = +a1[f],···,a1[e] +return a2 +``` + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.move) + + +```lua +function table.move(a1: table, f: integer, e: integer, t: integer, a2?: table) + -> a2: table +``` + + +--- + +# table.pack + + +Returns a new table with all arguments stored into keys `1`, `2`, etc. and with a field `"n"` with the total number of arguments. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.pack) + + +```lua +function table.pack(...any) + -> table +``` + + +--- + +# table.remove + + +Removes from `list` the element at position `pos`, returning the value of the removed element. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.remove) + + +```lua +function table.remove(list: table, pos?: integer) + -> any +``` + + +--- + +# table.sort + + +Sorts list elements in a given order, *in-place*, from `list[1]` to `list[#list]`. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.sort) + + +```lua +function table.sort(list: [], comp?: fun(a: , b: ):boolean) +``` + + +--- + +# table.unpack + + +Returns the elements from the given list. This function is equivalent to +```lua + return list[i], list[i+1], ···, list[j] +``` +By default, `i` is `1` and `j` is `#list`. + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.unpack) + + +```lua +function table.unpack(list: [], i?: integer, j?: integer) + -> ... +``` + + +--- + +# tonumber + + +When called with no `base`, `tonumber` tries to convert its argument to a number. If the argument is already a number or a string convertible to a number, then `tonumber` returns this number; otherwise, it returns `fail`. + +The conversion of strings can result in integers or floats, according to the lexical conventions of Lua (see [§3.1](http://www.lua.org/manual/5.4/manual.html#3.1)). The string may have leading and trailing spaces and a sign. + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-tonumber) + + +```lua +function tonumber(e: any) + -> number? +``` + + +--- + +# tostring + + +Receives a value of any type and converts it to a string in a human-readable format. + +If the metatable of `v` has a `__tostring` field, then `tostring` calls the corresponding value with `v` as argument, and uses the result of the call as its result. Otherwise, if the metatable of `v` has a `__name` field with a string value, `tostring` may use that string in its final result. + +For complete control of how numbers are converted, use [string.format](http://www.lua.org/manual/5.4/manual.html#pdf-string.format). + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-tostring) + + +```lua +function tostring(v: any) + -> string +``` + + +--- + +# type + + +Returns the type of its only argument, coded as a string. The possible results of this function are `"nil"` (a string, not the value `nil`), `"number"`, `"string"`, `"boolean"`, `"table"`, `"function"`, `"thread"`, and `"userdata"`. + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-type) + + +```lua +type: + | "nil" + | "number" + | "string" + | "boolean" + | "table" + | "function" + | "thread" + | "userdata" +``` + + +```lua +function type(v: any) + -> type: "boolean"|"function"|"nil"|"number"|"string"...(+3) +``` + + +--- + +# unpack + + +Returns the elements from the given `list`. This function is equivalent to +```lua + return list[i], list[i+1], ···, list[j] +``` + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-unpack) + + +```lua +function unpack(list: [], i?: integer, j?: integer) + -> ... +``` + + +```lua +function unpack(list: { [1]: , [2]: , [3]: , [4]: , [5]: , [6]: , [7]: , [8]: , [9]: }) + -> + 2. + 3. + 4. + 5. + 6. + 7. + 8. + 9. +``` + + +--- + +# utf8 + + + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8) + + + +```lua +utf8lib +``` + + +--- + +# utf8.char + + +Receives zero or more integers, converts each one to its corresponding UTF-8 byte sequence and returns a string with the concatenation of all these sequences. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8.char) + + +```lua +function utf8.char(code: integer, ...integer) + -> string +``` + + +--- + +# utf8.codepoint + + +Returns the codepoints (as integers) from all characters in `s` that start between byte position `i` and `j` (both included). + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8.codepoint) + + +```lua +function utf8.codepoint(s: string, i?: integer, j?: integer, lax?: boolean) + -> code: integer + 2. ...integer +``` + + +--- + +# utf8.codes + + +Returns values so that the construction +```lua +for p, c in utf8.codes(s) do + body +end +``` +will iterate over all UTF-8 characters in string s, with p being the position (in bytes) and c the code point of each character. It raises an error if it meets any invalid byte sequence. + + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8.codes) + + +```lua +function utf8.codes(s: string, lax?: boolean) + -> fun(s: string, p: integer):integer, integer +``` + + +--- + +# utf8.len + + +Returns the number of UTF-8 characters in string `s` that start between positions `i` and `j` (both inclusive). + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8.len) + + +```lua +function utf8.len(s: string, i?: integer, j?: integer, lax?: boolean) + -> integer? + 2. errpos: integer? +``` + + +--- + +# utf8.offset + + +Returns the position (in bytes) where the encoding of the `n`-th character of `s` (counting from position `i`) starts. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-utf8.offset) + + +```lua +function utf8.offset(s: string, n: integer, i?: integer) + -> p: integer +``` + + +--- + +# warn + + +Emits a warning with a message composed by the concatenation of all its arguments (which should be strings). + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-warn) + + +```lua +function warn(message: string, ...any) +``` + + +--- + +# xpcall + + +Calls function `f` with the given arguments in protected mode with a new message handler. + +[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-xpcall) + + +```lua +function xpcall(f: fun(...any):...unknown, msgh: function, arg1?: any, ...any) + -> success: boolean + 2. result: any + 3. ...any +``` \ No newline at end of file diff --git a/doc/sloth-flake.txt b/doc/sloth-flake.txt new file mode 100644 index 0000000..4bcc773 --- /dev/null +++ b/doc/sloth-flake.txt @@ -0,0 +1,78 @@ +*my-awesome-plugin.txt* An awesome plugin that greets you :) + +============================================================================== +CONTENTS *my-awesome-plugin-contents* + + 1. Introduction ......................... |my-awesome-plugin-introduction| + 2. Setup ................................ |my-awesome-plugin-setup| + 3. Commands ............................. |my-awesome-plugin-commands| + 4. API .................................. |my-awesome-plugin-api| + +============================================================================== +1. INTRODUCTION *my-awesome-plugin-introduction* + +my-awesome-plugin makes Neovim, your favorite text editor, capable of greeting +you. See bellow how it works: + + +--------------+ +--------------+ + | | | | + | | | | + | | | | + | Hello | -----------> | [your-name] | + | | | | + | | | | + +--------------+ +--------------+ + +============================================================================== +2. SETUP *my-awesome-plugin-setup* + +Make sure to add to call the setup function with the proper configuration on +your `init` file. + +If you use `init.vim`: > + + lua require('my_awesome_plugin').setup { name = 'Alexander, The Great'} + + +Or, if you use `init.lua`: > + + require('my_awesome_plugin').setup { name = 'Alexander, The Great'} + +============================================================================== +3. COMMANDS *my-awesome-plugin-commands* + +:MyAwesomePluginGenericGreet *MyAwesomePluginGenericGreet* + +Shows a generic greet message. + +:MyAwesomePluginGreet *MyAwesomePluginGreet* + +Shows a personalized, accordingly to the setup configuration, greet message. + +============================================================================== +4. API *my-awesome-plugin-api* + + +my_awesome_plugin.setup({config}) *my_awesome_plugin.setup()* + Configures this plugin. Currently supported configuration variables + are: + • `name`: a string to be used in the greet message + + Parameters: ~ + {config}(required, table) Table of values; keys are as listed + above. Accept defaults by omitting the relevant key. + +my_awesome_plugin.is_configured() *my_awesome_plugin.is_configured()* + Tell if the plugin is configured. + Return: ~ + true/false + +my_awesome_plugin.greet() *my_awesome_plugin.greet()* + Show a greeting message. If the plugin was previously configured with + |my_awesome_plugin.setup()|, show a personalized message. + +my_awesome_plugin.generic_greet() *my_awesome_plugin.generic_greet()* + Show a generic greeting message. + +============================================================================== +vim:tw=78:ts=8:ft=help:norl:noet:fen:noet: diff --git a/examples/simple/flake.lock b/examples/simple/flake.lock new file mode 100644 index 0000000..e6d95a3 --- /dev/null +++ b/examples/simple/flake.lock @@ -0,0 +1,339 @@ +{ + "nodes": { + "alejandra": { + "inputs": { + "fenix": "fenix", + "flakeCompat": "flakeCompat", + "nixpkgs": [ + "sloth-flake", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1660592437, + "narHash": "sha256-xFumnivtVwu5fFBOrTxrv6fv3geHKF04RGP23EsDVaI=", + "owner": "kamadorueda", + "repo": "alejandra", + "rev": "e7eac49074b70814b542fee987af2987dd0520b5", + "type": "github" + }, + "original": { + "owner": "kamadorueda", + "ref": "3.0.0", + "repo": "alejandra", + "type": "github" + } + }, + "fenix": { + "inputs": { + "nixpkgs": [ + "sloth-flake", + "alejandra", + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1657607339, + "narHash": "sha256-HaqoAwlbVVZH2n4P3jN2FFPMpVuhxDy1poNOR7kzODc=", + "owner": "nix-community", + "repo": "fenix", + "rev": "b814c83d9e6aa5a28d0cf356ecfdafb2505ad37d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flakeCompat": { + "flake": false, + "locked": { + "lastModified": 1650374568, + "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "b4a34015c698c7793d592d66adbab377907a2be8", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "nil": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs_2", + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1717086091, + "narHash": "sha256-GmsEQa4HZeMfec37LZnwG/Lt/XmqFLXsjv5QWojeNiM=", + "owner": "oxalica", + "repo": "nil", + "rev": "ab3ddb8f063774cf7e22eb610f5ecfdb77309f3c", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "nil", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1717774105, + "narHash": "sha256-HV97wqUQv9wvptiHCb3Y0/YH0lJ60uZ8FYfEOIzYEqI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d226935fd75012939397c83f6c385e4d6d832288", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1716977081, + "narHash": "sha256-pFe5jLeIPlKEln5n2h998d7cpzXFdbrBMRe3suz4K1o=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "ac82a513e55582291805d6f09d35b6d8b60637a1", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1717196966, + "narHash": "sha256-yZKhxVIKd2lsbOqYd5iDoUIwsRZFqE87smE2Vzf6Ck0=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "57610d2f8f0937f39dbd72251e9614b1561942d8", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1660438583, + "narHash": "sha256-rJUTYxFKlWUJI3njAwEc1pKAVooAViZGJvsgqfh/q/E=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "bbd8f7cd87d0b29294ef3072ffdbd61d60f05da4", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "sloth-flake": "sloth-flake", + "utils": "utils_2" + } + }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1657557289, + "narHash": "sha256-PRW+nUwuqNTRAEa83SfX+7g+g8nQ+2MMbasQ9nt6+UM=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "caf23f29144b371035b864a1017dbc32573ad56d", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, + "rust-overlay": { + "inputs": { + "flake-utils": [ + "sloth-flake", + "nil", + "flake-utils" + ], + "nixpkgs": [ + "sloth-flake", + "nil", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1717035469, + "narHash": "sha256-MzH+yjKULH3HCRj9QCTwBvqq4LZkR0ZqRE/QfGOGC2E=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "095702e63a40e86f339d11864da9dc965b70a01e", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "sloth-flake": { + "inputs": { + "alejandra": "alejandra", + "nil": "nil", + "nixpkgs": "nixpkgs_3", + "utils": "utils", + "yants": "yants" + }, + "locked": { + "lastModified": 0, + "narHash": "sha256-VvZ+kCRRZcMM5j+wCNCfCUZby12gFS103ItEJhwcO3A=", + "path": "/nix/store/5xmp1bx8p395yl60c033ywjd50wahsqy-source", + "type": "path" + }, + "original": { + "path": "/nix/store/5xmp1bx8p395yl60c033ywjd50wahsqy-source", + "type": "path" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "utils_2": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "yants": { + "inputs": { + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1686863218, + "narHash": "sha256-kooxYm3/3ornWtVBNHM3Zh020gACUyFX2G0VQXnB+mk=", + "owner": "divnix", + "repo": "yants", + "rev": "8f0da0dba57149676aa4817ec0c880fbde7a648d", + "type": "github" + }, + "original": { + "owner": "divnix", + "repo": "yants", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/examples/simple/flake.nix b/examples/simple/flake.nix new file mode 100644 index 0000000..36aa228 --- /dev/null +++ b/examples/simple/flake.nix @@ -0,0 +1,32 @@ +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + # If you start your configuration from this example, you should uncomment + # the next line, and delete the one after. + # sloth-flake.url = "github:lemarsu/sloth-flake.nvim"; + sloth-flake.url = "../.."; + utils.url = "github:numtide/flake-utils"; + }; + outputs = { + nixpkgs, + sloth-flake, + utils, + ... + }: + utils.lib.eachDefaultSystem (system: let + pkgs = nixpkgs.legacyPackages.${system}; + in { + packages = rec { + default = neovim; + neovim = sloth-flake.lib.mkNeovimPkg { + inherit pkgs; + viAlias = true; + vimAlias = true; + vimdiffAlias = true; + dependencies = with pkgs.vimPlugins; [ + telescope-nvim + ]; + }; + }; + }); +}