Clear old nvim configs

This commit is contained in:
John Mertz 2024-02-19 17:51:33 -07:00
parent cd7da010de
commit 7305092d3c
Signed by: jpm
GPG Key ID: E9C5EA2D867501AB
1211 changed files with 0 additions and 551380 deletions

View File

@ -1,15 +0,0 @@
{
"neodev": {
"library": {
"enabled": true,
"plugins": true
}
},
"neoconf": {
"plugins": {
"lua_ls": {
"enabled": true
}
}
}
}

View File

@ -1,4 +0,0 @@
# 💤 LazyVim
A starter template for [LazyVim](https://github.com/LazyVim/LazyVim).
Refer to the [documentation](https://lazyvim.github.io/installation) to get started.

View File

@ -1,2 +0,0 @@
-- bootstrap lazy.nvim, LazyVim and your plugins
require("config.lazy")

View File

@ -1,52 +0,0 @@
{
"LazyVim": { "branch": "main", "commit": "6d8be7ae46b8c750d68e218819415524460bd424" },
"LuaSnip": { "branch": "master", "commit": "105b5f7f72c13e682a3aa5d29eac2408ae513b22" },
"alpha-nvim": { "branch": "main", "commit": "9e33db324b8bb7a147bce9ea5496686ee859461d" },
"bufferline.nvim": { "branch": "main", "commit": "2f391fde91b9c3876eee359ee24cc352050e5e48" },
"catppuccin": { "branch": "main", "commit": "12894370fa3c9e2200f3724c4184354d6b79733a" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
"dressing.nvim": { "branch": "master", "commit": "e6eff7a5a950a853c3903d906dbcea03f778db5f" },
"flit.nvim": { "branch": "main", "commit": "5c9a78b97f7f4301473ea5e37501b5b1d4da167b" },
"friendly-snippets": { "branch": "main", "commit": "1723ae01d83f3b3ac1530f1ae22b7b9d5da7749b" },
"gitsigns.nvim": { "branch": "main", "commit": "a36bc3360d584d39b4fb076d855c4180842d4444" },
"indent-blankline.nvim": { "branch": "master", "commit": "7075d7861f7a6bbf0de0298c83f8a13195e6ec01" },
"lazy.nvim": { "branch": "main", "commit": "de0a911ad97e273edb6e3890ddb1aac59e2d0fb4" },
"leap.nvim": { "branch": "main", "commit": "f41de5c1cfeb146e4b8c5ed20e5b32230457ff25" },
"lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "4f1c72767bec31397d59554f84096909b2887195" },
"mason.nvim": { "branch": "main", "commit": "b68d3be4b664671002221d43c82e74a0f1006b26" },
"mini.ai": { "branch": "main", "commit": "5218ea75e635df78a807bc9d5a7162594fb76d02" },
"mini.bufremove": { "branch": "main", "commit": "7821606e35c1ac931b56d8e3155f45ffe76ee7e5" },
"mini.comment": { "branch": "main", "commit": "877acea5b2a32ff55f808fc0ebe9aa898648318c" },
"mini.indentscope": { "branch": "main", "commit": "f60e9b51a6214c73a170ffc5445ce91560981031" },
"mini.pairs": { "branch": "main", "commit": "963b800d0524eadd297199207011b98684205ada" },
"mini.surround": { "branch": "main", "commit": "14f418209ecf52d1a8de9d091eb6bd63c31a4e01" },
"neo-tree.nvim": { "branch": "v2.x", "commit": "f765e75e7d2444629b5ace3cd7609c12251de254" },
"neoconf.nvim": { "branch": "main", "commit": "08f146d53e075055500dca35e93281faff95716b" },
"neodev.nvim": { "branch": "main", "commit": "a2b1d8fb9fa4daa35d3fd9123bccccccbd4a3520" },
"noice.nvim": { "branch": "main", "commit": "2cb37edea88b7baa45324ac7b791f1f1b4e48316" },
"nui.nvim": { "branch": "main", "commit": "d146966a423e60699b084eeb28489fe3b6427599" },
"null-ls.nvim": { "branch": "main", "commit": "aac27a1fa550de3d0b2c651168167cc0d5366a9a" },
"nvim-cmp": { "branch": "main", "commit": "2743dd989e9b932e1b4813a4927d7b84272a14e2" },
"nvim-lspconfig": { "branch": "master", "commit": "0011c435282f043a018e23393cae06ed926c3f4a" },
"nvim-navic": { "branch": "master", "commit": "32cff45f1c84bec5e2a7bf15c0f3c6739b64c85d" },
"nvim-notify": { "branch": "master", "commit": "ea9c8ce7a37f2238f934e087c255758659948e0f" },
"nvim-spectre": { "branch": "master", "commit": "6e9dfd6f0ad24074ba03fe420b2b5c59075bc205" },
"nvim-treesitter": { "branch": "master", "commit": "393bc5bec591caeedb0a4c696d15946c5d6c2de8" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "52f1f3280d9092bfaee5c45be5962fabee3d9654" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "7f625207f225eea97ef7a6abe7611e556c396d2f" },
"nvim-web-devicons": { "branch": "master", "commit": "9ab9b0b894b2388a9dbcdee5f00ce72e25d85bf9" },
"persistence.nvim": { "branch": "main", "commit": "4b8051c01f696d8849a5cb8afa9767be8db16e40" },
"plenary.nvim": { "branch": "master", "commit": "102c02903c74b93c705406bf362049383abc87c8" },
"telescope.nvim": { "branch": "master", "commit": "c5b11f4fe780f4acd6ed0d58575d3cb7af3e893a" },
"todo-comments.nvim": { "branch": "main", "commit": "09b0b17d824d2d56f02ff15967e8a2499a89c731" },
"tokyonight.nvim": { "branch": "main", "commit": "fd0a005fd8986ec0d98a1938dc570303e8d8444b" },
"trouble.nvim": { "branch": "main", "commit": "d99e2abd10808ef91738ce98a5c767e6a51df449" },
"vim-illuminate": { "branch": "master", "commit": "a2907275a6899c570d16e95b9db5fd921c167502" },
"vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" },
"vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" },
"which-key.nvim": { "branch": "main", "commit": "d871f2b664afd5aed3dc1d1573bef2fb24ce0484" }
}

View File

@ -1,3 +0,0 @@
-- Autocmds are automatically loaded on the VeryLazy event
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
-- Add any additional autocmds here

View File

@ -1,3 +0,0 @@
-- Keymaps are automatically loaded on the VeryLazy event
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
-- Add any additional keymaps here

View File

@ -1,46 +0,0 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
-- bootstrap lazy.nvim
-- stylua: ignore
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
require("lazy").setup({
spec = {
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- import any extras modules here
-- { import = "lazyvim.plugins.extras.lang.typescript" },
-- { import = "lazyvim.plugins.extras.lang.json" },
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
-- import/override with your plugins
{ import = "plugins" },
},
defaults = {
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
lazy = false,
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
-- have outdated releases, which may break your Neovim install.
version = false, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver
},
install = { colorscheme = { "tokyonight", "habamax" } },
checker = { enabled = true }, -- automatically check for plugin updates
performance = {
rtp = {
-- disable some rtp plugins
disabled_plugins = {
"gzip",
-- "matchit",
-- "matchparen",
-- "netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
})

View File

@ -1,7 +0,0 @@
-- Options are automatically loaded before lazy.nvim startup
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here
local opt = vim.opt
opt.tabstop = 4
opt.expandtab = true
opt.shiftwidth = 4

View File

@ -1 +0,0 @@
/home/jpm/.config/nvim/mason/packages/lua-language-server/lua-language-server

View File

@ -1 +0,0 @@
/home/jpm/.config/nvim/mason/packages/shfmt/shfmt_v3.7.0_linux_amd64

View File

@ -1 +0,0 @@
/home/jpm/.config/nvim/mason/packages/stylua/stylua

View File

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2018 最萌小汐
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,85 +0,0 @@
local main, exec
local i = 1
while arg[i] do
if arg[i] == '-E' then
elseif arg[i] == '-e' then
i = i + 1
local expr = assert(arg[i], "'-e' needs argument")
assert(load(expr, "=(command line)"))()
-- exit after the executing
exec = true
elseif not main and arg[i]:sub(1, 1) ~= '-' then
main = i
elseif arg[i]:sub(1, 2) == '--' then
break
end
i = i + 1
end
if exec and not main then
return
end
if main then
for i = -1, -999, -1 do
if not arg[i] then
for j = i + 1, -1 do
arg[j - main + 1] = arg[j]
end
break
end
end
for j = 1, #arg do
arg[j - main] = arg[j]
end
for j = #arg - main + 1, #arg do
arg[j] = nil
end
end
local root
do
if main then
local fs = require 'bee.filesystem'
local mainPath = fs.path(arg[0])
root = mainPath:parent_path():string()
if root == '' then
root = '.'
end
else
local sep = package.config:sub(1, 1)
if sep == '\\' then
sep = '/\\'
end
local pattern = "[" .. sep .. "]+[^" .. sep .. "]+"
root = package.cpath:match("([^;]+)" .. pattern .. pattern .. "$")
arg[0] = root .. package.config:sub(1, 1) .. 'main.lua'
end
root = root:gsub('[/\\]', package.config:sub(1, 1))
end
package.path = table.concat({
root .. "/script/?.lua",
root .. "/script/?/init.lua",
}, ";"):gsub('/', package.config:sub(1, 1))
package.searchers[2] = function (name)
local filename, err = package.searchpath(name, package.path)
if not filename then
return err
end
local f = io.open(filename)
if not f then
return 'cannot open file:' .. filename
end
local buf = f:read '*a'
f:close()
local relative = filename:sub(1, #root) == root and filename:sub(#root + 2) or filename
local init, err = load(buf, '@' .. relative)
if not init then
return err
end
return init, filename
end
assert(loadfile(arg[0]))(table.unpack(arg))

File diff suppressed because it is too large Load Diff

View File

@ -1,66 +0,0 @@
if not DEVELOP then
return
end
local fs = require 'bee.filesystem'
local luaDebugs = {}
local home = os.getenv 'USERPROFILE' or os.getenv 'HOME'
if not home then
log.error('Cannot find home directory')
return
end
for _, vscodePath in ipairs { '.vscode', '.vscode-insiders', '.vscode-server-insiders' } do
local extensionPath = fs.path(home) / vscodePath / 'extensions'
log.debug('Search extensions at:', extensionPath:string())
if fs.exists(extensionPath) then
for path in fs.pairs(extensionPath) do
if fs.is_directory(path) then
local name = path:filename():string()
if name:find('actboy168.lua-debug-', 1, true) then
luaDebugs[#luaDebugs+1] = path:string()
end
end
end
end
end
if #luaDebugs == 0 then
log.debug('Cant find "actboy168.lua-debug"')
return
end
local function getVer(filename)
local a, b, c = filename:match('actboy168%.lua%-debug%-(%d+)%.(%d+)%.(%d+)')
if not a then
return 0
end
return a * 1000000 + b * 1000 + c
end
table.sort(luaDebugs, function (a, b)
return getVer(a) > getVer(b)
end)
local debugPath = luaDebugs[1]
local cpath = "/runtime/win64/lua54/?.dll;/runtime/win64/lua54/?.so"
local path = "/script/?.lua"
local function tryDebugger()
local entry = assert(package.searchpath('debugger', debugPath .. path))
local root = debugPath
local addr = ("127.0.0.1:%d"):format(DBGPORT)
local dbg = loadfile(entry)(root)
dbg:start {
address = addr,
}
log.debug('Debugger startup, listen port:', DBGPORT)
log.debug('Debugger args:', addr, root, path, cpath)
if DBGWAIT then
dbg:event('wait')
end
return dbg
end
xpcall(tryDebugger, log.debug)

View File

@ -1,764 +0,0 @@
---@diagnostic disable: undefined-global, lowercase-global
arg =
'Command-line arguments of Lua Standalone.'
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!"`'
cgopt.collect =
'Performs a full garbage-collection cycle.'
cgopt.stop =
'Stops automatic execution.'
cgopt.restart =
'Restarts automatic execution.'
cgopt.count =
'Returns the total memory in Kbytes.'
cgopt.step =
'Performs a garbage-collection step.'
cgopt.setpause =
'Set `pause`.'
cgopt.setstepmul =
'Set `step multiplier`.'
cgopt.incremental =
'Change the collector mode to incremental.'
cgopt.generational =
'Change the collector mode to generational.'
cgopt.isrunning =
'Returns whether the collector is running.'
collectgarbage =
'This function is a generic interface to the garbage collector. It performs different functions according to its first argument, `opt`.'
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.)'
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.
]]
_G =
'A global variable (not a function) that holds the global environment (see §2.2). Lua itself does not use this variable; changing its value does not affect any environment, nor vice versa.'
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.'
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.'
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 keyvalue pairs `(1,t[1]), (2,t[2]), ...`, up to the first absent index.
]]
loadmode.b =
'Only binary chunks.'
loadmode.t =
'Only text chunks.'
loadmode.bt =
'Both binary and text.'
load['<5.1'] =
'Loads a chunk using function `func` to get its pieces. Each call to `func` must return a string that concatenates with previous results.'
load['>5.2'] =
[[
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.
]]
loadfile =
'Loads a chunk from file `filename` or from the standard input, if no file name is given.'
loadstring =
'Loads a chunk from the given string.'
module =
'Creates a module.'
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.
]]
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 function, the table `t`, and `nil`, so that the construction
```lua
for k,v in pairs(t) do body end
```
will iterate over all keyvalue pairs of table `t`.
See function $next for the caveats of modifying the table during its traversal.
]]
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.
]]
print =
[[
Receives any number of arguments and prints their values to `stdout`, converting each argument to a string following the same rules of $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 and $io.write.
]]
rawequal =
'Checks whether v1 is equal to v2, without invoking the `__eq` metamethod.'
rawget =
'Gets the real value of `table[index]`, without invoking the `__index` metamethod.'
rawlen =
'Returns the length of the object `v`, without invoking the `__len` metamethod.'
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`.
]]
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.'
setfenv =
'Sets the environment to be used by the given 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).
]]
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). The string may have leading and trailing spaces and a sign.
]]
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.
]]
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"`.
]]
_VERSION =
'A global variable (not a function) that holds a string containing the running Lua version.'
warn =
'Emits a warning with a message composed by the concatenation of all its arguments (which should be strings).'
xpcall['=5.1'] =
'Calls function `f` with the given arguments in protected mode with a new message handler.'
xpcall['>5.2'] =
'Calls function `f` with the given arguments in protected mode with a new message handler.'
unpack =
[[
Returns the elements from the given `list`. This function is equivalent to
```lua
return list[i], list[i+1], ···, list[j]
```
]]
bit32 =
''
bit32.arshift =
[[
Returns the number `x` shifted `disp` bits to the right. Negative displacements shift to the left.
This shift operation is what is called arithmetic shift. Vacant bits on the left are filled with copies of the higher bit of `x`; vacant bits on the right are filled with zeros.
]]
bit32.band =
'Returns the bitwise *and* of its operands.'
bit32.bnot =
[[
Returns the bitwise negation of `x`.
```lua
assert(bit32.bnot(x) ==
(-1 - x) % 2^32)
```
]]
bit32.bor =
'Returns the bitwise *or* of its operands.'
bit32.btest =
'Returns a boolean signaling whether the bitwise *and* of its operands is different from zero.'
bit32.bxor =
'Returns the bitwise *exclusive or* of its operands.'
bit32.extract =
'Returns the unsigned number formed by the bits `field` to `field + width - 1` from `n`.'
bit32.replace =
'Returns a copy of `n` with the bits `field` to `field + width - 1` replaced by the value `v` .'
bit32.lrotate =
'Returns the number `x` rotated `disp` bits to the left. Negative displacements rotate to the right.'
bit32.lshift =
[[
Returns the number `x` shifted `disp` bits to the left. Negative displacements shift to the right. In any direction, vacant bits are filled with zeros.
```lua
assert(bit32.lshift(b, disp) ==
(b * 2^disp) % 2^32)
```
]]
bit32.rrotate =
'Returns the number `x` rotated `disp` bits to the right. Negative displacements rotate to the left.'
bit32.rshift =
[[
Returns the number `x` shifted `disp` bits to the right. Negative displacements shift to the left. In any direction, vacant bits are filled with zeros.
```lua
assert(bit32.rshift(b, disp) ==
math.floor(b % 2^32 / 2^disp))
```
]]
coroutine =
''
coroutine.create =
'Creates a new coroutine, with body `f`. `f` must be a function. Returns this new coroutine, an object with type `"thread"`.'
coroutine.isyieldable =
'Returns true when the running coroutine can yield.'
coroutine.isyieldable['>5.4']=
'Returns true when the coroutine `co` can yield. The default for `co` is the running coroutine.'
coroutine.close =
'Closes coroutine `co` , closing all its pending to-be-closed variables and putting the coroutine in a dead state.'
coroutine.resume =
'Starts or continues the execution of coroutine `co`.'
coroutine.running =
'Returns the running coroutine plus a boolean, true when the running coroutine is the main one.'
coroutine.status =
'Returns the status of coroutine `co`.'
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.'
coroutine.yield =
'Suspends the execution of the calling coroutine.'
costatus.running =
'Is running.'
costatus.suspended =
'Is suspended or not started.'
costatus.normal =
'Is active but not running.'
costatus.dead =
'Has finished or stopped with an error.'
debug =
''
debug.debug =
'Enters an interactive mode with the user, running each string that the user enters.'
debug.getfenv =
'Returns the environment of object `o` .'
debug.gethook =
'Returns the current hook settings of the thread.'
debug.getinfo =
'Returns a table with information about a function.'
debug.getlocal['<5.1'] =
'Returns the name and the value of the local variable with index `local` of the function at level `level` of the stack.'
debug.getlocal['>5.2'] =
'Returns the name and the value of the local variable with index `local` of the function at level `f` of the stack.'
debug.getmetatable =
'Returns the metatable of the given value.'
debug.getregistry =
'Returns the registry table.'
debug.getupvalue =
'Returns the name and the value of the upvalue with index `up` of the function.'
debug.getuservalue['<5.3'] =
'Returns the Lua value associated to u.'
debug.getuservalue['>5.4'] =
[[
Returns the `n`-th user value associated
to the userdata `u` plus a boolean,
`false` if the userdata does not have that value.
]]
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`.
]]
debug.setfenv =
'Sets the environment of the given `object` to the given `table` .'
debug.sethook =
'Sets the given function as a hook.'
debug.setlocal =
'Assigns the `value` to the local variable with index `local` of the function at `level` of the stack.'
debug.setmetatable =
'Sets the metatable for the given value to the given table (which can be `nil`).'
debug.setupvalue =
'Assigns the `value` to the upvalue with index `up` of the function.'
debug.setuservalue['<5.3'] =
'Sets the given value as the Lua value associated to the given udata.'
debug.setuservalue['>5.4'] =
[[
Sets the given `value` as
the `n`-th user value associated to the given `udata`.
`udata` must be a full 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.'
debug.upvalueid =
'Returns a unique identifier (as a light userdata) for the upvalue numbered `n` from the given function.'
debug.upvaluejoin =
'Make the `n1`-th upvalue of the Lua closure `f1` refer to the `n2`-th upvalue of the Lua closure `f2`.'
infowhat.n =
'`name` and `namewhat`'
infowhat.S =
'`source`, `short_src`, `linedefined`, `lastlinedefined`, and `what`'
infowhat.l =
'`currentline`'
infowhat.t =
'`istailcall`'
infowhat.u['<5.1'] =
'`nups`'
infowhat.u['>5.2'] =
'`nups`, `nparams`, and `isvararg`'
infowhat.f =
'`func`'
infowhat.r =
'`ftransfer` and `ntransfer`'
infowhat.L =
'`activelines`'
hookmask.c =
'Calls hook when Lua calls a function.'
hookmask.r =
'Calls hook when Lua returns from a function.'
hookmask.l =
'Calls hook when Lua enters a new line of code.'
file =
''
file[':close'] =
'Close `file`.'
file[':flush'] =
'Saves any written data to `file`.'
file[':lines'] =
[[
------
```lua
for c in file:lines(...) do
body
end
```
]]
file[':read'] =
'Reads the `file`, according to the given formats, which specify what to read.'
file[':seek'] =
'Sets and gets the file position, measured from the beginning of the file.'
file[':setvbuf'] =
'Sets the buffering mode for an output file.'
file[':write'] =
'Writes the value of each of its arguments to `file`.'
readmode.n =
'Reads a numeral and returns it as number.'
readmode.a =
'Reads the whole file.'
readmode.l =
'Reads the next line skipping the end of line.'
readmode.L =
'Reads the next line keeping the end of line.'
seekwhence.set =
'Base is beginning of the file.'
seekwhence.cur =
'Base is current position.'
seekwhence['.end'] =
'Base is end of file.'
vbuf.no =
'Output operation appears immediately.'
vbuf.full =
'Performed only when the buffer is full.'
vbuf.line =
'Buffered until a newline is output.'
io =
''
io.stdin =
'standard input.'
io.stdout =
'standard output.'
io.stderr =
'standard error.'
io.close =
'Close `file` or default output file.'
io.flush =
'Saves any written data to default output file.'
io.input =
'Sets `file` as the default input file.'
io.lines =
[[
------
```lua
for c in io.lines(filename, ...) do
body
end
```
]]
io.open =
'Opens a file, in the mode specified in the string `mode`.'
io.output =
'Sets `file` as the default output file.'
io.popen =
'Starts program prog in a separated process.'
io.read =
'Reads the `file`, according to the given formats, which specify what to read.'
io.tmpfile =
'In case of success, returns a handle for a temporary file.'
io.type =
'Checks whether `obj` is a valid file handle.'
io.write =
'Writes the value of each of its arguments to default output file.'
openmode.r =
'Read mode.'
openmode.w =
'Write mode.'
openmode.a =
'Append mode.'
openmode['.r+'] =
'Update mode, all previous data is preserved.'
openmode['.w+'] =
'Update mode, all previous data is erased.'
openmode['.a+'] =
'Append update mode, previous data is preserved, writing is only allowed at the end of file.'
openmode.rb =
'Read mode. (in binary mode.)'
openmode.wb =
'Write mode. (in binary mode.)'
openmode.ab =
'Append mode. (in binary mode.)'
openmode['.r+b'] =
'Update mode, all previous data is preserved. (in binary mode.)'
openmode['.w+b'] =
'Update mode, all previous data is erased. (in binary mode.)'
openmode['.a+b'] =
'Append update mode, previous data is preserved, writing is only allowed at the end of file. (in binary mode.)'
popenmode.r =
'Read data from this program by `file`.'
popenmode.w =
'Write data to this program by `file`.'
filetype.file =
'Is an open file handle.'
filetype['.closed file'] =
'Is a closed file handle.'
filetype['.nil'] =
'Is not a file handle.'
math =
''
math.abs =
'Returns the absolute value of `x`.'
math.acos =
'Returns the arc cosine of `x` (in radians).'
math.asin =
'Returns the arc sine of `x` (in radians).'
math.atan['<5.2'] =
'Returns the arc tangent of `x` (in radians).'
math.atan['>5.3'] =
'Returns the arc tangent of `y/x` (in radians).'
math.atan2 =
'Returns the arc tangent of `y/x` (in radians).'
math.ceil =
'Returns the smallest integral value larger than or equal to `x`.'
math.cos =
'Returns the cosine of `x` (assumed to be in radians).'
math.cosh =
'Returns the hyperbolic cosine of `x` (assumed to be in radians).'
math.deg =
'Converts the angle `x` from radians to degrees.'
math.exp =
'Returns the value `e^x` (where `e` is the base of natural logarithms).'
math.floor =
'Returns the largest integral value smaller than or equal to `x`.'
math.fmod =
'Returns the remainder of the division of `x` by `y` that rounds the quotient towards zero.'
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).'
math.huge =
'A value larger than any other numeric value.'
math.ldexp =
'Returns `m * (2 ^ e)` .'
math.log['<5.1'] =
'Returns the natural logarithm of `x` .'
math.log['>5.2'] =
'Returns the logarithm of `x` in the given base.'
math.log10 =
'Returns the base-10 logarithm of x.'
math.max =
'Returns the argument with the maximum value, according to the Lua operator `<`.'
math.maxinteger =
'An integer with the maximum value for an integer.'
math.min =
'Returns the argument with the minimum value, according to the Lua operator `<`.'
math.mininteger =
'An integer with the minimum value for an integer.'
math.modf =
'Returns the integral part of `x` and the fractional part of `x`.'
math.pi =
'The value of *π*.'
math.pow =
'Returns `x ^ y` .'
math.rad =
'Converts the angle `x` from degrees to radians.'
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].
]]
math.randomseed['<5.3'] =
'Sets `x` as the "seed" for the pseudo-random generator.'
math.randomseed['>5.4'] =
[[
* `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.
]]
math.sin =
'Returns the sine of `x` (assumed to be in radians).'
math.sinh =
'Returns the hyperbolic sine of `x` (assumed to be in radians).'
math.sqrt =
'Returns the square root of `x`.'
math.tan =
'Returns the tangent of `x` (assumed to be in radians).'
math.tanh =
'Returns the hyperbolic tangent of `x` (assumed to be in radians).'
math.tointeger =
'If the value `x` is convertible to an integer, returns that integer.'
math.type =
'Returns `"integer"` if `x` is an integer, `"float"` if it is a float, or `nil` if `x` is not a number.'
math.ult =
'Returns `true` if and only if `m` is below `n` when they are compared as unsigned integers.'
os =
''
os.clock =
'Returns an approximation of the amount in seconds of CPU time used by the program.'
os.date =
'Returns a string or a table containing date and time, formatted according to the given string `format`.'
os.difftime =
'Returns the difference, in seconds, from time `t1` to time `t2`.'
os.execute =
'Passes `command` to be executed by an operating system shell.'
os.exit['<5.1'] =
'Calls the C function `exit` to terminate the host program.'
os.exit['>5.2'] =
'Calls the ISO C function `exit` to terminate the host program.'
os.getenv =
'Returns the value of the process environment variable `varname`.'
os.remove =
'Deletes the file with the given name.'
os.rename =
'Renames the file or directory named `oldname` to `newname`.'
os.setlocale =
'Sets the current locale of the program.'
os.time =
'Returns the current time when called without arguments, or a time representing the local date and time specified by the given table.'
os.tmpname =
'Returns a string with a file name that can be used for a temporary file.'
osdate.year =
'four digits'
osdate.month =
'1-12'
osdate.day =
'1-31'
osdate.hour =
'0-23'
osdate.min =
'0-59'
osdate.sec =
'0-61'
osdate.wday =
'weekday, 17, Sunday is 1'
osdate.yday =
'day of the year, 1366'
osdate.isdst =
'daylight saving flag, a boolean'
package =
''
require['<5.3'] =
'Loads the given module, returns any value returned by the given module(`true` when `nil`).'
require['>5.4'] =
'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.)'
package.config =
'A string describing some compile-time configurations for packages.'
package.cpath =
'The path used by `require` to search for a C loader.'
package.loaded =
'A table used by `require` to control which modules are already loaded.'
package.loaders =
'A table used by `require` to control how to load modules.'
package.loadlib =
'Dynamically links the host program with the C library `libname`.'
package.path =
'The path used by `require` to search for a Lua loader.'
package.preload =
'A table to store loaders for specific modules.'
package.searchers =
'A table used by `require` to control how to load modules.'
package.searchpath =
'Searches for the given `name` in the given `path`.'
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` .'
string =
''
string.byte =
'Returns the internal numeric codes of the characters `s[i], s[i+1], ..., s[j]`.'
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.'
string.dump =
'Returns a string containing a binary representation (a *binary chunk*) of the given function.'
string.find =
'Looks for the first match of `pattern` (see §6.4.1) in the string.'
string.format =
'Returns a formatted version of its variable number of arguments following the description given in its first argument.'
string.gmatch =
[[
Returns an iterator function that, each time it is called, returns the next captures from `pattern` (see §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
```
]]
string.gsub =
'Returns a copy of s in which all (or the first `n`, if given) occurrences of the `pattern` (see §6.4.1) have been replaced by a replacement string specified by `repl`.'
string.len =
'Returns its length.'
string.lower =
'Returns a copy of this string with all uppercase letters changed to lowercase.'
string.match =
'Looks for the first match of `pattern` (see §6.4.1) in the string.'
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) .'
string.packsize =
'Returns the size of a string resulting from `string.pack` with the given format string `fmt` (see §6.4.2) .'
string.rep['>5.2'] =
'Returns a string that is the concatenation of `n` copies of the string `s` separated by the string `sep`.'
string.rep['<5.1'] =
'Returns a string that is the concatenation of `n` copies of the string `s` .'
string.reverse =
'Returns a string that is the string `s` reversed.'
string.sub =
'Returns the substring of the string that starts at `i` and continues until `j`.'
string.unpack =
'Returns the values packed in string according to the format string `fmt` (see §6.4.2) .'
string.upper =
'Returns a copy of this string with all lowercase letters changed to uppercase.'
table =
''
table.concat =
'Given a list where all elements are strings or numbers, returns the string `list[i]..sep..list[i+1] ··· sep..list[j]`.'
table.insert =
'Inserts element `value` at position `pos` in `list`.'
table.maxn =
'Returns the largest positive numerical index of the given table, or zero if the table has no positive numerical indices.'
table.move =
[[
Moves elements from table `a1` to table `a2`.
```lua
a2[t],··· =
a1[f],···,a1[e]
return a2
```
]]
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.'
table.remove =
'Removes from `list` the element at position `pos`, returning the value of the removed element.'
table.sort =
'Sorts list elements in a given order, *in-place*, from `list[1]` to `list[#list]`.'
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`.
]]
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.'
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.'
table.getn =
'Returns the number of elements in the table. This function is equivalent to `#list`.'
table.new =
[[This creates a pre-sized table, just like the C API equivalent `lua_createtable()`. This is useful for big tables if the final table size is known and automatic table resizing is too expensive. `narray` parameter specifies the number of array-like items, and `nhash` parameter specifies the number of hash-like items. The function needs to be required before use.
```lua
require("table.new")
```
]]
table.clear =
[[This clears all keys and values from a table, but preserves the allocated array/hash sizes. This is useful when a table, which is linked from multiple places, needs to be cleared and/or when recycling a table for use by the same context. This avoids managing backlinks, saves an allocation and the overhead of incremental array/hash part growth. The function needs to be required before use.
```lua
require("table.clear").
```
Please note this function is meant for very specific situations. In most cases it's better to replace the (usually single) link with a new table and let the GC do its work.
]]
utf8 =
''
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.'
utf8.charpattern =
'The pattern which matches exactly one UTF-8 byte sequence, assuming that the subject is a valid UTF-8 string.'
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.
]]
utf8.codepoint =
'Returns the codepoints (as integers) from all characters in `s` that start between byte position `i` and `j` (both included).'
utf8.len =
'Returns the number of UTF-8 characters in string `s` that start between positions `i` and `j` (both inclusive).'
utf8.offset =
'Returns the position (in bytes) where the encoding of the `n`-th character of `s` (counting from position `i`) starts.'

View File

@ -1,444 +0,0 @@
---@diagnostic disable: undefined-global
config.addonManager.enable =
"Whether the addon manager is enabled or not."
config.runtime.version =
"Lua runtime version."
config.runtime.path =
[[
When using `require`, how to find the file based on the input name.
Setting this config to `?/init.lua` means that when you enter `require 'myfile'`, `${workspace}/myfile/init.lua` will be searched from the loaded files.
if `runtime.pathStrict` is `false`, `${workspace}/**/myfile/init.lua` will also be searched.
If you want to load files outside the workspace, you need to set `Lua.workspace.library` first.
]]
config.runtime.pathStrict =
'When enabled, `runtime.path` will only search the first level of directories, see the description of `runtime.path`.'
config.runtime.special =
[[The custom global variables are regarded as some special built-in variables, and the language server will provide special support
The following example shows that 'include' is treated as' require '.
```json
"Lua.runtime.special" : {
"include" : "require"
}
```
]]
config.runtime.unicodeName =
"Allows Unicode characters in name."
config.runtime.nonstandardSymbol =
"Supports non-standard symbols. Make sure that your runtime environment supports these symbols."
config.runtime.plugin =
"Plugin path. Please read [wiki](https://github.com/LuaLS/lua-language-server/wiki/Plugins) to learn more."
config.runtime.pluginArgs =
"Additional arguments for the plugin."
config.runtime.fileEncoding =
"File encoding. The `ansi` option is only available under the `Windows` platform."
config.runtime.builtin =
[[
Adjust the enabled state of the built-in library. You can disable (or redefine) the non-existent library according to the actual runtime environment.
* `default`: Indicates that the library will be enabled or disabled according to the runtime version
* `enable`: always enable
* `disable`: always disable
]]
config.runtime.meta =
'Format of the directory name of the meta files.'
config.diagnostics.enable =
"Enable diagnostics."
config.diagnostics.disable =
"Disabled diagnostic (Use code in hover brackets)."
config.diagnostics.globals =
"Defined global variables."
config.diagnostics.severity =
[[
Modify the diagnostic severity.
End with `!` means override the group setting `diagnostics.groupSeverity`.
]]
config.diagnostics.neededFileStatus =
[[
* Opened: only diagnose opened files
* Any: diagnose all files
* None: disable this diagnostic
End with `!` means override the group setting `diagnostics.groupFileStatus`.
]]
config.diagnostics.groupSeverity =
[[
Modify the diagnostic severity in a group.
`Fallback` means that diagnostics in this group are controlled by `diagnostics.severity` separately.
Other settings will override individual settings without end of `!`.
]]
config.diagnostics.groupFileStatus =
[[
Modify the diagnostic needed file status in a group.
* Opened: only diagnose opened files
* Any: diagnose all files
* None: disable this diagnostic
`Fallback` means that diagnostics in this group are controlled by `diagnostics.neededFileStatus` separately.
Other settings will override individual settings without end of `!`.
]]
config.diagnostics.workspaceEvent =
"Set the time to trigger workspace diagnostics."
config.diagnostics.workspaceEvent.OnChange =
"Trigger workspace diagnostics when the file is changed."
config.diagnostics.workspaceEvent.OnSave =
"Trigger workspace diagnostics when the file is saved."
config.diagnostics.workspaceEvent.None =
"Disable workspace diagnostics."
config.diagnostics.workspaceDelay =
"Latency (milliseconds) for workspace diagnostics."
config.diagnostics.workspaceRate =
"Workspace diagnostics run rate (%). Decreasing this value reduces CPU usage, but also reduces the speed of workspace diagnostics. The diagnosis of the file you are currently editing is always done at full speed and is not affected by this setting."
config.diagnostics.libraryFiles =
"How to diagnose files loaded via `Lua.workspace.library`."
config.diagnostics.libraryFiles.Enable =
"Always diagnose these files."
config.diagnostics.libraryFiles.Opened =
"Only when these files are opened will it be diagnosed."
config.diagnostics.libraryFiles.Disable =
"These files are not diagnosed."
config.diagnostics.ignoredFiles =
"How to diagnose ignored files."
config.diagnostics.ignoredFiles.Enable =
"Always diagnose these files."
config.diagnostics.ignoredFiles.Opened =
"Only when these files are opened will it be diagnosed."
config.diagnostics.ignoredFiles.Disable =
"These files are not diagnosed."
config.diagnostics.disableScheme =
'Do not diagnose Lua files that use the following scheme.'
config.diagnostics.unusedLocalExclude =
'Do not diagnose `unused-local` when the variable name matches the following pattern.'
config.workspace.ignoreDir =
"Ignored files and directories (Use `.gitignore` grammar)."-- .. example.ignoreDir,
config.workspace.ignoreSubmodules =
"Ignore submodules."
config.workspace.useGitIgnore =
"Ignore files list in `.gitignore` ."
config.workspace.maxPreload =
"Max preloaded files."
config.workspace.preloadFileSize =
"Skip files larger than this value (KB) when preloading."
config.workspace.library =
"In addition to the current workspace, which directories will load files from. The files in these directories will be treated as externally provided code libraries, and some features (such as renaming fields) will not modify these files."
config.workspace.checkThirdParty =
[[
Automatic detection and adaptation of third-party libraries, currently supported libraries are:
* OpenResty
* Cocos4.0
* LÖVE
* LÖVR
* skynet
* Jass
]]
config.workspace.userThirdParty =
'Add private third-party library configuration file paths here, please refer to the built-in [configuration file path](https://github.com/LuaLS/lua-language-server/tree/master/meta/3rd)'
config.workspace.supportScheme =
'Provide language server for the Lua files of the following scheme.'
config.completion.enable =
'Enable completion.'
config.completion.callSnippet =
'Shows function call snippets.'
config.completion.callSnippet.Disable =
"Only shows `function name`."
config.completion.callSnippet.Both =
"Shows `function name` and `call snippet`."
config.completion.callSnippet.Replace =
"Only shows `call snippet.`"
config.completion.keywordSnippet =
'Shows keyword syntax snippets.'
config.completion.keywordSnippet.Disable =
"Only shows `keyword`."
config.completion.keywordSnippet.Both =
"Shows `keyword` and `syntax snippet`."
config.completion.keywordSnippet.Replace =
"Only shows `syntax snippet`."
config.completion.displayContext =
"Previewing the relevant code snippet of the suggestion may help you understand the usage of the suggestion. The number set indicates the number of intercepted lines in the code fragment. If it is set to `0`, this feature can be disabled."
config.completion.workspaceWord =
"Whether the displayed context word contains the content of other files in the workspace."
config.completion.showWord =
"Show contextual words in suggestions."
config.completion.showWord.Enable =
"Always show context words in suggestions."
config.completion.showWord.Fallback =
"Contextual words are only displayed when suggestions based on semantics cannot be provided."
config.completion.showWord.Disable =
"Do not display context words."
config.completion.autoRequire =
"When the input looks like a file name, automatically `require` this file."
config.completion.showParams =
"Display parameters in completion list. When the function has multiple definitions, they will be displayed separately."
config.completion.requireSeparator =
"The separator used when `require`."
config.completion.postfix =
"The symbol used to trigger the postfix suggestion."
config.color.mode =
"Color mode."
config.color.mode.Semantic =
"Semantic color. You may need to set `editor.semanticHighlighting.enabled` to `true` to take effect."
config.color.mode.SemanticEnhanced =
"Enhanced semantic color. Like `Semantic`, but with additional analysis which might be more computationally expensive."
config.color.mode.Grammar =
"Grammar color."
config.semantic.enable =
"Enable semantic color. You may need to set `editor.semanticHighlighting.enabled` to `true` to take effect."
config.semantic.variable =
"Semantic coloring of variables/fields/parameters."
config.semantic.annotation =
"Semantic coloring of type annotations."
config.semantic.keyword =
"Semantic coloring of keywords/literals/operators. You only need to enable this feature if your editor cannot do syntax coloring."
config.signatureHelp.enable =
"Enable signature help."
config.hover.enable =
"Enable hover."
config.hover.viewString =
"Hover to view the contents of a string (only if the literal contains an escape character)."
config.hover.viewStringMax =
"The maximum length of a hover to view the contents of a string."
config.hover.viewNumber =
"Hover to view numeric content (only if literal is not decimal)."
config.hover.fieldInfer =
"When hovering to view a table, type infer will be performed for each field. When the accumulated time of type infer reaches the set value (MS), the type infer of subsequent fields will be skipped."
config.hover.previewFields =
"When hovering to view a table, limits the maximum number of previews for fields."
config.hover.enumsLimit =
"When the value corresponds to multiple types, limit the number of types displaying."
config.hover.expandAlias =
[[
Whether to expand the alias. For example, expands `---@alias myType boolean|number` appears as `boolean|number`, otherwise it appears as `myType'.
]]
config.develop.enable =
'Developer mode. Do not enable, performance will be affected.'
config.develop.debuggerPort =
'Listen port of debugger.'
config.develop.debuggerWait =
'Suspend before debugger connects.'
config.intelliSense.searchDepth =
'Set the search depth for IntelliSense. Increasing this value increases accuracy, but decreases performance. Different workspace have different tolerance for this setting. Please adjust it to the appropriate value.'
config.intelliSense.fastGlobal =
'In the global variable completion, and view `_G` suspension prompt. This will slightly reduce the accuracy of type speculation, but it will have a significant performance improvement for projects that use a lot of global variables.'
config.window.statusBar =
'Show extension status in status bar.'
config.window.progressBar =
'Show progress bar in status bar.'
config.hint.enable =
'Enable inlay hint.'
config.hint.paramType =
'Show type hints at the parameter of the function.'
config.hint.setType =
'Show hints of type at assignment operation.'
config.hint.paramName =
'Show hints of parameter name at the function call.'
config.hint.paramName.All =
'All types of parameters are shown.'
config.hint.paramName.Literal =
'Only literal type parameters are shown.'
config.hint.paramName.Disable =
'Disable parameter hints.'
config.hint.arrayIndex =
'Show hints of array index when constructing a table.'
config.hint.arrayIndex.Enable =
'Show hints in all tables.'
config.hint.arrayIndex.Auto =
'Show hints only when the table is greater than 3 items, or the table is a mixed table.'
config.hint.arrayIndex.Disable =
'Disable hints of array index.'
config.hint.await =
'If the called function is marked `---@async`, prompt `await` at the call.'
config.hint.semicolon =
'If there is no semicolon at the end of the statement, display a virtual semicolon.'
config.hint.semicolon.All =
'All statements display virtual semicolons.'
config.hint.semicolon.SameLine =
'When two statements are on the same line, display a semicolon between them.'
config.hint.semicolon.Disable =
'Disable virtual semicolons.'
config.codeLens.enable =
'Enable code lens.'
config.format.enable =
'Enable code formatter.'
config.format.defaultConfig =
[[
The default format configuration. Has a lower priority than `.editorconfig` file in the workspace.
Read [formatter docs](https://github.com/CppCXY/EmmyLuaCodeStyle/tree/master/docs) to learn usage.
]]
config.spell.dict =
'Custom words for spell checking.'
config.nameStyle.config =
'Set name style config'
config.telemetry.enable =
[[
Enable telemetry to send your editor information and error logs over the network. Read our privacy policy [here](https://github.com/LuaLS/lua-language-server/wiki/Home#privacy).
]]
config.misc.parameters =
'[Command line parameters](https://github.com/LuaLS/lua-telemetry-server/tree/master/method) when starting the language server in VSCode.'
config.misc.executablePath =
'Specify the executable path in VSCode.'
config.IntelliSense.traceLocalSet =
'Please read [wiki](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features) to learn more.'
config.IntelliSense.traceReturn =
'Please read [wiki](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features) to learn more.'
config.IntelliSense.traceBeSetted =
'Please read [wiki](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features) to learn more.'
config.IntelliSense.traceFieldInject =
'Please read [wiki](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features) to learn more.'
config.type.castNumberToInteger =
'Allowed to assign the `number` type to the `integer` type.'
config.type.weakUnionCheck =
[[
Once one subtype of a union type meets the condition, the union type also meets the condition.
When this setting is `false`, the `number|boolean` type cannot be assigned to the `number` type. It can be with `true`.
]]
config.type.weakNilCheck =
[[
When checking the type of union type, ignore the `nil` in it.
When this setting is `false`, the `number|nil` type cannot be assigned to the `number` type. It can be with `true`.
]]
config.doc.privateName =
'Treat specific field names as private, e.g. `m_*` means `XXX.m_id` and `XXX.m_type` are private, witch can only be accessed in the class where the definition is located.'
config.doc.protectedName =
'Treat specific field names as protected, e.g. `m_*` means `XXX.m_id` and `XXX.m_type` are protected, witch can only be accessed in the class where the definition is located and its subclasses.'
config.doc.packageName =
'Treat specific field names as package, e.g. `m_*` means `XXX.m_id` and `XXX.m_type` are package, witch can only be accessed in the file where the definition is located.'
config.diagnostics['unused-local'] =
'Enable unused local variable diagnostics.'
config.diagnostics['unused-function'] =
'Enable unused function diagnostics.'
config.diagnostics['undefined-global'] =
'Enable undefined global variable diagnostics.'
config.diagnostics['global-in-nil-env'] =
'Enable cannot use global variables `_ENV` is set to `nil` diagnostics.'
config.diagnostics['unused-label'] =
'Enable unused label diagnostics.'
config.diagnostics['unused-vararg'] =
'Enable unused vararg diagnostics.'
config.diagnostics['trailing-space'] =
'Enable trailing space diagnostics.'
config.diagnostics['redefined-local'] =
'Enable redefined local variable diagnostics.'
config.diagnostics['newline-call'] =
'Enable newline call diagnostics. Is\'s raised when a line starting with `(` is encountered, which is syntactically parsed as a function call on the previous line.'
config.diagnostics['newfield-call'] =
'Enable newfield call diagnostics. It is raised when the parenthesis of a function call appear on the following line when defining a field in a table.'
config.diagnostics['redundant-parameter'] =
'Enable redundant function parameter diagnostics.'
config.diagnostics['ambiguity-1'] =
'Enable ambiguous operator precedence diagnostics. For example, the `num or 0 + 1` expression will be suggested `(num or 0) + 1` instead.'
config.diagnostics['lowercase-global'] =
'Enable lowercase global variable definition diagnostics.'
config.diagnostics['undefined-env-child'] =
'Enable undefined environment variable diagnostics. It\'s raised when `_ENV` table is set to a new literal table, but the used global variable is no longer present in the global environment.'
config.diagnostics['duplicate-index'] =
'Enable duplicate table index diagnostics.'
config.diagnostics['empty-block'] =
'Enable empty code block diagnostics.'
config.diagnostics['redundant-value'] =
'Enable the redundant values assigned diagnostics. It\'s raised during assignment operation, when the number of values is higher than the number of objects being assigned.'
config.diagnostics['assign-type-mismatch'] =
'Enable diagnostics for assignments in which the value\'s type does not match the type of the assigned variable.'
config.diagnostics['await-in-sync'] =
'Enable diagnostics for calls of asynchronous functions within a synchronous function.'
config.diagnostics['cast-local-type'] =
'Enable diagnostics for casts of local variables where the target type does not match the defined type.'
config.diagnostics['cast-type-mismatch'] =
'Enable diagnostics for casts where the target type does not match the initial type.'
config.diagnostics['circular-doc-class'] =
'Enable diagnostics for two classes inheriting from each other introducing a circular relation.'
config.diagnostics['close-non-object'] =
'Enable diagnostics for attempts to close a variable with a non-object.'
config.diagnostics['code-after-break'] =
'Enable diagnostics for code placed after a break statement in a loop.'
config.diagnostics['codestyle-check'] =
'Enable diagnostics for incorrectly styled lines.'
config.diagnostics['count-down-loop'] =
'Enable diagnostics for `for` loops which will never reach their max/limit because the loop is incrementing instead of decrementing.'
config.diagnostics['deprecated'] =
'Enable diagnostics to highlight deprecated API.'
config.diagnostics['different-requires'] =
'Enable diagnostics for files which are required by two different paths.'
config.diagnostics['discard-returns'] =
'Enable diagnostics for calls of functions annotated with `---@nodiscard` where the return values are ignored.'
config.diagnostics['doc-field-no-class'] =
'Enable diagnostics to highlight a field annotation without a defining class annotation.'
config.diagnostics['duplicate-doc-alias'] =
'Enable diagnostics for a duplicated alias annotation name.'
config.diagnostics['duplicate-doc-field'] =
'Enable diagnostics for a duplicated field annotation name.'
config.diagnostics['duplicate-doc-param'] =
'Enable diagnostics for a duplicated param annotation name.'
config.diagnostics['duplicate-set-field'] =
'Enable diagnostics for setting the same field in a class more than once.'
config.diagnostics['incomplete-signature-doc'] =
'Incomplete @param or @return annotations for functions.'
config.diagnostics['invisible'] =
'Enable diagnostics for accesses to fields which are invisible.'
config.diagnostics['missing-global-doc'] =
'Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.'
config.diagnostics['missing-local-export-doc'] =
'Missing annotations for exported locals! Exported local functions must have a comment and annotations for all parameters and return values.'
config.diagnostics['missing-parameter'] =
'Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.'
config.diagnostics['missing-return'] =
'Enable diagnostics for functions with return annotations which have no return statement.'
config.diagnostics['missing-return-value'] =
'Enable diagnostics for return statements without values although the containing function declares returns.'
config.diagnostics['need-check-nil'] =
'Enable diagnostics for variable usages if `nil` or an optional (potentially `nil`) value was assigned to the variable before.'
config.diagnostics['no-unknown'] =
'Enable diagnostics for cases in which the type cannot be inferred.'
config.diagnostics['not-yieldable'] =
'Enable diagnostics for calls to `coroutine.yield()` when it is not permitted.'
config.diagnostics['param-type-mismatch'] =
'Enable diagnostics for function calls where the type of a provided parameter does not match the type of the annotated function definition.'
config.diagnostics['redundant-return'] =
'Enable diagnostics for return statements which are not needed because the function would exit on its own.'
config.diagnostics['redundant-return-value']=
'Enable diagnostics for return statements which return an extra value which is not specified by a return annotation.'
config.diagnostics['return-type-mismatch'] =
'Enable diagnostics for return values whose type does not match the type declared in the corresponding return annotation.'
config.diagnostics['spell-check'] =
'Enable diagnostics for typos in strings.'
config.diagnostics['name-style-check'] =
'Enable diagnostics for name style.'
config.diagnostics['unbalanced-assignments']=
'Enable diagnostics on multiple assignments if not all variables obtain a value (e.g., `local x,y = 1`).'
config.diagnostics['undefined-doc-class'] =
'Enable diagnostics for class annotations in which an undefined class is referenced.'
config.diagnostics['undefined-doc-name'] =
'Enable diagnostics for type annotations referencing an undefined type or alias.'
config.diagnostics['undefined-doc-param'] =
'Enable diagnostics for cases in which a parameter annotation is given without declaring the parameter in the function definition.'
config.diagnostics['undefined-field'] =
'Enable diagnostics for cases in which an undefined field of a variable is read.'
config.diagnostics['unknown-cast-variable'] =
'Enable diagnostics for casts of undefined variables.'
config.diagnostics['unknown-diag-code'] =
'Enable diagnostics in cases in which an unknown diagnostics code is entered.'
config.diagnostics['unknown-operator'] =
'Enable diagnostics for unknown operators.'
config.diagnostics['unreachable-code'] =
'Enable diagnostics for unreachable code.'
config.diagnostics['global-element'] =
'Enable diagnostics to warn about global elements.'
config.typeFormat.config =
'Configures the formatting behavior while typing Lua code.'
config.typeFormat.config.auto_complete_end =
'Controls if `end` is automatically completed at suitable positions.'
config.typeFormat.config.auto_complete_table_sep =
'Controls if a separator is automatically appended at the end of a table declaration.'
config.typeFormat.config.format_line =
'Controls if a line is formatted at all.'
command.exportDocument =
'Lua: Export Document ...'
command.addon_manager.open =
'Lua: Open Addon Manager ...'
command.reloadFFIMeta =
'Lua: Reload luajit ffi meta'

View File

@ -1,764 +0,0 @@
---@diagnostic disable: undefined-global, lowercase-global
arg =
'Argumentos de inicialização para a versão standalone da linguagem Lua.'
assert =
'Emite um erro se o valor de seu argumento v for falso (i.e., `nil` ou `false`); caso contrário, devolve todos os seus argumentos. Em caso de erro, `message` é o objeto de erro que, quando ausente, por padrão é `"assertion failed!"`'
cgopt.collect =
'Realiza um ciclo completo de coleta de lixo (i.e., garbage-collection cycle).'
cgopt.stop =
'Interrompe a execução automática.'
cgopt.restart =
'Reinicia a execução automática.'
cgopt.count =
'Retorna, em Kbytes, a quantidade total de memória utilizada pela linguagem Lua.'
cgopt.step =
'Executa a coleta de lixo (i.e., garbage-collection) em uma única etapa. A quantidade de execuções por etapa é controlada via `arg`.'
cgopt.setpause =
'Estabelece pausa. Defina via `arg` o intervalo de pausa do coletor de lixo (i.e., garbage-collection).'
cgopt.setstepmul =
'Estabelece um multiplicador para etapa de coleta de lixo (i.e., garbage-collection). Defina via `arg` o valor multiplicador.'
cgopt.incremental =
'Altera o modo do coletor para incremental.'
cgopt.generational =
'Altera o modo do coletor para geracional.'
cgopt.isrunning =
'Retorna um valor booleano indicando se o coletor de lixo (i.e., garbage-collection) está em execução.'
collectgarbage =
'Esta função é uma interface genérica para o coletor de lixo (i.e., garbage-collection). Ela executa diferentes funções de acordo com seu primeiro argumento, `opt`.'
dofile =
'Abre o arquivo fornecido por argumento e executa seu conteúdo como código Lua. Quando chamado sem argumentos, `dofile` executa o conteúdo da entrada padrão (`stdin`). Retorna todos os valores retornados pelo trecho de código contido no arquivo. Em caso de erros, o `dofile` propaga o erro para seu chamador. Ou seja, o `dofile` não funciona em modo protegido.'
error =
[[
Termina a última chamada de função protegida e retorna `message` como objeto de `erro`.
Normalmente, o 'erro' adiciona algumas informações sobre a localização do erro no início da mensagem, quando a mensagem for uma string.
]]
_G =
'Uma variável global (não uma função) que detém o ambiente global (ver §2.2). Lua em si não usa esta variável; mudar seu valor não afeta nenhum ambiente e vice-versa.'
getfenv =
'Retorna o ambiente atual em uso pela função. O `f` pode ser uma função Lua ou um número que especifica a função naquele nível de pilha.'
getmetatable =
'Se o objeto não tiver uma metatable, o retorno é `nil`. Mas caso a metatable do objeto tenha um campo `__metatable`, é retornado o valor associado. Caso contrário, retorna a metatable do objeto dado.'
ipairs =
[[
Retorna três valores (uma função iteradora, a tabela `t`, e `0`) para que a seguinte construção
```lua
for i,v in ipairs(t) do body end
```
possa iterar sobre os pares de valor-chave `(1,t[1]), (2,t[2]), ...`, até o primeiro índice ausente.
]]
loadmode.b =
'Somente blocos binários.'
loadmode.t =
'Somente blocos de texto.'
loadmode.bt =
'Tanto binário quanto texto.'
load['<5.1'] =
'Carrega um bloco utilizando a função `func` para obter suas partes. Cada chamada para o `func` deve retornar uma string que é concatenada com os resultados anteriores.'
load['>5.2'] =
[[
Carrega um bloco.
Se o bloco (i.e., `chunk`) é uma string, o bloco é essa string. Se o bloco é uma função, a função "load" é chamada repetidamente para obter suas partes. Cada chamada para o bloco deve retornar uma string que é concatenada com os resultados anteriores. O fim do bloco é sinalizado com o retorno de uma string vazia ou `nil`.
]]
loadfile =
'Carrega um bloco de arquivo `filename` ou da entrada padrão, se nenhum nome de arquivo for dado.'
loadstring =
'Carrega um bloco a partir de uma string dada.'
module =
'Cria um módulo.'
next =
[[
Permite que um programa percorra todos os campos de uma tabela. Seu primeiro argumento é uma tabela e seu segundo argumento é um índice nesta tabela. Uma chamada `next` retorna o próximo índice da tabela e seu valor associado. Quando chamado usando `nil` como segundo argumento, `next` retorna um índice inicial e seu valor associado. Quando chamado com o último índice, ou com `nil` em uma tabela vazia, o `next` retorna o `nil`. Se o segundo argumento estiver ausente, então é interpretado como `nil`. Portanto, pode-se utilizar o `next(t)` para verificar se uma tabela está vazia.
A ordem na qual os índices são enumerados não é especificada, *mesmo para índices numéricos*. (Para percorrer uma tabela em ordem numérica, utilize um `for`).
O comportamento do `next` é indefinido se, durante a iteração/travessia, você atribuir qualquer valor a um campo inexistente na tabela. Você pode, entretanto, modificar os campos existentes e pode, inclusive, os definir como nulos.
]]
pairs =
[[
Se `t` tem um "meta" método (i.e., metamethod) `__pairs`, a chamada é feita usando t como argumento e retorna os três primeiros resultados.
Caso contrário, retorna três valores: a função $next, a tabela `t` e `nil`, para que a seguinte construção
```lua
for k,v in pairs(t) do body end
```
possa iterar sobre todos os pares de valor-chave da tabela 't'.
Veja a função $next para saber as ressalvas em modificar uma tabela durante sua iteração.
]]
pcall =
[[
Chama a função `f` com os argumentos dados em modo *protegido*. Isto significa que qualquer erro dentro de `f` não é propagado; em vez disso, o `pcall` captura o erro e retorna um código de status. Seu primeiro resultado é o código de status (booleano), que é verdadeiro se a chamada for bem sucedida sem erros. Neste caso, `pcall' também retorna todos os resultados da chamada, após este primeiro resultado. Em caso de qualquer erro, `pcall` retorna `false` mais o objeto de erro.
]]
print =
[[
Recebe qualquer número de argumentos e imprime seus valores na saída padrão `stdout`, convertendo cada argumento em uma string seguindo as mesmas regras do $tostring.
A função `print` não é destinada à saída formatada, mas apenas como uma forma rápida de mostrar um valor, por exemplo, para debugging. Para controle completo sobre a saída, use $string.format e $io.write.
]]
rawequal =
'Verifica se v1 é igual a v2, sem invocar a metatable `__eq`.'
rawget =
'Obtém o valor real de `table[index]`, sem invocar a metatable `__index`.'
rawlen =
'Retorna o comprimento do objeto `v`, sem invocar a metatable `__len`.'
rawset =
[[
Define o valor real de `table[index]` para `value`, sem utilizar o metavalue `__newindex`. `table` deve ser uma tabela, `index` qualquer valor diferente de `nil` e `NaN`, e `value` qualquer valor de tipos do Lua.
Esta função retorna uma `table`.
]]
select =
'Se `index` é um número, retorna todos os argumentos após o número do argumento `index`; um número negativo de índices do final (`-1` é o último argumento). Caso contrário, `index` deve ser a string `"#"`, e `select` retorna o número total de argumentos extras dados.'
setfenv =
'Define o ambiente a ser utilizado pela função em questão.'
setmetatable =
[[
Define a metatable para a tabela dada. Se `metatabela` for `nil`, remove a metatable da tabela em questão. Se a metatable original tiver um campo `__metatable', um erro é lançado.
Esta função retorna uma `table`.
Para alterar a metatable de outros tipos do código Lua, você deve utilizar a biblioteca de debugging (§6.10).
]]
tonumber =
[[
Quando chamado sem a base, `tonumber` tenta converter seu argumento para um número. Se o argumento for um número ou uma string numérica, então `tonumber` retorna este número; caso contrário, retorna `fail`.
A conversão de strings pode resultar em números inteiros ou de ponto flutuante, de acordo com as convenções lexicais de Lua (ver §3.1). A string pode ter espaços antes e depois e um sinal.
]]
tostring =
[[
Recebe um valor de qualquer tipo e o converte em uma string em formato legível por humanos.
Se a metatable de `v` tem um campo `__tostring', então `tostring' chama o valor correspondente usando `v` como argumento, e utiliza o resultado da chamada como seu resultado. Caso contrário, se a metatable de `v` tiver um campo `__name` com um valor do tipo string, `tostring` pode utilizar essa string em seu resultado final.
Para controle completo de como os números são convertidos, utilize $string.format.
]]
type =
[[
Retorna o tipo de seu único argumento, codificado como uma string. Os resultados possíveis desta função são `"nil"` (uma string, não o valor `nil`), `"number"`, `"string"`, `"boolean"`, `"table"`, `"function"`, `"thread"`, e `"userdata"`.
]]
_VERSION =
'Uma variável global (não uma função) que contém uma string contendo a versão Lua em execução.'
warn =
'Emite um aviso com uma mensagem composta pela concatenação de todos os seus argumentos (que devem ser strings).'
xpcall['=5.1'] =
'Faz chamada a função `f` com os argumentos dados e em modo protegido, usando um manipulador de mensagens dado.'
xpcall['>5.2'] =
'Faz chamada a função `f` com os argumentos dados e em modo protegido, usando um manipulador de mensagens dado.'
unpack =
[[
Retorna os elementos da lista dada. Esta função é equivalente a
```lua
return list[i], list[i+1], ···, list[j]
```
]]
bit32 =
''
bit32.arshift =
[[
Retorna o número `x` deslocado `disp` bits para a direita. Deslocamentos negativos movem os bits para a esquerda.
Esta operação de deslocamento é chamada de deslocamento aritmético. Os bits vagos à esquerda são preenchidos com cópias do bit mais significativo de `x`; os bits vagos à direita são preenchidos com zeros.
]]
bit32.band =
'Retorna a operação bitwise *and* de seus operandos.'
bit32.bnot =
[[
Retorna a negação da operação bitwise de `x`.
```lua
assert(bit32.bnot(x) ==
(-1 - x) % 2^32)
```
]]
bit32.bor =
'Retorna a operação bitwise *or* de seus operandos.'
bit32.btest =
'Retorna um valor booleano verdadeiro se a operação bitwise *and* de seus operandos for diferente de zero. Falso, caso contrário.'
bit32.bxor =
'Retorna a operação bitwise *exclusive or* de seus operandos.'
bit32.extract =
'Retorna o número formado pelos bits de `field` a `field + width - 1` de `n`, sem sinal.'
bit32.replace =
'Retorna uma cópia de `n` com os bits de `field` a `field + width - 1` substituídos pelo valor `v` .'
bit32.lrotate =
'Retorna o número `x` rotacionado `disp` bits para a esquerda. Rotações negativos movem os bits para a direita. '
bit32.lshift =
[[
Retorna o número `x` deslocado `disp` bits para a esquerda. Deslocamentos negativos movem os bits para a direita. Em ambas as direções, os bits vazios/vagos são preenchidos com zeros.
```lua
assert(bit32.lshift(b, disp) ==
(b * 2^disp) % 2^32)
```
]]
bit32.rrotate =
'Retorna o número `x` rotacionado `disp` bits para a direita. Deslocamentos negativos movem os bits para a esquerda.'
bit32.rshift =
[[
Retorna o número `x` deslocado `disp` bits para a direita. Deslocamentos negativos movem os bits para a esquerda. Em ambas as direções, os bits vazios são preenchidos com zeros.
```lua
assert(bit32.rshift(b, disp) ==
math.floor(b % 2^32 / 2^disp))
```
]]
coroutine =
''
coroutine.create =
'Cria uma nova `coroutine`, a partir de uma função `f` e retorna esta coroutine como objeto do tipo `"thread"`.'
coroutine.isyieldable =
'Retorna verdadeiro quando a `coroutine` em execução for finalizada.'
coroutine.isyieldable['>5.4']=
'Retorna verdadeiro quando a `coroutine` `co` for finalizada. Por padrão `co` é uma coroutine em execução.'
coroutine.close =
'Finaliza a coroutine `co` , encerrando todas as variáveis pendentes e colocando a coroutine em um estado morto.'
coroutine.resume =
'Inicia ou continua a execução da coroutine `co`.'
coroutine.running =
'Retorna a `coroutine` corrente e um booleana verdadeiro quando a coroutine corrente é a principal.'
coroutine.status =
'Retorna o status da `coroutine `co`.'
coroutine.wrap =
'Cria uma nova `coroutine`, a partir de uma função `f` e retorna uma função que retorna a coroutine cada vez que ele é chamado.'
coroutine.yield =
'Suspende a execução da coroutine chamada.'
costatus.running =
'Está em execução.'
costatus.suspended =
'Está suspenso ou não foi iniciado.'
costatus.normal =
'Está ativo, mas não está em execução.'
costatus.dead =
'Terminou ou parou devido a erro'
debug =
''
debug.debug =
'Entra em modo interativo com o usuário, executando os comandos de entrada.'
debug.getfenv =
'Retorna o ambiente do objeto `o` .'
debug.gethook =
'Retorna as configurações do `hook` atual da `thread`.'
debug.getinfo =
'Retorna uma tabela com informações sobre uma função.'
debug.getlocal['<5.1'] =
'Retorna o nome e o valor da variável local com índice `local` da função de nível `level` da pilha.'
debug.getlocal['>5.2'] =
'Retorna o nome e o valor da variável local com índice `local` da função de nível `f` da pilha.'
debug.getmetatable =
'Retorna a `metatable` do valor dado.'
debug.getregistry =
'Retorna a tabela de registro.'
debug.getupvalue =
'Retorna o nome e o valor da variável antecedente com índice `up` da função.'
debug.getuservalue['<5.3'] =
'Retorna o valor de Lua associado a `u` (i.e., user).'
debug.getuservalue['>5.4'] =
[[
Retorna o `n`-ésimo valor de usuário associado
aos dados do usuário `u` e um booleano,
`false`, se nos dados do usuário não existir esse valor.
]]
debug.setcstacklimit =
[[
### **Deprecated in `Lua 5.4.2`**
Estabelece um novo limite para a pilha C. Este limite controla quão profundamente as chamadas aninhadas podem ir em Lua, com a intenção de evitar um transbordamento da pilha.
Em caso de sucesso, esta função retorna o antigo limite. Em caso de erro, ela retorna `false`.
]]
debug.setfenv =
'Define o ambiente do `object` dado para a `table` dada .'
debug.sethook =
'Define a função dada como um `hook`.'
debug.setlocal =
'Atribui o valor `value` à variável local com índice `local` da função de nível `level` da pilha.'
debug.setmetatable =
'Define a `metatable` com o valor dado para tabela dada (que pode ser `nil`).'
debug.setupvalue =
'Atribui `value` a variável antecedente com índice `up` da função.'
debug.setuservalue['<5.3'] =
'Define o valor dado como o valor Lua associado ao `udata` (i.e., user data).'
debug.setuservalue['>5.4'] =
[[
Define o valor dado como
o `n`-ésimo valor de usuário associado ao `udata` (i.e., user data).
O `udata` deve ser um dado de usuário completo.
]]
debug.traceback =
'Retorna uma string com um `traceback` de chamadas. A string de mensagen (opcional) é anexada no início do traceback.'
debug.upvalueid =
'Retorna um identificador único (como um dado de usuário leve) para o valor antecedente de numero `n` da função dada.'
debug.upvaluejoin =
'Faz o `n1`-ésimo valor da função `f1` (i.e., closure Lua) referir-se ao `n2`-ésimo valor da função `f2`.'
infowhat.n =
'`name` e `namewhat`'
infowhat.S =
'`source`, `short_src`, `linedefined`, `lastlinedefined` e `what`'
infowhat.l =
'`currentline`'
infowhat.t =
'`istailcall`'
infowhat.u['<5.1'] =
'`nups`'
infowhat.u['>5.2'] =
'`nups`, `nparams` e `isvararg`'
infowhat.f =
'`func`'
infowhat.r =
'`ftransfer` e `ntransfer`'
infowhat.L =
'`activelines`'
hookmask.c =
'Faz chamada a um `hook` quando o Lua chama uma função.'
hookmask.r =
'Faz chamada a um `hook` quando o retorno de uma função é executado.'
hookmask.l =
'Faz chamada a um `hook` quando encontra nova linha de código.'
file =
''
file[':close'] =
'Fecha o arquivo `file`.'
file[':flush'] =
'Salva qualquer dado de entrada no arquivo `file`.'
file[':lines'] =
[[
------
```lua
for c in file:lines(...) do
body
end
```
]]
file[':read'] =
'Lê o arquivo de acordo com o formato fornecido e que especifica o que deve ser lido.'
file[':seek'] =
'Define e obtém a posição do arquivo, medida a partir do início do arquivo.'
file[':setvbuf'] =
'Define o modo de `buffer` para um arquivo de saída.'
file[':write'] =
'Escreve o valor de cada um de seus argumentos no arquivo.'
readmode.n =
'Lê um numeral e o devolve como número.'
readmode.a =
'Lê o arquivo completo.'
readmode.l =
'Lê a próxima linha pulando o final da linha.'
readmode.L =
'Lê a próxima linha mantendo o final da linha.'
seekwhence.set =
'O cursor base é o início do arquivo.'
seekwhence.cur =
'O cursor base é a posição atual.'
seekwhence['.end'] =
'O cursor base é o final do arquivo.'
vbuf.no =
'A saída da operação aparece imediatamente.'
vbuf.full =
'Realizado apenas quando o `buffer` está cheio.'
vbuf.line =
'`Buffered` até que uma nova linha seja encontrada.'
io =
''
io.stdin =
'Entrada padrão.'
io.stdout =
'Saída padrão.'
io.stderr =
'Erro padrão.'
io.close =
'Fecha o arquivo dado ou o arquivo de saída padrão.'
io.flush =
'Salva todos os dados gravados no arquivo de saída padrão.'
io.input =
'Define o arquivo de entrada padrão.'
io.lines =
[[
------
```lua
for c in io.lines(filename, ...) do
body
end
```
]]
io.open =
'Abre um arquivo no modo especificado pela *string* `mode`.'
io.output =
'Define o arquivo de saída padrão.'
io.popen =
'Inicia o programa dado em um processo separado.'
io.read =
'Lê o arquivo de acordo com o formato fornecido e que especifica o que deve ser lido.'
io.tmpfile =
'Em caso de sucesso, retorna um `handler` para um arquivo temporário.'
io.type =
'Verifica se `obj` é um identificador de arquivo válido.'
io.write =
'Escreve o valor de cada um dos seus argumentos para o arquivo de saída padrão.'
openmode.r =
'Modo de leitura.'
openmode.w =
'Modo de escrita.'
openmode.a =
'Modo de anexação.'
openmode['.r+'] =
'Modo de atualização, todos os dados anteriores são preservados.'
openmode['.w+'] =
'Modo de atualização, todos os dados anteriores são apagados.'
openmode['.a+'] =
'Modo de anexação e atualização, os dados anteriores são preservados, a escrita só é permitida no final do arquivo.'
openmode.rb =
'Modo de leitura. (em modo binário)'
openmode.wb =
'Modo de escrita. (em modo binário)'
openmode.ab =
'Modo de anexação. (em modo binário)'
openmode['.r+b'] =
'Modo de atualização, todos os dados anteriores são preservados. (em modo binário)'
openmode['.w+b'] =
'Modo de atualização, todos os dados anteriores são apagados. (em modo binário)'
openmode['.a+b'] =
'Modo de anexação e atualização, todos os dados anteriores são preservados, a escrita só é permitida no final do arquivo. (em modo binário)'
popenmode.r =
'Leia dados deste programa pelo arquivo.'
popenmode.w =
'Escreva dados neste programa pelo arquivo.'
filetype.file =
'`handler` para arquivo aberto.'
filetype['.closed file'] =
'`handler` para arquivo fechado.'
filetype['.nil'] =
'Não é um `handler` de arquivo'
math =
''
math.abs =
'Retorna o valor absoluto de `x`.'
math.acos =
'Retorna o arco cosseno de `x` (em radianos).'
math.asin =
'Retorna o arco seno de `x` (em radianos).'
math.atan['<5.2'] =
'Retorna o arco tangente de `x` (em radianos).'
math.atan['>5.3'] =
'Retorna o arco tangente de `y/x` (em radianos).'
math.atan2 =
'Retorna o arco tangente de `y/x` (em radianos).'
math.ceil =
'Retorna o menor valor inteiro maior ou igual a `x`.'
math.cos =
'Retorna o cosseno de `x` (requer valor em radianos).'
math.cosh =
'Retorna o cosseno hiperbólico de `x` (requer valor em radianos).'
math.deg =
'Converte o ângulo `x` de radianos para graus.'
math.exp =
'Retorna o valor `e^x` (onde `e` é a base do logaritmo natural).'
math.floor =
'Retorna o maior valor inteiro menor ou igual a `x`.'
math.fmod =
'Retorna o resto da divisão de `x` por `y` que arredonda o quociente para zero.'
math.frexp =
'Decompõe `x` em fatores e expoentes. Retorna `m` e `e` tal que `x = m * (2 ^ e)` é um inteiro e o valor absoluto de `m` está no intervalo [0,5, 1) (ou zero quando `x` é zero).'
math.huge =
'Um valor maior que qualquer outro valor numérico.'
math.ldexp =
'Retorna `m * (2 ^ e)`.'
math.log['<5.1'] =
'Retorna o logaritmo natural de `x`.'
math.log['>5.2'] =
'Retorna o logaritmo de `x` na base dada.'
math.log10 =
'Retorna o logaritmo `x` na base 10.'
math.max =
'Retorna o argumento com o valor máximo de acordo com o operador `<`.'
math.maxinteger =
'Retorna o valor máximo para um inteiro.'
math.min =
'Retorna o argumento com o valor mínimo de acordo com o operador `<`.'
math.mininteger =
'Retorna o valor mínimo para um inteiro.'
math.modf =
'Retorna a parte inteira e a parte fracionária de `x`.'
math.pi =
'O valor de *π*.'
math.pow =
'Retorna `x ^ y`.'
math.rad =
'Converte o ângulo `x` de graus para radianos.'
math.random =
[[
* `math.random()`: Retorna um valor real (i.e., ponto flutuante) no intervalo [0,1).
* `math.random(n)`: Retorna um inteiro no intervalo [1, n].
* `math.random(m, n)`: Retorna um inteiro no intervalo [m, n].
]]
math.randomseed['<5.3'] =
'Define `x` como valor semente (i.e., `seed`) para a função geradora de números pseudo-aleatória.'
math.randomseed['>5.4'] =
[[
* `math.randomseed(x, y)`: Concatena `x` e `y` em um espaço de 128-bits que é usado como valor semente (`seed`) para reinicializar o gerador de números pseudo-aleatório.
* `math.randomseed(x)`: Equivale a `math.randomseed(x, 0)` .
* `math.randomseed()`: Gera um valor semente (i.e., `seed`) com fraca probabilidade de aleatoriedade.
]]
math.sin =
'Retorna o seno de `x` (requer valor em radianos).'
math.sinh =
'Retorna o seno hiperbólico de `x` (requer valor em radianos).'
math.sqrt =
'Retorna a raiz quadrada de `x`.'
math.tan =
'Retorna a tangente de `x` (requer valor em radianos).'
math.tanh =
'Retorna a tangente hiperbólica de `x` (requer valor em radianos).'
math.tointeger =
'Se o valor `x` pode ser convertido para um inteiro, retorna esse inteiro.'
math.type =
'Retorna `"integer"` se `x` é um inteiro, `"float"` se for um valor real (i.e., ponto flutuante), ou `nil` se `x` não é um número.'
math.ult =
'Retorna `true` se e somente se `m` é menor `n` quando eles são comparados como inteiros sem sinal.'
os =
''
os.clock =
'Retorna uma aproximação do valor, em segundos, do tempo de CPU usado pelo programa.'
os.date =
'Retorna uma string ou uma tabela contendo data e hora, formatada de acordo com a string `format` fornecida.'
os.difftime =
'Retorna a diferença, em segundos, do tempo `t1` para o tempo` t2`.'
os.execute =
'Passa `command` para ser executado por um `shell` do sistema operacional.'
os.exit['<5.1'] =
'Chama a função `exit` do C para encerrar o programa.'
os.exit['>5.2'] =
'Chama a função `exit` do ISO C para encerrar o programa.'
os.getenv =
'Retorna o valor da variável de ambiente de processo `varname`.'
os.remove =
'Remove o arquivo com o nome dado.'
os.rename =
'Renomeia o arquivo ou diretório chamado `oldname` para `newname`.'
os.setlocale =
'Define a localidade atual do programa.'
os.time =
'Retorna a hora atual quando chamada sem argumentos, ou um valor representando a data e a hora local especificados pela tabela fornecida.'
os.tmpname =
'Retorna uma string com um nome de arquivo que pode ser usado como arquivo temporário.'
osdate.year =
'Quatro dígitos.'
osdate.month =
'1-12'
osdate.day =
'1-31'
osdate.hour =
'0-23'
osdate.min =
'0-59'
osdate.sec =
'0-61'
osdate.wday =
'Dia da semana, 17, Domingo é 1'
osdate.yday =
'Dia do ano, 1366'
osdate.isdst =
'Bandeira para indicar horário de verão (i.e., `Daylight Saving Time`), um valor booleano.'
package =
''
require['<5.3'] =
'Carrega o módulo fornecido e retorna qualquer valor retornado pelo módulo (`true` quando `nil`).'
require['>5.4'] =
'Carrega o módulo fornecido e retorna qualquer valor retornado pelo pesquisador (`true` quando `nil`). Além desse valor, também retorna como segundo resultado um carregador de dados retornados pelo pesquisador, o que indica como `require` encontrou o módulo. (Por exemplo, se o módulo vier de um arquivo, este carregador de dados é o caminho do arquivo.)'
package.config =
'string descrevendo configurações a serem utilizadas durante a compilação de pacotes.'
package.cpath =
'O caminho usado pelo `require` para procurar pelo carregador C.'
package.loaded =
'Uma tabela usada pelo `require` para controlar quais módulos já estão carregados.'
package.loaders =
'Uma tabela usada pelo `require` para controlar como carregar módulos.'
package.loadlib =
'Dinamicamente vincula o programa no `host` com a biblioteca C `libname`.'
package.path =
'O caminho usado pelo `require` para procurar por um carregador Lua.'
package.preload =
'Uma tabela para armazenar carregadores de módulos específicos.'
package.searchers =
'Uma tabela usada pelo `require` para controlar como buscar módulos.'
package.searchpath =
'Procura por `name` em `path`.'
package.seeall =
'Define uma `metatable` `module` com o campo `__index` referenciando o ambiente global, para que este módulo herde valores do ambiente global. Para ser usado como uma opção a função `module`.'
string =
''
string.byte =
'Retorna os códigos numéricos internos dos caracteres `s[i], s[i+1], ..., s[j]`.'
string.char =
'Retorna uma string com comprimento igual ao número de argumentos, no qual cada caractere possui o código numérico interno igual ao seu argumento correspondente.'
string.dump =
'Retorna uma string contendo uma representação binária (i.e., *binary chunk*) da função dada.'
string.find =
'Procura a primeira correspondencia de `pattern` (veja §6.4.1) na string.'
string.format =
'Retorna uma versão formatada de seu número variável de argumentos após a descrição dada em seu primeiro argumento.'
string.gmatch =
[[
Retorna um iterator que, a cada vez que é chamado, retorna as próximas capturas de `pattern` (veja §6.4.1) sobre a string *s*.
Por exemplo, o loop a seguir irá iterar em todas as palavras da string *s*, imprimindo cada palavra por linha:
```lua
s =
"hello world from Lua"
for w in string.gmatch(s, "%a+") do
print(w)
end
```
]]
string.gsub =
'Retorna uma cópia da *s* em que todas ou, caso fornecido, as primeiras `n` ocorrências de `pattern` (veja §6.4.1) que tiverem sido substituídas por uma string de substituição especificada por `repl`.'
string.len =
'Retorna o comprimento da string.'
string.lower =
'Retorna uma cópia desta string com todas as letras maiúsculas alteradas para minúsculas.'
string.match =
'Procura a primeira ocorrência do `pattern` (veja §6.4.1) na string.'
string.pack =
'Retorna uma string binária contendo os valores `V1`, `v2`, etc. empacotados (isto é, serializado de forma binário) de acordo com o formato da string `fmt` fornecida (veja §6.4.2).'
string.packsize =
'Retorna o tamanho de uma string resultante de `string.pack` com o formato da string `fmt` fornecida (veja §6.4.2).'
string.rep['>5.2'] =
'Retorna uma string que é a concatenação de `n` cópias da string `s` separadas pela string `sep`.'
string.rep['<5.1'] =
'Retorna uma string que é a concatenação de `n` cópias da string `s`.'
string.reverse =
'Retorna uma string que representa a string `s` invertida.'
string.sub =
'Retorna a substring da string `s` que começa no índice `i` e continua até o índice `j`.'
string.unpack =
'Retorna os valores empacotados na string de acordo com o formato da string `fmt` fornecida (veja §6.4.2).'
string.upper =
'Retorna uma cópia desta string com todas as letras minúsculas alteradas para maiúsculas.'
table =
''
table.concat =
'Dada uma lista onde todos os elementos são strings ou números, retorna a string `list[i]..sep..list[i+1] ··· sep..list[j]`.'
table.insert =
'Insere o elemento `value` na posição `pos` de `list`.'
table.maxn =
'Retorna o maior índice numérico positivo da tabela fornecida ou zero se a tabela não tiver índices numéricos positivos.'
table.move =
[[
Move os elementos da tabela `a1` para tabela `a2`.
```lua
a2[t],··· =
a1[f],···,a1[e]
return a2
```
]]
table.pack =
'Retorna uma nova tabela com todos os argumentos armazenados em chaves `1`, `2`, etc. e com um campo `"n"` com o número total de argumentos.'
table.remove =
'Remove de `list` o elemento na posição `pos`, retornando o valor do elemento removido.'
table.sort =
'Ordena os elementos de `list` em uma determinada ordem, *in-place*, de `list[1]` para `list[#list]`.'
table.unpack =
[[
Retorna os elementos da lista fornecida. Esta função é equivalente a
```lua
return list[i], list[i+1], ···, list[j]
```
Por padrão, `i` é `1` e `j` é `#list`.
]]
table.foreach = -- TODO: need translate!
'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.'
table.foreachi = -- TODO: need translate!
'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.'
table.getn = -- TODO: need translate!
'Returns the number of elements in the table. This function is equivalent to `#list`.'
table.new = -- TODO: need translate!
[[This creates a pre-sized table, just like the C API equivalent `lua_createtable()`. This is useful for big tables if the final table size is known and automatic table resizing is too expensive. `narray` parameter specifies the number of array-like items, and `nhash` parameter specifies the number of hash-like items. The function needs to be required before use.
```lua
require("table.new")
```
]]
table.clear = -- TODO: need translate!
[[This clears all keys and values from a table, but preserves the allocated array/hash sizes. This is useful when a table, which is linked from multiple places, needs to be cleared and/or when recycling a table for use by the same context. This avoids managing backlinks, saves an allocation and the overhead of incremental array/hash part growth. The function needs to be required before use.
```lua
require("table.clear").
```
Please note this function is meant for very specific situations. In most cases it's better to replace the (usually single) link with a new table and let the GC do its work.
]]
utf8 =
''
utf8.char =
'Recebe zero ou mais inteiros, converte cada um à sua sequência de byte UTF-8 correspondente e retorna uma string com a concatenação de todas essas sequências.'
utf8.charpattern =
'O padrão que corresponde exatamente uma sequência de byte UTF-8, supondo que seja uma sequência válida UTF-8.'
utf8.codes =
[[
Retorna valores tal que a seguinte construção
```lua
for p, c in utf8.codes(s) do
body
end
```
itere em todos os caracteres UTF-8 na string s, com p sendo a posição (em bytes) e c o *codepoint* de cada caractere. Ele gera um erro se encontrado qualquer sequência de byte inválida.
]]
utf8.codepoint =
'Retorna os *codepoints* (em inteiros) de todos os caracteres em `s` que iniciam entre as posições do byte `i` e `j` (ambos inclusos).'
utf8.len =
'Retorna o número de caracteres UTF-8 na string `s` que começa entre as posições `i` e `j` (ambos inclusos).'
utf8.offset =
'Retorna a posição (em bytes) onde a codificação do `n`-ésimo caractere de `s` inícia (contando a partir da posição `i`).'

View File

@ -1,444 +0,0 @@
---@diagnostic disable: undefined-global
config.addonManager.enable = -- TODO: need translate!
"Whether the addon manager is enabled or not."
config.runtime.version = -- TODO: need translate!
"Lua runtime version."
config.runtime.path = -- TODO: need translate!
[[
When using `require`, how to find the file based on the input name.
Setting this config to `?/init.lua` means that when you enter `require 'myfile'`, `${workspace}/myfile/init.lua` will be searched from the loaded files.
if `runtime.pathStrict` is `false`, `${workspace}/**/myfile/init.lua` will also be searched.
If you want to load files outside the workspace, you need to set `Lua.workspace.library` first.
]]
config.runtime.pathStrict = -- TODO: need translate!
'When enabled, `runtime.path` will only search the first level of directories, see the description of `runtime.path`.'
config.runtime.special = -- TODO: need translate!
[[The custom global variables are regarded as some special built-in variables, and the language server will provide special support
The following example shows that 'include' is treated as' require '.
```json
"Lua.runtime.special" : {
"include" : "require"
}
```
]]
config.runtime.unicodeName = -- TODO: need translate!
"Allows Unicode characters in name."
config.runtime.nonstandardSymbol = -- TODO: need translate!
"Supports non-standard symbols. Make sure that your runtime environment supports these symbols."
config.runtime.plugin = -- TODO: need translate!
"Plugin path. Please read [wiki](https://github.com/LuaLS/lua-language-server/wiki/Plugins) to learn more."
config.runtime.pluginArgs = -- TODO: need translate!
"Additional arguments for the plugin."
config.runtime.fileEncoding = -- TODO: need translate!
"File encoding. The `ansi` option is only available under the `Windows` platform."
config.runtime.builtin = -- TODO: need translate!
[[
Adjust the enabled state of the built-in library. You can disable (or redefine) the non-existent library according to the actual runtime environment.
* `default`: Indicates that the library will be enabled or disabled according to the runtime version
* `enable`: always enable
* `disable`: always disable
]]
config.runtime.meta = -- TODO: need translate!
'Format of the directory name of the meta files.'
config.diagnostics.enable = -- TODO: need translate!
"Enable diagnostics."
config.diagnostics.disable = -- TODO: need translate!
"Disabled diagnostic (Use code in hover brackets)."
config.diagnostics.globals = -- TODO: need translate!
"Defined global variables."
config.diagnostics.severity = -- TODO: need translate!
[[
Modify the diagnostic severity.
End with `!` means override the group setting `diagnostics.groupSeverity`.
]]
config.diagnostics.neededFileStatus = -- TODO: need translate!
[[
* Opened: only diagnose opened files
* Any: diagnose all files
* None: disable this diagnostic
End with `!` means override the group setting `diagnostics.groupFileStatus`.
]]
config.diagnostics.groupSeverity = -- TODO: need translate!
[[
Modify the diagnostic severity in a group.
`Fallback` means that diagnostics in this group are controlled by `diagnostics.severity` separately.
Other settings will override individual settings without end of `!`.
]]
config.diagnostics.groupFileStatus = -- TODO: need translate!
[[
Modify the diagnostic needed file status in a group.
* Opened: only diagnose opened files
* Any: diagnose all files
* None: disable this diagnostic
`Fallback` means that diagnostics in this group are controlled by `diagnostics.neededFileStatus` separately.
Other settings will override individual settings without end of `!`.
]]
config.diagnostics.workspaceEvent = -- TODO: need translate!
"Set the time to trigger workspace diagnostics."
config.diagnostics.workspaceEvent.OnChange = -- TODO: need translate!
"Trigger workspace diagnostics when the file is changed."
config.diagnostics.workspaceEvent.OnSave = -- TODO: need translate!
"Trigger workspace diagnostics when the file is saved."
config.diagnostics.workspaceEvent.None = -- TODO: need translate!
"Disable workspace diagnostics."
config.diagnostics.workspaceDelay = -- TODO: need translate!
"Latency (milliseconds) for workspace diagnostics."
config.diagnostics.workspaceRate = -- TODO: need translate!
"Workspace diagnostics run rate (%). Decreasing this value reduces CPU usage, but also reduces the speed of workspace diagnostics. The diagnosis of the file you are currently editing is always done at full speed and is not affected by this setting."
config.diagnostics.libraryFiles = -- TODO: need translate!
"How to diagnose files loaded via `Lua.workspace.library`."
config.diagnostics.libraryFiles.Enable = -- TODO: need translate!
"Always diagnose these files."
config.diagnostics.libraryFiles.Opened = -- TODO: need translate!
"Only when these files are opened will it be diagnosed."
config.diagnostics.libraryFiles.Disable = -- TODO: need translate!
"These files are not diagnosed."
config.diagnostics.ignoredFiles = -- TODO: need translate!
"How to diagnose ignored files."
config.diagnostics.ignoredFiles.Enable = -- TODO: need translate!
"Always diagnose these files."
config.diagnostics.ignoredFiles.Opened = -- TODO: need translate!
"Only when these files are opened will it be diagnosed."
config.diagnostics.ignoredFiles.Disable = -- TODO: need translate!
"These files are not diagnosed."
config.diagnostics.disableScheme = -- TODO: need translate!
'Do not diagnose Lua files that use the following scheme.'
config.diagnostics.unusedLocalExclude = -- TODO: need translate!
'Do not diagnose `unused-local` when the variable name matches the following pattern.'
config.workspace.ignoreDir = -- TODO: need translate!
"Ignored files and directories (Use `.gitignore` grammar)."-- .. example.ignoreDir,
config.workspace.ignoreSubmodules = -- TODO: need translate!
"Ignore submodules."
config.workspace.useGitIgnore = -- TODO: need translate!
"Ignore files list in `.gitignore` ."
config.workspace.maxPreload = -- TODO: need translate!
"Max preloaded files."
config.workspace.preloadFileSize = -- TODO: need translate!
"Skip files larger than this value (KB) when preloading."
config.workspace.library = -- TODO: need translate!
"In addition to the current workspace, which directories will load files from. The files in these directories will be treated as externally provided code libraries, and some features (such as renaming fields) will not modify these files."
config.workspace.checkThirdParty = -- TODO: need translate!
[[
Automatic detection and adaptation of third-party libraries, currently supported libraries are:
* OpenResty
* Cocos4.0
* LÖVE
* LÖVR
* skynet
* Jass
]]
config.workspace.userThirdParty = -- TODO: need translate!
'Add private third-party library configuration file paths here, please refer to the built-in [configuration file path](https://github.com/LuaLS/lua-language-server/tree/master/meta/3rd)'
config.workspace.supportScheme = -- TODO: need translate!
'Provide language server for the Lua files of the following scheme.'
config.completion.enable = -- TODO: need translate!
'Enable completion.'
config.completion.callSnippet = -- TODO: need translate!
'Shows function call snippets.'
config.completion.callSnippet.Disable = -- TODO: need translate!
"Only shows `function name`."
config.completion.callSnippet.Both = -- TODO: need translate!
"Shows `function name` and `call snippet`."
config.completion.callSnippet.Replace = -- TODO: need translate!
"Only shows `call snippet.`"
config.completion.keywordSnippet = -- TODO: need translate!
'Shows keyword syntax snippets.'
config.completion.keywordSnippet.Disable = -- TODO: need translate!
"Only shows `keyword`."
config.completion.keywordSnippet.Both = -- TODO: need translate!
"Shows `keyword` and `syntax snippet`."
config.completion.keywordSnippet.Replace = -- TODO: need translate!
"Only shows `syntax snippet`."
config.completion.displayContext = -- TODO: need translate!
"Previewing the relevant code snippet of the suggestion may help you understand the usage of the suggestion. The number set indicates the number of intercepted lines in the code fragment. If it is set to `0`, this feature can be disabled."
config.completion.workspaceWord = -- TODO: need translate!
"Whether the displayed context word contains the content of other files in the workspace."
config.completion.showWord = -- TODO: need translate!
"Show contextual words in suggestions."
config.completion.showWord.Enable = -- TODO: need translate!
"Always show context words in suggestions."
config.completion.showWord.Fallback = -- TODO: need translate!
"Contextual words are only displayed when suggestions based on semantics cannot be provided."
config.completion.showWord.Disable = -- TODO: need translate!
"Do not display context words."
config.completion.autoRequire = -- TODO: need translate!
"When the input looks like a file name, automatically `require` this file."
config.completion.showParams = -- TODO: need translate!
"Display parameters in completion list. When the function has multiple definitions, they will be displayed separately."
config.completion.requireSeparator = -- TODO: need translate!
"The separator used when `require`."
config.completion.postfix = -- TODO: need translate!
"The symbol used to trigger the postfix suggestion."
config.color.mode = -- TODO: need translate!
"Color mode."
config.color.mode.Semantic = -- TODO: need translate!
"Semantic color. You may need to set `editor.semanticHighlighting.enabled` to `true` to take effect."
config.color.mode.SemanticEnhanced = -- TODO: need translate!
"Enhanced semantic color. Like `Semantic`, but with additional analysis which might be more computationally expensive."
config.color.mode.Grammar = -- TODO: need translate!
"Grammar color."
config.semantic.enable = -- TODO: need translate!
"Enable semantic color. You may need to set `editor.semanticHighlighting.enabled` to `true` to take effect."
config.semantic.variable = -- TODO: need translate!
"Semantic coloring of variables/fields/parameters."
config.semantic.annotation = -- TODO: need translate!
"Semantic coloring of type annotations."
config.semantic.keyword = -- TODO: need translate!
"Semantic coloring of keywords/literals/operators. You only need to enable this feature if your editor cannot do syntax coloring."
config.signatureHelp.enable = -- TODO: need translate!
"Enable signature help."
config.hover.enable = -- TODO: need translate!
"Enable hover."
config.hover.viewString = -- TODO: need translate!
"Hover to view the contents of a string (only if the literal contains an escape character)."
config.hover.viewStringMax = -- TODO: need translate!
"The maximum length of a hover to view the contents of a string."
config.hover.viewNumber = -- TODO: need translate!
"Hover to view numeric content (only if literal is not decimal)."
config.hover.fieldInfer = -- TODO: need translate!
"When hovering to view a table, type infer will be performed for each field. When the accumulated time of type infer reaches the set value (MS), the type infer of subsequent fields will be skipped."
config.hover.previewFields = -- TODO: need translate!
"When hovering to view a table, limits the maximum number of previews for fields."
config.hover.enumsLimit = -- TODO: need translate!
"When the value corresponds to multiple types, limit the number of types displaying."
config.hover.expandAlias = -- TODO: need translate!
[[
Whether to expand the alias. For example, expands `---@alias myType boolean|number` appears as `boolean|number`, otherwise it appears as `myType'.
]]
config.develop.enable = -- TODO: need translate!
'Developer mode. Do not enable, performance will be affected.'
config.develop.debuggerPort = -- TODO: need translate!
'Listen port of debugger.'
config.develop.debuggerWait = -- TODO: need translate!
'Suspend before debugger connects.'
config.intelliSense.searchDepth = -- TODO: need translate!
'Set the search depth for IntelliSense. Increasing this value increases accuracy, but decreases performance. Different workspace have different tolerance for this setting. Please adjust it to the appropriate value.'
config.intelliSense.fastGlobal = -- TODO: need translate!
'In the global variable completion, and view `_G` suspension prompt. This will slightly reduce the accuracy of type speculation, but it will have a significant performance improvement for projects that use a lot of global variables.'
config.window.statusBar = -- TODO: need translate!
'Show extension status in status bar.'
config.window.progressBar = -- TODO: need translate!
'Show progress bar in status bar.'
config.hint.enable = -- TODO: need translate!
'Enable inlay hint.'
config.hint.paramType = -- TODO: need translate!
'Show type hints at the parameter of the function.'
config.hint.setType = -- TODO: need translate!
'Show hints of type at assignment operation.'
config.hint.paramName = -- TODO: need translate!
'Show hints of parameter name at the function call.'
config.hint.paramName.All = -- TODO: need translate!
'All types of parameters are shown.'
config.hint.paramName.Literal = -- TODO: need translate!
'Only literal type parameters are shown.'
config.hint.paramName.Disable = -- TODO: need translate!
'Disable parameter hints.'
config.hint.arrayIndex = -- TODO: need translate!
'Show hints of array index when constructing a table.'
config.hint.arrayIndex.Enable = -- TODO: need translate!
'Show hints in all tables.'
config.hint.arrayIndex.Auto = -- TODO: need translate!
'Show hints only when the table is greater than 3 items, or the table is a mixed table.'
config.hint.arrayIndex.Disable = -- TODO: need translate!
'Disable hints of array index.'
config.hint.await = -- TODO: need translate!
'If the called function is marked `---@async`, prompt `await` at the call.'
config.hint.semicolon = -- TODO: need translate!
'If there is no semicolon at the end of the statement, display a virtual semicolon.'
config.hint.semicolon.All = -- TODO: need translate!
'All statements display virtual semicolons.'
config.hint.semicolon.SameLine = -- TODO: need translate!
'When two statements are on the same line, display a semicolon between them.'
config.hint.semicolon.Disable = -- TODO: need translate!
'Disable virtual semicolons.'
config.codeLens.enable = -- TODO: need translate!
'Enable code lens.'
config.format.enable = -- TODO: need translate!
'Enable code formatter.'
config.format.defaultConfig = -- TODO: need translate!
[[
The default format configuration. Has a lower priority than `.editorconfig` file in the workspace.
Read [formatter docs](https://github.com/CppCXY/EmmyLuaCodeStyle/tree/master/docs) to learn usage.
]]
config.spell.dict = -- TODO: need translate!
'Custom words for spell checking.'
config.nameStyle.config = -- TODO: need translate!
'Set name style config'
config.telemetry.enable = -- TODO: need translate!
[[
Enable telemetry to send your editor information and error logs over the network. Read our privacy policy [here](https://github.com/LuaLS/lua-language-server/wiki/Home#privacy).
]]
config.misc.parameters = -- TODO: need translate!
'[Command line parameters](https://github.com/LuaLS/lua-telemetry-server/tree/master/method) when starting the language service in VSCode.'
config.misc.executablePath = -- TODO: need translate!
'Specify the executable path in VSCode.'
config.IntelliSense.traceLocalSet = -- TODO: need translate!
'Please read [wiki](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features) to learn more.'
config.IntelliSense.traceReturn = -- TODO: need translate!
'Please read [wiki](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features) to learn more.'
config.IntelliSense.traceBeSetted = -- TODO: need translate!
'Please read [wiki](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features) to learn more.'
config.IntelliSense.traceFieldInject = -- TODO: need translate!
'Please read [wiki](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features) to learn more.'
config.type.castNumberToInteger = -- TODO: need translate!
'Allowed to assign the `number` type to the `integer` type.'
config.type.weakUnionCheck = -- TODO: need translate!
[[
Once one subtype of a union type meets the condition, the union type also meets the condition.
When this setting is `false`, the `number|boolean` type cannot be assigned to the `number` type. It can be with `true`.
]]
config.type.weakNilCheck = -- TODO: need translate!
[[
When checking the type of union type, ignore the `nil` in it.
When this setting is `false`, the `number|nil` type cannot be assigned to the `number` type. It can be with `true`.
]]
config.doc.privateName = -- TODO: need translate!
'Treat specific field names as private, e.g. `m_*` means `XXX.m_id` and `XXX.m_type` are private, witch can only be accessed in the class where the definition is located.'
config.doc.protectedName = -- TODO: need translate!
'Treat specific field names as protected, e.g. `m_*` means `XXX.m_id` and `XXX.m_type` are protected, witch can only be accessed in the class where the definition is located and its subclasses.'
config.doc.packageName = -- TODO: need translate!
'Treat specific field names as package, e.g. `m_*` means `XXX.m_id` and `XXX.m_type` are package, witch can only be accessed in the file where the definition is located.'
config.diagnostics['unused-local'] = -- TODO: need translate!
'未使用的局部变量'
config.diagnostics['unused-function'] = -- TODO: need translate!
'未使用的函数'
config.diagnostics['undefined-global'] = -- TODO: need translate!
'未定义的全局变量'
config.diagnostics['global-in-nil-env'] = -- TODO: need translate!
'不能使用全局变量( `_ENV` 被设置为了 `nil`'
config.diagnostics['unused-label'] = -- TODO: need translate!
'未使用的标签'
config.diagnostics['unused-vararg'] = -- TODO: need translate!
'未使用的不定参数'
config.diagnostics['trailing-space'] = -- TODO: need translate!
'后置空格'
config.diagnostics['redefined-local'] = -- TODO: need translate!
'重复定义的局部变量'
config.diagnostics['newline-call'] = -- TODO: need translate!
'以 `(` 开始的新行,在语法上被解析为了上一行的函数调用'
config.diagnostics['newfield-call'] = -- TODO: need translate!
'在字面量表中2行代码之间缺少分隔符在语法上被解析为了一次索引操作'
config.diagnostics['redundant-parameter'] = -- TODO: need translate!
'函数调用时,传入了多余的参数'
config.diagnostics['ambiguity-1'] = -- TODO: need translate!
'优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1` '
config.diagnostics['lowercase-global'] = -- TODO: need translate!
'首字母小写的全局变量定义'
config.diagnostics['undefined-env-child'] = -- TODO: need translate!
'`_ENV` 被设置为了新的字面量表,但是试图获取的全局变量不再这张表中'
config.diagnostics['duplicate-index'] = -- TODO: need translate!
'在字面量表中重复定义了索引'
config.diagnostics['empty-block'] = -- TODO: need translate!
'空代码块'
config.diagnostics['redundant-value'] = -- TODO: need translate!
'赋值操作时,值的数量比被赋值的对象多'
config.diagnostics['assign-type-mismatch'] = -- TODO: need translate!
'Enable diagnostics for assignments in which the value\'s type does not match the type of the assigned variable.'
config.diagnostics['await-in-sync'] = -- TODO: need translate!
'Enable diagnostics for calls of asynchronous functions within a synchronous function.'
config.diagnostics['cast-local-type'] = -- TODO: need translate!
'Enable diagnostics for casts of local variables where the target type does not match the defined type.'
config.diagnostics['cast-type-mismatch'] = -- TODO: need translate!
'Enable diagnostics for casts where the target type does not match the initial type.'
config.diagnostics['circular-doc-class'] = -- TODO: need translate!
'Enable diagnostics for two classes inheriting from each other introducing a circular relation.'
config.diagnostics['close-non-object'] = -- TODO: need translate!
'Enable diagnostics for attempts to close a variable with a non-object.'
config.diagnostics['code-after-break'] = -- TODO: need translate!
'Enable diagnostics for code placed after a break statement in a loop.'
config.diagnostics['codestyle-check'] = -- TODO: need translate!
'Enable diagnostics for incorrectly styled lines.'
config.diagnostics['count-down-loop'] = -- TODO: need translate!
'Enable diagnostics for `for` loops which will never reach their max/limit because the loop is incrementing instead of decrementing.'
config.diagnostics['deprecated'] = -- TODO: need translate!
'Enable diagnostics to highlight deprecated API.'
config.diagnostics['different-requires'] = -- TODO: need translate!
'Enable diagnostics for files which are required by two different paths.'
config.diagnostics['discard-returns'] = -- TODO: need translate!
'Enable diagnostics for calls of functions annotated with `---@nodiscard` where the return values are ignored.'
config.diagnostics['doc-field-no-class'] = -- TODO: need translate!
'Enable diagnostics to highlight a field annotation without a defining class annotation.'
config.diagnostics['duplicate-doc-alias'] = -- TODO: need translate!
'Enable diagnostics for a duplicated alias annotation name.'
config.diagnostics['duplicate-doc-field'] = -- TODO: need translate!
'Enable diagnostics for a duplicated field annotation name.'
config.diagnostics['duplicate-doc-param'] = -- TODO: need translate!
'Enable diagnostics for a duplicated param annotation name.'
config.diagnostics['duplicate-set-field'] = -- TODO: need translate!
'Enable diagnostics for setting the same field in a class more than once.'
config.diagnostics['incomplete-signature-doc'] = -- TODO: need translate!
'Incomplete @param or @return annotations for functions.'
config.diagnostics['invisible'] = -- TODO: need translate!
'Enable diagnostics for accesses to fields which are invisible.'
config.diagnostics['missing-global-doc'] = -- TODO: need translate!
'Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.'
config.diagnostics['missing-local-export-doc'] = -- TODO: need translate!
'Missing annotations for exported locals! Exported local functions must have a comment and annotations for all parameters and return values.'
config.diagnostics['missing-parameter'] = -- TODO: need translate!
'Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.'
config.diagnostics['missing-return'] = -- TODO: need translate!
'Enable diagnostics for functions with return annotations which have no return statement.'
config.diagnostics['missing-return-value'] = -- TODO: need translate!
'Enable diagnostics for return statements without values although the containing function declares returns.'
config.diagnostics['need-check-nil'] = -- TODO: need translate!
'Enable diagnostics for variable usages if `nil` or an optional (potentially `nil`) value was assigned to the variable before.'
config.diagnostics['no-unknown'] = -- TODO: need translate!
'Enable diagnostics for cases in which the type cannot be inferred.'
config.diagnostics['not-yieldable'] = -- TODO: need translate!
'Enable diagnostics for calls to `coroutine.yield()` when it is not permitted.'
config.diagnostics['param-type-mismatch'] = -- TODO: need translate!
'Enable diagnostics for function calls where the type of a provided parameter does not match the type of the annotated function definition.'
config.diagnostics['redundant-return'] = -- TODO: need translate!
'Enable diagnostics for return statements which are not needed because the function would exit on its own.'
config.diagnostics['redundant-return-value']= -- TODO: need translate!
'Enable diagnostics for return statements which return an extra value which is not specified by a return annotation.'
config.diagnostics['return-type-mismatch'] = -- TODO: need translate!
'Enable diagnostics for return values whose type does not match the type declared in the corresponding return annotation.'
config.diagnostics['spell-check'] = -- TODO: need translate!
'Enable diagnostics for typos in strings.'
config.diagnostics['name-style-check'] = -- TODO: need translate!
'Enable diagnostics for name style.'
config.diagnostics['unbalanced-assignments']= -- TODO: need translate!
'Enable diagnostics on multiple assignments if not all variables obtain a value (e.g., `local x,y = 1`).'
config.diagnostics['undefined-doc-class'] = -- TODO: need translate!
'Enable diagnostics for class annotations in which an undefined class is referenced.'
config.diagnostics['undefined-doc-name'] = -- TODO: need translate!
'Enable diagnostics for type annotations referencing an undefined type or alias.'
config.diagnostics['undefined-doc-param'] = -- TODO: need translate!
'Enable diagnostics for cases in which a parameter annotation is given without declaring the parameter in the function definition.'
config.diagnostics['undefined-field'] = -- TODO: need translate!
'Enable diagnostics for cases in which an undefined field of a variable is read.'
config.diagnostics['unknown-cast-variable'] = -- TODO: need translate!
'Enable diagnostics for casts of undefined variables.'
config.diagnostics['unknown-diag-code'] = -- TODO: need translate!
'Enable diagnostics in cases in which an unknown diagnostics code is entered.'
config.diagnostics['unknown-operator'] = -- TODO: need translate!
'Enable diagnostics for unknown operators.'
config.diagnostics['unreachable-code'] = -- TODO: need translate!
'Enable diagnostics for unreachable code.'
config.diagnostics['global-element'] = -- TODO: need translate!
'Enable diagnostics to warn about global elements.'
config.typeFormat.config = -- TODO: need translate!
'Configures the formatting behavior while typing Lua code.'
config.typeFormat.config.auto_complete_end = -- TODO: need translate!
'Controls if `end` is automatically completed at suitable positions.'
config.typeFormat.config.auto_complete_table_sep = -- TODO: need translate!
'Controls if a separator is automatically appended at the end of a table declaration.'
config.typeFormat.config.format_line = -- TODO: need translate!
'Controls if a line is formatted at all.'
command.exportDocument = -- TODO: need translate!
'Lua: Export Document ...'
command.addon_manager.open = -- TODO: need translate!
'Lua: Open Addon Manager ...'
command.reloadFFIMeta = -- TODO: need translate!
'Lua: Reload luajit ffi meta'

View File

@ -1,742 +0,0 @@
---@diagnostic disable: undefined-global, lowercase-global
arg =
'独立版Lua的启动参数。'
assert =
'如果其参数 `v` 的值为假(`nil` 或 `false` 它就调用 $error 否则,返回所有的参数。 在错误情况时, `message` 指那个错误对象; 如果不提供这个参数,参数默认为 `"assertion failed!"` 。'
cgopt.collect =
'做一次完整的垃圾收集循环。'
cgopt.stop =
'停止垃圾收集器的运行。'
cgopt.restart =
'重启垃圾收集器的自动运行。'
cgopt.count =
'以 K 字节数为单位返回 Lua 使用的总内存数。'
cgopt.step =
'单步运行垃圾收集器。 步长“大小”由 `arg` 控制。'
cgopt.setpause =
'将 `arg` 设为收集器的 *间歇率* 。'
cgopt.setstepmul =
'将 `arg` 设为收集器的 *步进倍率* 。'
cgopt.incremental =
'改变收集器模式为增量模式。'
cgopt.generational =
'改变收集器模式为分代模式。'
cgopt.isrunning =
'返回表示收集器是否在工作的布尔值。'
collectgarbage =
'这个函数是垃圾收集器的通用接口。 通过参数 opt 它提供了一组不同的功能。'
dofile =
'打开该名字的文件,并执行文件中的 Lua 代码块。 不带参数调用时, `dofile` 执行标准输入的内容(`stdin`)。 返回该代码块的所有返回值。 对于有错误的情况,`dofile` 将错误反馈给调用者 (即,`dofile` 没有运行在保护模式下)。'
error =
[[
`message` `error`
`message` `error` level
]]
_G =
'一个全局变量(非函数), 内部储存有全局环境(参见 §2.2)。 Lua 自己不使用这个变量; 改变这个变量的值不会对任何环境造成影响,反之亦然。'
getfenv =
'返回给定函数的环境。`f` 可以是一个Lua函数也可是一个表示调用栈层级的数字。'
getmetatable =
'如果 `object` 不包含元表,返回 `nil` 。 否则,如果在该对象的元表中有 `"__metatable"` 域时返回其关联值, 没有时返回该对象的元表。'
ipairs =
[[
`t` `0`
```lua
for i,v in ipairs(t) do body end
```
`1,t[1]) (2,t[2]) ...`
]]
loadmode.b =
'只能是二进制代码块。'
loadmode.t =
'只能是文本代码块。'
loadmode.bt =
'可以是二进制也可以是文本。'
load['<5.1'] =
'使用 `func` 分段加载代码块。 每次调用 `func` 必须返回一个字符串用于连接前文。'
load['>5.2'] =
[[
`chunk` `chunk` `load` `chunk` `nil`
]]
loadfile =
'从文件 `filename` 或标准输入(如果文件名未提供)中获取代码块。'
loadstring =
'使用给定字符串加载代码块。'
module =
'创建一个模块。'
next =
[[
`next` `nil` `next` `nil` `next` `nil` `nil` `next(t)`
使 使 `for`
`next`
]]
pairs =
[[
`t` `__pairs` `t`
`next` `t` `nil`
```lua
for k,v in pairs(t) do body end
```
`t`
$next
]]
pcall =
'传入参数,以 *保护模式* 调用函数 `f` 。 这意味着 `f` 中的任何错误不会抛出; 取而代之的是,`pcall` 会将错误捕获到,并返回一个状态码。 第一个返回值是状态码(一个布尔量), 当没有错误时,其为真。 此时,`pcall` 同样会在状态码后返回所有调用的结果。 在有错误时,`pcall` 返回 `false` 加错误消息。'
print =
'接收任意数量的参数,并将它们的值打印到 `stdout`。 它用 `tostring` 函数将每个参数都转换为字符串。 `print` 不用于做格式化输出。仅作为看一下某个值的快捷方式。 多用于调试。 完整的对输出的控制,请使用 $string.format 以及 $io.write。'
rawequal =
'在不触发任何元方法的情况下 检查 `v1` 是否和 `v2` 相等。 返回一个布尔量。'
rawget =
'在不触发任何元方法的情况下 获取 `table[index]` 的值。 `table` 必须是一张表; `index` 可以是任何值。'
rawlen =
'在不触发任何元方法的情况下 返回对象 `v` 的长度。 `v` 可以是表或字符串。 它返回一个整数。'
rawset =
[[
`table[index]` `value` `table` `index` `nil` `NaN` `value` Lua
`table`
]]
select =
'如果 `index` 是个数字, 那么返回参数中第 `index` 个之后的部分; 负的数字会从后向前索引(`-1` 指最后一个参数)。 否则,`index` 必须是字符串 `"#"` 此时 `select` 返回参数的个数。'
setfenv =
'设置给定函数的环境。'
setmetatable =
[[
Lua C `metatable` `nil` `"__metatable"`
]]
tonumber =
[[
`base` `tonumber` `tonumber` `nil`
Lua §3.1
]]
tostring =
[[
使 $string.format
`v` `"__tostring"` `tostring` `v`
]]
type =
[[
`"nil"` `nil` `"number"` `"string"` `"boolean"` `"table"` `"function"` `"thread"` `"userdata"`
]]
_VERSION =
'一个包含有当前解释器版本号的全局变量(并非函数)。'
warn =
'使用所有参数组成的字符串消息来发送警告。'
xpcall['=5.1'] =
'传入参数,以 *保护模式* 调用函数 `f` 。这个函数和 `pcall` 类似。 不过它可以额外设置一个消息处理器 `err`。'
xpcall['>5.2'] =
'传入参数,以 *保护模式* 调用函数 `f` 。这个函数和 `pcall` 类似。 不过它可以额外设置一个消息处理器 `msgh`。'
unpack =
[[
`list`
```lua
return list[i], list[i+1], ···, list[j]
```
]]
bit32 =
''
bit32.arshift =
[[
`x` `disp` `disp` 使 `x` 使 `0`
]]
bit32.band =
'返回参数按位与的结果。'
bit32.bnot =
[[
`x`
```lua
assert(bit32.bnot(x) ==
(-1 - x) % 2^32)
```
]]
bit32.bor =
'返回参数按位或的结果。'
bit32.btest =
'参数按位与的结果不为0时返回 `true` 。'
bit32.bxor =
'返回参数按位异或的结果。'
bit32.extract =
'返回 `n` 中第 `field` 到第 `field + width - 1` 位组成的结果。'
bit32.replace =
'返回 `v` 的第 `field` 到第 `field + width - 1` 位替换 `n` 的对应位后的结果。'
bit32.lrotate =
'返回 `x` 向左旋转 `disp` 位的结果。`disp` 为负时向右旋转。'
bit32.lshift =
[[
`x` `disp` `disp` 使 `0`
```lua
assert(bit32.lshift(b, disp) ==
(b * 2^disp) % 2^32)
```
]]
bit32.rrotate =
'返回 `x` 向右旋转 `disp` 位的结果。`disp` 为负时向左旋转。'
bit32.rshift =
[[
`x` `disp` `disp` 使 `0`
```lua
assert(bit32.lshift(b, disp) ==
(b * 2^disp) % 2^32)
```
]]
coroutine =
''
coroutine.create =
'创建一个主体函数为 `f` 的新协程。 f 必须是一个 Lua 的函数。 返回这个新协程,它是一个类型为 `"thread"` 的对象。'
coroutine.isyieldable =
'如果正在运行的协程可以让出,则返回真。'
coroutine.isyieldable['>5.4'] =
'如果协程 `co` 可以让出,则返回真。`co` 默认为正在运行的协程。'
coroutine.close =
'关闭协程 `co`,并关闭它所有等待 *to-be-closed* 的变量,并将协程状态设为 `dead` 。'
coroutine.resume =
'开始或继续协程 `co` 的运行。'
coroutine.running =
'返回当前正在运行的协程加一个布尔量。 如果当前运行的协程是主线程,其为真。'
coroutine.status =
'以字符串形式返回协程 `co` 的状态。'
coroutine.wrap =
'创建一个主体函数为 `f` 的新协程。 f 必须是一个 Lua 的函数。 返回一个函数, 每次调用该函数都会延续该协程。'
coroutine.yield =
'挂起正在调用的协程的执行。'
costatus.running =
'正在运行。'
costatus.suspended =
'挂起或是还没有开始运行。'
costatus.normal =
'是活动的,但并不在运行。'
costatus.dead =
'运行完主体函数或因错误停止。'
debug =
''
debug.debug =
'进入一个用户交互模式,运行用户输入的每个字符串。'
debug.getfenv =
'返回对象 `o` 的环境。'
debug.gethook =
'返回三个表示线程钩子设置的值: 当前钩子函数,当前钩子掩码,当前钩子计数 。'
debug.getinfo =
'返回关于一个函数信息的表。'
debug.getlocal['<5.1'] =
'返回在栈的 `level` 层处函数的索引为 `index` 的局部变量的名字和值。'
debug.getlocal['>5.2'] =
'返回在栈的 `f` 层处函数的索引为 `index` 的局部变量的名字和值。'
debug.getmetatable =
'返回给定 `value` 的元表。'
debug.getregistry =
'返回注册表。'
debug.getupvalue =
'返回函数 `f` 的第 `up` 个上值的名字和值。'
debug.getuservalue['<5.3']=
'返回关联在 `u` 上的 `Lua` 值。'
debug.getuservalue['>5.4']=
'返回关联在 `u` 上的第 `n` 个 `Lua` 值,以及一个布尔,`false`表示值不存在。'
debug.setcstacklimit =
[[
### ** `Lua 5.4.2` **
C栈限制Lua中嵌套调用的深度
`false`
]]
debug.setfenv =
'将 `table` 设置为 `object` 的环境。'
debug.sethook =
'将一个函数作为钩子函数设入。'
debug.setlocal =
'将 `value` 赋给 栈上第 `level` 层函数的第 `local` 个局部变量。'
debug.setmetatable =
'将 `value` 的元表设为 `table` (可以是 `nil`)。'
debug.setupvalue =
'将 `value` 设为函数 `f` 的第 `up` 个上值。'
debug.setuservalue['<5.3']=
'将 `value` 设为 `udata` 的关联值。'
debug.setuservalue['>5.4']=
'将 `value` 设为 `udata` 的第 `n` 个关联值。'
debug.traceback =
'返回调用栈的栈回溯信息。 字符串可选项 `message` 被添加在栈回溯信息的开头。'
debug.upvalueid =
'返回指定函数第 `n` 个上值的唯一标识符(一个轻量用户数据)。'
debug.upvaluejoin =
'让 Lua 闭包 `f1` 的第 `n1` 个上值 引用 `Lua` 闭包 `f2` 的第 `n2` 个上值。'
infowhat.n =
'`name` 和 `namewhat`'
infowhat.S =
'`source``short_src``linedefined``lalinedefined`,和 `what`'
infowhat.l =
'`currentline`'
infowhat.t =
'`istailcall`'
infowhat.u['<5.1'] =
'`nups`'
infowhat.u['>5.2'] =
'`nups`、`nparams` 和 `isvararg`'
infowhat.f =
'`func`'
infowhat.r =
'`ftransfer` 和 `ntransfer`'
infowhat.L =
'`activelines`'
hookmask.c =
'每当 Lua 调用一个函数时,调用钩子。'
hookmask.r =
'每当 Lua 从一个函数内返回时,调用钩子。'
hookmask.l =
'每当 Lua 进入新的一行时,调用钩子。'
file =
''
file[':close'] =
'关闭 `file`。'
file[':flush'] =
'将写入的数据保存到 `file` 中。'
file[':lines'] =
[[
------
```lua
for c in file:lines(...) do
body
end
```
]]
file[':read'] =
'读文件 `file` 指定的格式决定了要读什么。'
file[':seek'] =
'设置及获取基于文件开头处计算出的位置。'
file[':setvbuf'] =
'设置输出文件的缓冲模式。'
file[':write'] =
'将参数的值逐个写入 `file`。'
readmode.n =
'读取一个数字,根据 Lua 的转换文法返回浮点数或整数。'
readmode.a =
'从当前位置开始读取整个文件。'
readmode.l =
'读取一行并忽略行结束标记。'
readmode.L =
'读取一行并保留行结束标记。'
seekwhence.set =
'基点为 0 (文件开头)。'
seekwhence.cur =
'基点为当前位置。'
seekwhence['.end'] =
'基点为文件尾。'
vbuf.no =
'不缓冲;输出操作立刻生效。'
vbuf.full =
'完全缓冲;只有在缓存满或调用 flush 时才做输出操作。'
vbuf.line =
'行缓冲;输出将缓冲到每次换行前。'
io =
''
io.stdin =
'标准输入。'
io.stdout =
'标准输出。'
io.stderr =
'标准错误。'
io.close =
'关闭 `file` 或默认输出文件。'
io.flush =
'将写入的数据保存到默认输出文件中。'
io.input =
'设置 `file` 为默认输入文件。'
io.lines =
[[
------
```lua
for c in io.lines(filename, ...) do
body
end
```
]]
io.open =
'用字符串 `mode` 指定的模式打开一个文件。'
io.output =
'设置 `file` 为默认输出文件。'
io.popen =
'用一个分离进程开启程序 `prog` 。'
io.read =
'读文件 `file` 指定的格式决定了要读什么。'
io.tmpfile =
'如果成功,返回一个临时文件的句柄。'
io.type =
'检查 `obj` 是否是合法的文件句柄。'
io.write =
'将参数的值逐个写入默认输出文件。'
openmode.r =
'读模式。'
openmode.w =
'写模式。'
openmode.a =
'追加模式。'
openmode['.r+'] =
'更新模式,所有之前的数据都保留。'
openmode['.w+'] =
'更新模式,所有之前的数据都删除。'
openmode['.a+'] =
'追加更新模式,所有之前的数据都保留,只允许在文件尾部做写入。'
openmode.rb =
'读模式。(二进制方式)'
openmode.wb =
'写模式。(二进制方式)'
openmode.ab =
'追加模式。(二进制方式)'
openmode['.r+b'] =
'更新模式,所有之前的数据都保留。(二进制方式)'
openmode['.w+b'] =
'更新模式,所有之前的数据都删除。(二进制方式)'
openmode['.a+b'] =
'追加更新模式,所有之前的数据都保留,只允许在文件尾部做写入。(二进制方式)'
popenmode.r =
'从这个程序中读取数据。(二进制方式)'
popenmode.w =
'向这个程序写入输入。(二进制方式)'
filetype.file =
'是一个打开的文件句柄。'
filetype['.closed file'] =
'是一个关闭的文件句柄。'
filetype['.nil'] =
'不是文件句柄。'
math =
''
math.abs =
'返回 `x` 的绝对值。'
math.acos =
'返回 `x` 的反余弦值(用弧度表示)。'
math.asin =
'返回 `x` 的反正弦值(用弧度表示)。'
math.atan['<5.2'] =
'返回 `x` 的反正切值(用弧度表示)。'
math.atan['>5.3'] =
'返回 `y/x` 的反正切值(用弧度表示)。'
math.atan2 =
'返回 `y/x` 的反正切值(用弧度表示)。'
math.ceil =
'返回不小于 `x` 的最小整数值。'
math.cos =
'返回 `x` 的余弦(假定参数是弧度)。'
math.cosh =
'返回 `x` 的双曲余弦(假定参数是弧度)。'
math.deg =
'将角 `x` 从弧度转换为角度。'
math.exp =
'返回 `e^x` 的值 e 为自然对数的底)。'
math.floor =
'返回不大于 `x` 的最大整数值。'
math.fmod =
'返回 `x` 除以 `y`,将商向零圆整后的余数。'
math.frexp =
'将 `x` 分解为尾数与指数,返回值符合 `x = m * (2 ^ e)` 。`e` 是一个整数,`m` 是 [0.5, 1) 之间的规格化小数 (`x` 为0时 `m` 为0)。'
math.huge =
'一个比任何数字值都大的浮点数。'
math.ldexp =
'返回 `m * (2 ^ e)` 。'
math.log['<5.1'] =
'返回 `x` 的自然对数。'
math.log['>5.2'] =
'回以指定底的 `x` 的对数。'
math.log10 =
'返回 `x` 的以10为底的对数。'
math.max =
'返回参数中最大的值, 大小由 Lua 操作 `<` 决定。'
math.maxinteger =
'最大值的整数。'
math.min =
'返回参数中最小的值, 大小由 Lua 操作 `<` 决定。'
math.mininteger =
'最小值的整数。'
math.modf =
'返回 `x` 的整数部分和小数部分。'
math.pi =
'*π* 的值。'
math.pow =
'返回 `x ^ y` 。'
math.rad =
'将角 `x` 从角度转换为弧度。'
math.random =
[[
* `math.random()`: [0,1)
* `math.random(n)`: [1, n]
* `math.random(m, n)`: [m, n]
]]
math.randomseed['<5.3'] =
'把 `x` 设为伪随机数发生器的“种子”: 相同的种子产生相同的随机数列。'
math.randomseed['>5.4'] =
[[
* `math.randomseed(x, y)`: `x` `y` 128
* `math.randomseed(x)`: `math.randomseed(x, 0)`
* `math.randomseed()`: Generates a seed with a weak attempt for randomness.
]]
math.sin =
'返回 `x` 的正弦值(假定参数是弧度)。'
math.sinh =
'返回 `x` 的双曲正弦值(假定参数是弧度)。'
math.sqrt =
'返回 `x` 的平方根。'
math.tan =
'返回 `x` 的正切值(假定参数是弧度)。'
math.tanh =
'返回 `x` 的双曲正切值(假定参数是弧度)。'
math.tointeger =
'如果 `x` 可以转换为一个整数, 返回该整数。'
math.type =
'如果 `x` 是整数,返回 `"integer"` 如果它是浮点数,返回 `"float"` 如果 `x` 不是数字,返回 `nil`。'
math.ult =
'如果整数 `m` 和 `n` 以无符号整数形式比较, `m` 在 `n` 之下,返回布尔真否则返回假。'
os =
''
os.clock =
'返回程序使用的按秒计 CPU 时间的近似值。'
os.date =
'返回一个包含日期及时刻的字符串或表。 格式化方法取决于所给字符串 `format`。'
os.difftime =
'返回以秒计算的时刻 `t1` 到 `t2` 的差值。'
os.execute =
'调用系统解释器执行 `command`。'
os.exit['<5.1'] =
'调用 C 函数 `exit` 终止宿主程序。'
os.exit['>5.2'] =
'调用 ISO C 函数 `exit` 终止宿主程序。'
os.getenv =
'返回进程环境变量 `varname` 的值。'
os.remove =
'删除指定名字的文件。'
os.rename =
'将名字为 `oldname` 的文件或目录更名为 `newname`。'
os.setlocale =
'设置程序的当前区域。'
os.time =
'当不传参数时,返回当前时刻。 如果传入一张表,就返回由这张表表示的时刻。'
os.tmpname =
'返回一个可用于临时文件的文件名字符串。'
osdate.year =
'四位数字'
osdate.month =
'1-12'
osdate.day =
'1-31'
osdate.hour =
'0-23'
osdate.min =
'0-59'
osdate.sec =
'0-61'
osdate.wday =
'星期几1-7星期天为 1'
osdate.yday =
'当年的第几天1-366'
osdate.isdst =
'夏令时标记,一个布尔量'
package =
''
require['<5.3'] =
'加载一个模块,返回该模块的返回值(`nil`时为`true`)。'
require['>5.4'] =
'加载一个模块,返回该模块的返回值(`nil`时为`true`)与搜索器返回的加载数据。默认搜索器的加载数据指示了加载位置,对于文件来说就是文件路径。'
package.config =
'一个描述有一些为包管理准备的编译期配置信息的串。'
package.cpath =
'这个路径被 `require` 在 C 加载器中做搜索时用到。'
package.loaded =
'用于 `require` 控制哪些模块已经被加载的表。'
package.loaders =
'用于 `require` 控制如何加载模块的表。'
package.loadlib =
'让宿主程序动态链接 C 库 `libname` 。'
package.path =
'这个路径被 `require` 在 Lua 加载器中做搜索时用到。'
package.preload =
'保存有一些特殊模块的加载器。'
package.searchers =
'用于 `require` 控制如何加载模块的表。'
package.searchpath =
'在指定 `path` 中搜索指定的 `name` 。'
package.seeall =
'给 `module` 设置一个元表,该元表的 `__index` 域为全局环境,这样模块便会继承全局环境的值。可作为 `module` 函数的选项。'
string =
''
string.byte =
'返回字符 `s[i]` `s[i+1]` ... `s[j]` 的内部数字编码。'
string.char =
'接收零或更多的整数。 返回和参数数量相同长度的字符串。 其中每个字符的内部编码值等于对应的参数值。'
string.dump =
'返回包含有以二进制方式表示的(一个 *二进制代码块* )指定函数的字符串。'
string.find =
'查找第一个字符串中匹配到的 `pattern`(参见 §6.4.1)。'
string.format =
'返回不定数量参数的格式化版本,格式化串为第一个参数。'
string.gmatch =
[[
`pattern`  §6.4.1 s
s
```lua
s =
"hello world from Lua"
for w in string.gmatch(s, "%a+") do
print(w)
end
```
]]
string.gsub =
'将字符串 s 中,所有的(或是在 n 给出时的前 n 个) pattern (参见 §6.4.1)都替换成 repl ,并返回其副本。'
string.len =
'返回其长度。'
string.lower =
'将其中的大写字符都转为小写后返回其副本。'
string.match =
'在字符串 s 中找到第一个能用 pattern (参见 §6.4.1)匹配到的部分。 如果能找到match 返回其中的捕获物; 否则返回 nil 。'
string.pack =
'返回一个打包了(即以二进制形式序列化) v1, v2 等值的二进制字符串。 字符串 fmt 为打包格式(参见 §6.4.2)。'
string.packsize =
[[返回以指定格式用 $string.pack 打包的字符串的长度。 格式化字符串中不可以有变长选项 's' 或 'z' (参见 §6.4.2)。]]
string.rep['>5.2'] =
'返回 `n` 个字符串 `s` 以字符串 `sep` 为分割符连在一起的字符串。 默认的 `sep` 值为空字符串(即没有分割符)。 如果 `n` 不是正数则返回空串。'
string.rep['<5.1'] =
'返回 `n` 个字符串 `s` 连在一起的字符串。 如果 `n` 不是正数则返回空串。'
string.reverse =
'返回字符串 s 的翻转串。'
string.sub =
'返回字符串的子串, 该子串从 `i` 开始到 `j` 为止。'
string.unpack =
'返回以格式 fmt (参见 §6.4.2 打包在字符串 s (参见 string.pack 中的值。'
string.upper =
'接收一个字符串,将其中的小写字符都转为大写后返回其副本。'
table =
''
table.concat =
'提供一个列表,其所有元素都是字符串或数字,返回字符串 `list[i]..sep..list[i+1] ··· sep..list[j]`。'
table.insert =
'在 `list` 的位置 `pos` 处插入元素 `value`。'
table.maxn =
'返回给定表的最大正数索引,如果表没有正数索引,则返回零。'
table.move =
[[
`a1` `a2`
```lua
a2[t],··· =
a1[f],···,a1[e]
return a2
```
]]
table.pack =
'返回用所有参数以键 `1`,`2`, 等填充的新表, 并将 `"n"` 这个域设为参数的总数。'
table.remove =
'移除 `list` 中 `pos` 位置上的元素,并返回这个被移除的值。'
table.sort =
'在表内从 `list[1]` 到 `list[#list]` *原地* 对其间元素按指定次序排序。'
table.unpack =
[[
```lua
return list[i], list[i+1], ···, list[j]
```
i 1 j #list
]]
table.foreach =
'遍历表中的每一个元素并以key和value执行回调函数。如果回调函数返回一个非nil值则循环终止,并且返回这个值。该函数等同pair(list),比pair(list)更慢。不推荐使用'
table.foreachi =
'遍历数组中的每一个元素并以索引号index和value执行回调函数。如果回调函数返回一个非nil值则循环终止,并且返回这个值。该函数等同ipair(list),比ipair(list)更慢。不推荐使用'
table.getn =
'返回表的长度。该函数等价于#list。'
table.new = -- TODO: need translate!
[[This creates a pre-sized table, just like the C API equivalent `lua_createtable()`. This is useful for big tables if the final table size is known and automatic table resizing is too expensive. `narray` parameter specifies the number of array-like items, and `nhash` parameter specifies the number of hash-like items. The function needs to be required before use.
```lua
require("table.new")
```
]]
table.clear = -- TODO: need translate!
[[This clears all keys and values from a table, but preserves the allocated array/hash sizes. This is useful when a table, which is linked from multiple places, needs to be cleared and/or when recycling a table for use by the same context. This avoids managing backlinks, saves an allocation and the overhead of incremental array/hash part growth. The function needs to be required before use.
```lua
require("table.clear").
```
Please note this function is meant for very specific situations. In most cases it's better to replace the (usually single) link with a new table and let the GC do its work.
]]
utf8 =
''
utf8.char =
'接收零或多个整数, 将每个整数转换成对应的 UTF-8 字节序列,并返回这些序列连接到一起的字符串。'
utf8.charpattern =
'用于精确匹配到一个 UTF-8 字节序列的模式,它假定处理的对象是一个合法的 UTF-8 字符串。'
utf8.codes =
[[
```lua
for p, c in utf8.codes(s) do
body
end
```
s p c
]]
utf8.codepoint =
'以整数形式返回 `s` 中 从位置 `i` 到 `j` 间(包括两端) 所有字符的编号。'
utf8.len =
'返回字符串 `s` 中 从位置 `i` 到 `j` 间 (包括两端) UTF-8 字符的个数。'
utf8.offset =
'返回编码在 `s` 中的第 `n` 个字符的开始位置(按字节数) (从位置 `i` 处开始统计)。'

View File

@ -1,443 +0,0 @@
---@diagnostic disable: undefined-global
config.addonManager.enable = -- TODO: need translate!
"Whether the addon manager is enabled or not."
config.runtime.version =
"Lua运行版本。"
config.runtime.path =
[[
使 `require`
`?/init.lua` `require 'myfile'` `{workspace}/myfile/init.lua`
`runtime.pathStrict` `false` `${workspace}/**/myfile/init.lua`
`Lua.workspace.library`
]]
config.runtime.pathStrict =
'启用后 `runtime.path` 将只搜索第一层目录,见 `runtime.path` 的说明。'
config.runtime.special =
[[
`include` `require`
```json
"Lua.runtime.special" : {
"include" : "require"
}
```
]]
config.runtime.unicodeName =
"允许在名字中使用 Unicode 字符。"
config.runtime.nonstandardSymbol =
"支持非标准的符号。请务必确认你的运行环境支持这些符号。"
config.runtime.plugin =
"插件路径,请查阅[文档](https://github.com/LuaLS/lua-language-server/wiki/Plugins)了解用法。"
config.runtime.pluginArgs = -- TODO: need translate!
"Additional arguments for the plugin."
config.runtime.fileEncoding =
"文件编码,`ansi` 选项只在 `Windows` 平台下有效。"
config.runtime.builtin =
[[
* `default`:
* `enable`:
* `disable`:
]]
config.runtime.meta =
'meta文件的目录名称格式。'
config.diagnostics.enable =
"启用诊断。"
config.diagnostics.disable =
"禁用的诊断(使用浮框括号内的代码)。"
config.diagnostics.globals =
"已定义的全局变量。"
config.diagnostics.severity =
[[
`!` `diagnostics.groupSeverity`
]]
config.diagnostics.neededFileStatus =
[[
* Opened:
* Any:
* None:
`!` `diagnostics.groupFileStatus`
]]
config.diagnostics.groupSeverity =
[[
`Fallback` `diagnostics.severity`
`!`
]]
config.diagnostics.groupFileStatus =
[[
* Opened:
* Any:
* None:
`Fallback` `diagnostics.neededFileStatus`
`!`
]]
config.diagnostics.workspaceEvent =
"设置触发工作区诊断的时机。"
config.diagnostics.workspaceEvent.OnChange =
"当文件发生变化时触发工作区诊断。"
config.diagnostics.workspaceEvent.OnSave =
"当文件保存时触发工作区诊断。"
config.diagnostics.workspaceEvent.None =
"关闭工作区诊断。"
config.diagnostics.workspaceDelay =
"进行工作区诊断的延迟(毫秒)。"
config.diagnostics.workspaceRate =
"工作区诊断的运行速率百分比。降低该值会减少CPU占用但是也会降低工作区诊断的速度。你当前正在编辑的文件的诊断总是全速完成不受该选项影响。"
config.diagnostics.libraryFiles =
"如何诊断通过 `Lua.workspace.library` 加载的文件。"
config.diagnostics.libraryFiles.Enable =
"总是诊断这些文件。"
config.diagnostics.libraryFiles.Opened =
"只有打开这些文件时才会诊断。"
config.diagnostics.libraryFiles.Disable =
"不诊断这些文件。"
config.diagnostics.ignoredFiles =
"如何诊断被忽略的文件。"
config.diagnostics.ignoredFiles.Enable =
"总是诊断这些文件。"
config.diagnostics.ignoredFiles.Opened =
"只有打开这些文件时才会诊断。"
config.diagnostics.ignoredFiles.Disable =
"不诊断这些文件。"
config.diagnostics.disableScheme =
'不诊断使用以下 scheme 的lua文件。'
config.diagnostics.unusedLocalExclude =
'如果变量名匹配以下规则,则不对其进行 `unused-local` 诊断。'
config.workspace.ignoreDir =
"忽略的文件与目录(使用 `.gitignore` 语法)。"
config.workspace.ignoreSubmodules =
"忽略子模块。"
config.workspace.useGitIgnore =
"忽略 `.gitignore` 中列举的文件。"
config.workspace.maxPreload =
"最大预加载文件数。"
config.workspace.preloadFileSize =
"预加载时跳过大小大于该值KB的文件。"
config.workspace.library =
"除了当前工作区以外,还会从哪些目录中加载文件。这些目录中的文件将被视作外部提供的代码库,部分操作(如重命名字段)不会修改这些文件。"
config.workspace.checkThirdParty =
[[
* OpenResty
* Cocos4.0
* LÖVE
* LÖVR
* skynet
* Jass
]]
config.workspace.userThirdParty =
'在这里添加私有的第三方库适配文件路径,请参考内置的[配置文件路径](https://github.com/LuaLS/lua-language-server/tree/master/meta/3rd)'
config.workspace.supportScheme =
'为以下 scheme 的lua文件提供语言服务。'
config.completion.enable =
'启用自动完成。'
config.completion.callSnippet =
'显示函数调用片段。'
config.completion.callSnippet.Disable =
"只显示 `函数名`。"
config.completion.callSnippet.Both =
"显示 `函数名` 与 `调用片段`。"
config.completion.callSnippet.Replace =
"只显示 `调用片段`。"
config.completion.keywordSnippet =
'显示关键字语法片段'
config.completion.keywordSnippet.Disable =
"只显示 `关键字`。"
config.completion.keywordSnippet.Both =
"显示 `关键字` 与 `语法片段`。"
config.completion.keywordSnippet.Replace =
"只显示 `语法片段`。"
config.completion.displayContext =
"预览建议的相关代码片段,可能可以帮助你了解这项建议的用法。设置的数字表示代码片段的截取行数,设置为`0`可以禁用此功能。"
config.completion.workspaceWord =
"显示的上下文单词是否包含工作区中其他文件的内容。"
config.completion.showWord =
"在建议中显示上下文单词。"
config.completion.showWord.Enable =
"总是在建议中显示上下文单词。"
config.completion.showWord.Fallback =
"无法根据语义提供建议时才显示上下文单词。"
config.completion.showWord.Disable =
"不显示上下文单词。"
config.completion.autoRequire =
"输入内容看起来是个文件名时,自动 `require` 此文件。"
config.completion.showParams =
"在建议列表中显示函数的参数信息,函数拥有多个定义时会分开显示。"
config.completion.requireSeparator =
"`require` 时使用的分隔符。"
config.completion.postfix =
"用于触发后缀建议的符号。"
config.color.mode =
"着色模式。"
config.color.mode.Semantic =
"语义着色。你可能需要同时将 `editor.semanticHighlighting.enabled` 设置为 `true` 才能生效。"
config.color.mode.SemanticEnhanced =
"增强的语义颜色。 类似于`Semantic`,但会进行额外的分析(也会带来额外的开销)。"
config.color.mode.Grammar =
"语法着色。"
config.semantic.enable =
"启用语义着色。你可能需要同时将 `editor.semanticHighlighting.enabled` 设置为 `true` 才能生效。"
config.semantic.variable =
"对变量/字段/参数进行语义着色。"
config.semantic.annotation =
"对类型注解进行语义着色。"
config.semantic.keyword =
"对关键字/字面量/运算符进行语义着色。只有当你的编辑器无法进行语法着色时才需要启用此功能。"
config.signatureHelp.enable =
"启用参数提示。"
config.hover.enable =
"启用悬停提示。"
config.hover.viewString =
"悬停提示查看字符串内容(仅当字面量包含转义符时)。"
config.hover.viewStringMax =
"悬停提示查看字符串内容时的最大长度。"
config.hover.viewNumber =
"悬停提示查看数字内容(仅当字面量不是十进制时)。"
config.hover.fieldInfer =
"悬停提示查看表时,会对表的每个字段进行类型推测,当类型推测的用时累计达到该设定值(毫秒)时,将跳过后续字段的类型推测。"
config.hover.previewFields =
"悬停提示查看表时,限制表内字段的最大预览数量。"
config.hover.enumsLimit =
"当值对应多个类型时,限制类型的显示数量。"
config.hover.expandAlias =
[[
`---@alias myType boolean|number` 展开后显示为 `boolean|number`,否则显示为 `myType`。
]]
config.develop.enable =
'开发者模式。请勿开启,会影响性能。'
config.develop.debuggerPort =
'调试器监听端口。'
config.develop.debuggerWait =
'调试器连接之前挂起。'
config.intelliSense.searchDepth =
'设置智能感知的搜索深度。增大该值可以增加准确度,但会降低性能。不同的项目对该设置的容忍度差异较大,请自己调整为合适的值。'
config.intelliSense.fastGlobal =
'在对全局变量进行补全,及查看 `_G` 的悬浮提示时进行优化。这会略微降低类型推测的准确度,但是对于大量使用全局变量的项目会有大幅的性能提升。'
config.window.statusBar =
'在状态栏显示插件状态。'
config.window.progressBar =
'在状态栏显示进度条。'
config.hint.enable =
'启用内联提示。'
config.hint.paramType =
'在函数的参数位置提示类型。'
config.hint.setType =
'在赋值操作位置提示类型。'
config.hint.paramName =
'在函数调用处提示参数名。'
config.hint.paramName.All =
'所有类型的参数均进行提示。'
config.hint.paramName.Literal =
'只有字面量类型的参数进行提示。'
config.hint.paramName.Disable =
'禁用参数提示。'
config.hint.arrayIndex =
'在构造表时提示数组索引。'
config.hint.arrayIndex.Enable =
'所有的表中都提示数组索引。'
config.hint.arrayIndex.Auto =
'只有表大于3项或者表是混合类型时才进行提示。'
config.hint.arrayIndex.Disable =
'禁用数组索引提示。'
config.hint.await =
'如果调用的函数被标记为了 `---@async` ,则在调用处提示 `await` 。'
config.hint.semicolon =
'若语句尾部没有分号,则显示虚拟分号。'
config.hint.semicolon.All =
'所有语句都显示虚拟分号。'
config.hint.semicolon.SameLine =
'2个语句在同一行时在它们之间显示分号。'
config.hint.semicolon.Disable =
'禁用虚拟分号。'
config.codeLens.enable = -- TODO: need translate!
'启用代码度量。'
config.format.enable =
'启用代码格式化程序。'
config.format.defaultConfig =
[[
`.editorconfig`
[](https://github.com/CppCXY/EmmyLuaCodeStyle/tree/master/docs)
]]
config.spell.dict =
'拼写检查的自定义单词。'
config.nameStyle.config =
'设定命名风格检查的配置'
config.telemetry.enable =
[[
[](https://github.com/LuaLS/lua-language-server/wiki/Home#privacy)
]]
config.misc.parameters =
'VSCode中启动语言服务时的[命令行参数](https://github.com/LuaLS/lua-language-server/wiki/Getting-Started#arguments)。'
config.misc.executablePath =
'VSCode中指定可执行文件路径。'
config.IntelliSense.traceLocalSet =
'请查阅[文档](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features)了解用法。'
config.IntelliSense.traceReturn =
'请查阅[文档](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features)了解用法。'
config.IntelliSense.traceBeSetted =
'请查阅[文档](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features)了解用法。'
config.IntelliSense.traceFieldInject =
'请查阅[文档](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features)了解用法。'
config.type.castNumberToInteger =
'允许将 `number` 类型赋给 `integer` 类型。'
config.type.weakUnionCheck =
[[
`false` `number|boolean` `number` `true`
]]
config.type.weakNilCheck =
[[
`nil`
`false` `numer|nil` `number` `true`
]]
config.doc.privateName =
'将特定名称的字段视为私有,例如 `m_*` 意味着 `XXX.m_id` 与 `XXX.m_type` 是私有字段,只能在定义所在的类中访问。'
config.doc.protectedName =
'将特定名称的字段视为受保护,例如 `m_*` 意味着 `XXX.m_id` 与 `XXX.m_type` 是受保护的字段,只能在定义所在的类极其子类中访问。'
config.doc.packageName =
'将特定名称的字段视为package例如 `m_*` 意味着 `XXX.m_id` 与 `XXX.m_type` 只能在定义所在的文件中访问。'
config.diagnostics['unused-local'] =
'未使用的局部变量'
config.diagnostics['unused-function'] =
'未使用的函数'
config.diagnostics['undefined-global'] =
'未定义的全局变量'
config.diagnostics['global-in-nil-env'] =
'不能使用全局变量( `_ENV` 被设置为了 `nil`'
config.diagnostics['unused-label'] =
'未使用的标签'
config.diagnostics['unused-vararg'] =
'未使用的不定参数'
config.diagnostics['trailing-space'] =
'后置空格'
config.diagnostics['redefined-local'] =
'重复定义的局部变量'
config.diagnostics['newline-call'] =
'以 `(` 开始的新行,在语法上被解析为了上一行的函数调用'
config.diagnostics['newfield-call'] =
'在字面量表中2行代码之间缺少分隔符在语法上被解析为了一次索引操作'
config.diagnostics['redundant-parameter'] =
'函数调用时,传入了多余的参数'
config.diagnostics['ambiguity-1'] =
'优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1` '
config.diagnostics['lowercase-global'] =
'首字母小写的全局变量定义'
config.diagnostics['undefined-env-child'] =
'`_ENV` 被设置为了新的字面量表,但是试图获取的全局变量不再这张表中'
config.diagnostics['duplicate-index'] =
'在字面量表中重复定义了索引'
config.diagnostics['empty-block'] =
'空代码块'
config.diagnostics['redundant-value'] =
'赋值操作时,值的数量比被赋值的对象多'
config.diagnostics['assign-type-mismatch'] = -- TODO: need translate!
'Enable diagnostics for assignments in which the value\'s type does not match the type of the assigned variable.'
config.diagnostics['await-in-sync'] = -- TODO: need translate!
'Enable diagnostics for calls of asynchronous functions within a synchronous function.'
config.diagnostics['cast-local-type'] = -- TODO: need translate!
'Enable diagnostics for casts of local variables where the target type does not match the defined type.'
config.diagnostics['cast-type-mismatch'] = -- TODO: need translate!
'Enable diagnostics for casts where the target type does not match the initial type.'
config.diagnostics['circular-doc-class'] = -- TODO: need translate!
'Enable diagnostics for two classes inheriting from each other introducing a circular relation.'
config.diagnostics['close-non-object'] = -- TODO: need translate!
'Enable diagnostics for attempts to close a variable with a non-object.'
config.diagnostics['code-after-break'] = -- TODO: need translate!
'Enable diagnostics for code placed after a break statement in a loop.'
config.diagnostics['codestyle-check'] = -- TODO: need translate!
'Enable diagnostics for incorrectly styled lines.'
config.diagnostics['count-down-loop'] = -- TODO: need translate!
'Enable diagnostics for `for` loops which will never reach their max/limit because the loop is incrementing instead of decrementing.'
config.diagnostics['deprecated'] = -- TODO: need translate!
'Enable diagnostics to highlight deprecated API.'
config.diagnostics['different-requires'] = -- TODO: need translate!
'Enable diagnostics for files which are required by two different paths.'
config.diagnostics['discard-returns'] = -- TODO: need translate!
'Enable diagnostics for calls of functions annotated with `---@nodiscard` where the return values are ignored.'
config.diagnostics['doc-field-no-class'] = -- TODO: need translate!
'Enable diagnostics to highlight a field annotation without a defining class annotation.'
config.diagnostics['duplicate-doc-alias'] = -- TODO: need translate!
'Enable diagnostics for a duplicated alias annotation name.'
config.diagnostics['duplicate-doc-field'] = -- TODO: need translate!
'Enable diagnostics for a duplicated field annotation name.'
config.diagnostics['duplicate-doc-param'] = -- TODO: need translate!
'Enable diagnostics for a duplicated param annotation name.'
config.diagnostics['duplicate-set-field'] = -- TODO: need translate!
'Enable diagnostics for setting the same field in a class more than once.'
config.diagnostics['incomplete-signature-doc'] = -- TODO: need translate!
'Incomplete @param or @return annotations for functions.'
config.diagnostics['invisible'] = -- TODO: need translate!
'Enable diagnostics for accesses to fields which are invisible.'
config.diagnostics['missing-global-doc'] = -- TODO: need translate!
'Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.'
config.diagnostics['missing-local-export-doc'] = -- TODO: need translate!
'Missing annotations for exported locals! Exported local functions must have a comment and annotations for all parameters and return values.'
config.diagnostics['missing-parameter'] = -- TODO: need translate!
'Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.'
config.diagnostics['missing-return'] = -- TODO: need translate!
'Enable diagnostics for functions with return annotations which have no return statement.'
config.diagnostics['missing-return-value'] = -- TODO: need translate!
'Enable diagnostics for return statements without values although the containing function declares returns.'
config.diagnostics['need-check-nil'] = -- TODO: need translate!
'Enable diagnostics for variable usages if `nil` or an optional (potentially `nil`) value was assigned to the variable before.'
config.diagnostics['no-unknown'] = -- TODO: need translate!
'Enable diagnostics for cases in which the type cannot be inferred.'
config.diagnostics['not-yieldable'] = -- TODO: need translate!
'Enable diagnostics for calls to `coroutine.yield()` when it is not permitted.'
config.diagnostics['param-type-mismatch'] = -- TODO: need translate!
'Enable diagnostics for function calls where the type of a provided parameter does not match the type of the annotated function definition.'
config.diagnostics['redundant-return'] = -- TODO: need translate!
'Enable diagnostics for return statements which are not needed because the function would exit on its own.'
config.diagnostics['redundant-return-value']= -- TODO: need translate!
'Enable diagnostics for return statements which return an extra value which is not specified by a return annotation.'
config.diagnostics['return-type-mismatch'] = -- TODO: need translate!
'Enable diagnostics for return values whose type does not match the type declared in the corresponding return annotation.'
config.diagnostics['spell-check'] = -- TODO: need translate!
'Enable diagnostics for typos in strings.'
config.diagnostics['name-style-check'] = -- TODO: need translate!
'Enable diagnostics for name style.'
config.diagnostics['unbalanced-assignments']= -- TODO: need translate!
'Enable diagnostics on multiple assignments if not all variables obtain a value (e.g., `local x,y = 1`).'
config.diagnostics['undefined-doc-class'] = -- TODO: need translate!
'Enable diagnostics for class annotations in which an undefined class is referenced.'
config.diagnostics['undefined-doc-name'] = -- TODO: need translate!
'Enable diagnostics for type annotations referencing an undefined type or alias.'
config.diagnostics['undefined-doc-param'] = -- TODO: need translate!
'Enable diagnostics for cases in which a parameter annotation is given without declaring the parameter in the function definition.'
config.diagnostics['undefined-field'] = -- TODO: need translate!
'Enable diagnostics for cases in which an undefined field of a variable is read.'
config.diagnostics['unknown-cast-variable'] = -- TODO: need translate!
'Enable diagnostics for casts of undefined variables.'
config.diagnostics['unknown-diag-code'] = -- TODO: need translate!
'Enable diagnostics in cases in which an unknown diagnostics code is entered.'
config.diagnostics['unknown-operator'] = -- TODO: need translate!
'Enable diagnostics for unknown operators.'
config.diagnostics['unreachable-code'] = -- TODO: need translate!
'Enable diagnostics for unreachable code.'
config.diagnostics['global-element'] = -- TODO: need translate!
'Enable diagnostics to warn about global elements.'
config.typeFormat.config = -- TODO: need translate!
'Configures the formatting behavior while typing Lua code.'
config.typeFormat.config.auto_complete_end = -- TODO: need translate!
'Controls if `end` is automatically completed at suitable positions.'
config.typeFormat.config.auto_complete_table_sep = -- TODO: need translate!
'Controls if a separator is automatically appended at the end of a table declaration.'
config.typeFormat.config.format_line = -- TODO: need translate!
'Controls if a line is formatted at all.'
command.exportDocument =
'Lua: 导出文档...'
command.addon_manager.open =
'Lua: 打开插件管理器...'
command.reloadFFIMeta =
'Lua: 重新生成luajit的FFI模块C语言元数据'

View File

@ -1,743 +0,0 @@
---@diagnostic disable: undefined-global, lowercase-global
arg =
'獨立版Lua的啟動引數。'
assert =
'如果其引數 `v` 的值為假( `nil` 或 `false` ),它就呼叫 $error ;否則,回傳所有的引數。在錯誤情況時, `message` 指那個錯誤對象;如果不提供這個引數,預設為 `"assertion failed!"` 。'
cgopt.collect =
'做一次完整的垃圾回收循環。'
cgopt.stop =
'停止垃圾回收器的執行。'
cgopt.restart =
'重新啟動垃圾回收器的自動執行。'
cgopt.count =
'以 K 位元組數為單位回傳 Lua 使用的總記憶體數。'
cgopt.step =
'單步執行垃圾回收器。 步長“大小”由 `arg` 控制。'
cgopt.setpause =
'將 `arg` 設為回收器的 *間歇率* 。'
cgopt.setstepmul =
'將 `arg` 設為回收器的 *步進倍率* 。'
cgopt.incremental =
'改變回收器模式為增量模式。'
cgopt.generational =
'改變回收器模式為分代模式。'
cgopt.isrunning =
'回傳表示回收器是否在工作的布林值。'
collectgarbage =
'這個函式是垃圾回收器的一般介面。透過引數 opt 它提供了一組不同的功能。'
dofile =
'打開該名字的檔案,並執行檔案中的 Lua 程式碼區塊。不帶引數呼叫時, `dofile` 執行標準輸入的內容(`stdin`)。回傳該程式碼區塊的所有回傳值。對於有錯誤的情況, `dofile` 將錯誤回饋給呼叫者(即 `dofile` 沒有執行在保護模式下)。'
error =
[[
`message` `error`
`message` `error` `level`
]]
_G =
'一個全域變數(非函式),內部儲存有全域環境(參見 §2.2)。 Lua 自己不使用這個變數;改變這個變數的值不會對任何環境造成影響,反之亦然。'
getfenv =
'回傳給定函式的環境。 `f` 可以是一個Lua函式也可是一個表示呼叫堆疊層級的數字。'
getmetatable =
'如果 `object` 不包含中繼資料表,回傳 `nil` 。否則,如果在該物件的中繼資料表中有 `"__metatable"` 域時回傳其關聯值,沒有時回傳該對象的中繼資料表。'
ipairs =
[[
`t` `0`
```lua
for i,v in ipairs(t) do body end
```
`(1,t[1])(2,t[2])...`
]]
loadmode.b =
'只能是二進制程式碼區塊。'
loadmode.t =
'只能是文字程式碼區塊。'
loadmode.bt =
'可以是二進制也可以是文字。'
load['<5.1'] =
'使用 `func` 分段載入程式碼區塊。每次呼叫 `func` 必須回傳一個字串用於連接前文。'
load['>5.2'] =
[[
`chunk` `chunk` `load` `chunk` `nil`
]]
loadfile =
'從檔案 `filename` 或標準輸入(如果檔名未提供)中獲取程式碼區塊。'
loadstring =
'使用給定字串載入程式碼區塊。'
module =
'建立一個模組。'
next =
[[
`next` `nil` `next` `nil` `next` `nil` `nil` `next(t)`
使使 `for`
`next`
]]
pairs =
[[
`t` `__pairs` `t`
`next` `t` `nil`
```lua
for k,v in pairs(t) do body end
```
`t`
$next
]]
pcall =
'透過將函式 `f` 傳入引數,以 *保護模式* 呼叫 `f` 。這意味著 `f` 中的任何錯誤不會擲回;取而代之的是, `pcall` 會將錯誤捕獲到,並回傳一個狀態碼。第一個回傳值是狀態碼(一個布林值),當沒有錯誤時,其為 `true` 。此時, `pcall` 同樣會在狀態碼後回傳所有呼叫的結果。在有錯誤時,`pcall` 回傳 `false` 加錯誤訊息。'
print =
'接收任意數量的引數,並將它們的值列印到 `stdout`。它用 `tostring` 函式將每個引數都轉換為字串。 `print` 不用於做格式化輸出。僅作為看一下某個值的快捷方式,多用於除錯。完整的對輸出的控制,請使用 $string.format 以及 $io.write。'
rawequal =
'在不觸發任何元方法的情況下,檢查 `v1` 是否和 `v2` 相等。回傳一個布林值。'
rawget =
'在不觸發任何元方法的情況下,獲取 `table[index]` 的值。 `table` 必須是一張表; `index` 可以是任何值。'
rawlen =
'在不觸發任何元方法的情況下,回傳物件 `v` 的長度。 `v` 可以是表或字串。它回傳一個整數。'
rawset =
[[
`table[index]` `value` `table` `index` `nil` `NaN` `value` Lua
`table`
]]
select =
'如果 `index` 是個數字,那麼回傳引數中第 `index` 個之後的部分;負的數字會從後向前索引(`-1` 指最後一個引數)。否則, `index` 必須是字串 `"#"` ,此時 `select` 回傳引數的個數。'
setfenv =
'設定給定函式的環境。'
setmetatable =
[[
Lua C `metatable` `nil` `"__metatable"`
]]
tonumber =
[[
`base` `tonumber` `tonumber` `fail`
Lua §3.1
]]
tostring =
[[
`v` `"__tostring"` `tostring` `v`
使 $string.format
]]
type =
[[
`"nil"` `nil` `"number"` `"string"` `"boolean"` `"table"` `"function"` `"thread"` `"userdata"`
]]
_VERSION =
'一個包含有目前直譯器版本號的全域變數(並非函式)。'
warn =
'使用所有引數組成的字串訊息來發送警告。'
xpcall['=5.1'] =
'透過將函式 `f` 傳入引數,以 *保護模式* 呼叫 `f` 。這個函式和 `pcall` 類似。不過它可以額外設定一個訊息處理器 `err`。'
xpcall['>5.2'] =
'透過將函式 `f` 傳入引數,以 *保護模式* 呼叫 `f` 。這個函式和 `pcall` 類似。不過它可以額外設定一個訊息處理器 `msgh`。'
unpack =
[[
`list`
```lua
return list[i], list[i+1], ···, list[j]
```
]]
bit32 =
''
bit32.arshift =
[[
`x` `disp` `disp` 使 `x` 使 `0`
]]
bit32.band =
'回傳參數按位元及的結果。'
bit32.bnot =
[[
`x`
```lua
assert(bit32.bnot(x) ==
(-1 - x) % 2^32)
```
]]
bit32.bor =
'回傳參數按位元或的結果。'
bit32.btest =
'參數按位元與的結果不為 `0` 時,回傳 `true` 。'
bit32.bxor =
'回傳參數按位元互斥或的結果。'
bit32.extract =
'回傳 `n` 中第 `field` 到第 `field + width - 1` 位組成的結果。'
bit32.replace =
'回傳 `v` 的第 `field` 到第 `field + width - 1` 位替換 `n` 的對應位後的結果。'
bit32.lrotate =
'回傳 `x` 向左旋轉 `disp` 位的結果。`disp` 為負時向右旋轉。'
bit32.lshift =
[[
`x` `disp` `disp` 使 `0`
```lua
assert(bit32.lshift(b, disp) ==
(b * 2^disp) % 2^32)
```
]]
bit32.rrotate =
'回傳 `x` 向右旋轉 `disp` 位的結果。`disp` 為負時向左旋轉。'
bit32.rshift =
[[
`x` `disp` `disp` 使 `0`
```lua
assert(bit32.lshift(b, disp) ==
(b * 2^disp) % 2^32)
```
]]
coroutine =
''
coroutine.create =
'建立一個主體函式為 `f` 的新共常式。 f 必須是一個 Lua 的函式。回傳這個新共常式,它是一個類型為 `"thread"` 的物件。'
coroutine.isyieldable =
'如果正在執行的共常式可以讓出,則回傳真。'
coroutine.isyieldable['>5.4'] =
'如果共常式 `co` 可以讓出,則回傳真。 `co` 預設為正在執行的共常式。'
coroutine.close =
'關閉共常式 `co` ,並關閉它所有等待 *to-be-closed* 的變數,並將共常式狀態設為 `dead` 。'
coroutine.resume =
'開始或繼續共常式 `co` 的執行。'
coroutine.running =
'回傳目前正在執行的共常式加一個布林值。如果目前執行的共常式是主執行緒,其為真。'
coroutine.status =
'以字串形式回傳共常式 `co` 的狀態。'
coroutine.wrap =
'建立一個主體函式為 `f` 的新共常式。 f 必須是一個 Lua 的函式。回傳一個函式,每次呼叫該函式都會延續該共常式。'
coroutine.yield =
'懸置正在呼叫的共常式的執行。'
costatus.running =
'正在執行。'
costatus.suspended =
'懸置或是還沒有開始執行。'
costatus.normal =
'是活動的,但並不在執行。'
costatus.dead =
'執行完主體函式或因錯誤停止。'
debug =
''
debug.debug =
'進入一個使用者互動模式,執行使用者輸入的每個字串。'
debug.getfenv =
'回傳物件 `o` 的環境。'
debug.gethook =
'回傳三個表示執行緒攔截設定的值:目前攔截函式,目前攔截遮罩,目前攔截計數。'
debug.getinfo =
'回傳關於一個函式資訊的表。'
debug.getlocal['<5.1'] =
'回傳在堆疊的 `level` 層處函式的索引為 `index` 的區域變數的名字和值。'
debug.getlocal['>5.2'] =
'回傳在堆疊的 `f` 層處函式的索引為 `index` 的區域變數的名字和值。'
debug.getmetatable =
'回傳給定 `value` 的中繼資料表。'
debug.getregistry =
'回傳註冊表。'
debug.getupvalue =
'回傳函式 `f` 的第 `up` 個上值的名字和值。'
debug.getuservalue['<5.3']=
'回傳關聯在 `u` 上的 `Lua` 值。'
debug.getuservalue['>5.4']=
'回傳關聯在 `u` 上的第 `n` 個 `Lua` 值,以及一個布林, `false` 表示值不存在。'
debug.setcstacklimit =
[[
### ** `Lua 5.4.2` **
C堆疊限制Lua中巢狀呼叫的深度
`false`
]]
debug.setfenv =
'將 `table` 設定為 `object` 的環境。'
debug.sethook =
'將一個函式設定為攔截函式。'
debug.setlocal =
'將 `value` 賦給 堆疊上第 `level` 層函式的第 `local` 個區域變數。'
debug.setmetatable =
'將 `value` 的中繼資料表設為 `table` (可以是 `nil` )。'
debug.setupvalue =
'將 `value` 設為函式 `f` 的第 `up` 個上值。'
debug.setuservalue['<5.3']=
'將 `value` 設為 `udata` 的關聯值。'
debug.setuservalue['>5.4']=
'將 `value` 設為 `udata` 的第 `n` 個關聯值。'
debug.traceback =
'回傳呼叫堆疊的堆疊回溯資訊。字串可選項 `message` 被添加在堆疊回溯資訊的開頭。'
debug.upvalueid =
'回傳指定函式第 `n` 個上值的唯一識別字(一個輕量使用者資料)。'
debug.upvaluejoin =
'讓 Lua 閉包 `f1` 的第 `n1` 個上值 引用 `Lua` 閉包 `f2` 的第 `n2` 個上值。'
infowhat.n =
'`name` 和 `namewhat`'
infowhat.S =
'`source` 、 `short_src` 、 `linedefined` 、 `lalinedefined` 和 `what`'
infowhat.l =
'`currentline`'
infowhat.t =
'`istailcall`'
infowhat.u['<5.1'] =
'`nups`'
infowhat.u['>5.2'] =
'`nups` 、 `nparams` 和 `isvararg`'
infowhat.f =
'`func`'
infowhat.r =
'`ftransfer` 和 `ntransfer`'
infowhat.L =
'`activelines`'
hookmask.c =
'每當 Lua 呼叫一個函式時,呼叫攔截。'
hookmask.r =
'每當 Lua 從一個函式內回傳時,呼叫攔截。'
hookmask.l =
'每當 Lua 進入新的一行時,呼叫攔截。'
file =
''
file[':close'] =
'關閉 `file`。'
file[':flush'] =
'將寫入的資料儲存到 `file` 中。'
file[':lines'] =
[[
------
```lua
for c in file:lines(...) do
body
end
```
]]
file[':read'] =
'讀取檔案 `file` ,指定的格式決定了要讀取什麼。'
file[':seek'] =
'設定及獲取基於檔案開頭處計算出的位置。'
file[':setvbuf'] =
'設定輸出檔案的緩衝模式。'
file[':write'] =
'將引數的值逐個寫入 `file` 。'
readmode.n =
'讀取一個數字,根據 Lua 的轉換文法回傳浮點數或整數。'
readmode.a =
'從目前位置開始讀取整個檔案。'
readmode.l =
'讀取一行並忽略行尾標記。'
readmode.L =
'讀取一行並保留行尾標記。'
seekwhence.set =
'基點為 0 (檔案開頭)。'
seekwhence.cur =
'基點為目前位置。'
seekwhence['.end'] =
'基點為檔案尾。'
vbuf.no =
'不緩衝;輸出操作立刻生效。'
vbuf.full =
'完全緩衝;只有在快取滿或呼叫 flush 時才做輸出操作。'
vbuf.line =
'行緩衝;輸出將緩衝到每次換行前。'
io =
''
io.stdin =
'標準輸入。'
io.stdout =
'標準輸出。'
io.stderr =
'標準錯誤。'
io.close =
'關閉 `file` 或預設輸出檔案。'
io.flush =
'將寫入的資料儲存到預設輸出檔案中。'
io.input =
'設定 `file` 為預設輸入檔案。'
io.lines =
[[
------
```lua
for c in io.lines(filename, ...) do
body
end
```
]]
io.open =
'用字串 `mode` 指定的模式打開一個檔案。'
io.output =
'設定 `file` 為預設輸出檔案。'
io.popen =
'用一個分離處理程序開啟程式 `prog` 。'
io.read =
'讀取檔案 `file` ,指定的格式決定了要讀取什麼。'
io.tmpfile =
'如果成功,回傳一個臨時檔案的控制代碼。'
io.type =
'檢查 `obj` 是否是合法的檔案控制代碼。'
io.write =
'將引數的值逐個寫入預設輸出檔案。'
openmode.r =
'讀取模式。'
openmode.w =
'寫入模式。'
openmode.a =
'追加模式。'
openmode['.r+'] =
'更新模式,所有之前的資料都保留。'
openmode['.w+'] =
'更新模式,所有之前的資料都刪除。'
openmode['.a+'] =
'追加更新模式,所有之前的資料都保留,只允許在檔案尾部做寫入。'
openmode.rb =
'讀取模式。(二進制方式)'
openmode.wb =
'寫入模式。(二進制方式)'
openmode.ab =
'追加模式。(二進制方式)'
openmode['.r+b'] =
'更新模式,所有之前的資料都保留。(二進制方式)'
openmode['.w+b'] =
'更新模式,所有之前的資料都刪除。(二進制方式)'
openmode['.a+b'] =
'追加更新模式,所有之前的資料都保留,只允許在檔案尾部做寫入。(二進制方式)'
popenmode.r =
'從這個程式中讀取資料。(二進制方式)'
popenmode.w =
'向這個程式寫入輸入。(二進制方式)'
filetype.file =
'是一個打開的檔案控制代碼。'
filetype['.closed file'] =
'是一個關閉的檔案控制代碼。'
filetype['.nil'] =
'不是檔案控制代碼。'
math =
''
math.abs =
'回傳 `x` 的絕對值。'
math.acos =
'回傳 `x` 的反餘弦值(用弧度表示)。'
math.asin =
'回傳 `x` 的反正弦值(用弧度表示)。'
math.atan['<5.2'] =
'回傳 `x` 的反正切值(用弧度表示)。'
math.atan['>5.3'] =
'回傳 `y/x` 的反正切值(用弧度表示)。'
math.atan2 =
'回傳 `y/x` 的反正切值(用弧度表示)。'
math.ceil =
'回傳不小於 `x` 的最小整數值。'
math.cos =
'回傳 `x` 的餘弦(假定引數是弧度)。'
math.cosh =
'回傳 `x` 的雙曲餘弦(假定引數是弧度)。'
math.deg =
'將角 `x` 從弧度轉換為角度。'
math.exp =
'回傳 `e^x` 的值e 為自然對數的底)。'
math.floor =
'回傳不大於 `x` 的最大整數值。'
math.fmod =
'回傳 `x` 除以 `y`,將商向零捨入後的餘數。'
math.frexp =
'將 `x` 分解為尾數與指數,回傳值符合 `x = m * (2 ^ e)` 。`e` 是一個整數,`m` 是 [0.5, 1) 之間的規格化小數 (`x` 為0時 `m` 為0)。'
math.huge =
'一個比任何數字值都大的浮點數。'
math.ldexp =
'回傳 `m * (2 ^ e)` 。'
math.log['<5.1'] =
'回傳 `x` 的自然對數。'
math.log['>5.2'] =
'回以指定底的 `x` 的對數。'
math.log10 =
'回傳 `x` 的以10為底的對數。'
math.max =
'回傳引數中最大的值,大小由 Lua 運算子 `<` 決定。'
math.maxinteger =
'最大值的整數。'
math.min =
'回傳引數中最小的值,大小由 Lua 運算子 `<` 決定。'
math.mininteger =
'最小值的整數。'
math.modf =
'回傳 `x` 的整數部分和小數部分。'
math.pi =
'*π* 的值。'
math.pow =
'回傳 `x ^ y` 。'
math.rad =
'將角 `x` 從角度轉換為弧度。'
math.random =
[[
* `math.random()` [0,1)
* `math.random(n)` [1, n]
* `math.random(m, n)` [m, n]
]]
math.randomseed['<5.3'] =
'把 `x` 設為偽隨機數發生器的“種子”: 相同的種子產生相同的隨機數列。'
math.randomseed['>5.4'] =
[[
* `math.randomseed(x, y)` `x` `y` 128
* `math.randomseed(x)` `math.randomseed(x, 0)`
* `math.randomseed()`
]]
math.sin =
'回傳 `x` 的正弦值(假定引數是弧度)。'
math.sinh =
'回傳 `x` 的雙曲正弦值(假定引數是弧度)。'
math.sqrt =
'回傳 `x` 的平方根。'
math.tan =
'回傳 `x` 的正切值(假定引數是弧度)。'
math.tanh =
'回傳 `x` 的雙曲正切值(假定引數是弧度)。'
math.tointeger =
'如果 `x` 可以轉換為一個整數,回傳該整數。'
math.type =
'如果 `x` 是整數,回傳 `"integer"` ,如果它是浮點數,回傳 `"float"` ,如果 `x` 不是數字,回傳 `nil` 。'
math.ult =
'整數 `m` 和 `n` 以無符號整數形式比較,如果 `m` 在 `n` 之下則回傳布林真,否則回傳假。'
os =
''
os.clock =
'回傳程式使用的 CPU 時間的近似值,單位為秒。'
os.date =
'回傳一個包含日期及時刻的字串或表。格式化方法取決於所給字串 `format` 。'
os.difftime =
'回傳以秒計算的時刻 `t1` 到 `t2` 的差值。'
os.execute =
'呼叫作業系統殼層執行 `command` 。'
os.exit['<5.1'] =
'呼叫 C 函式 `exit` 終止宿主程式。'
os.exit['>5.2'] =
'呼叫 ISO C 函式 `exit` 終止宿主程式。'
os.getenv =
'回傳處理程序環境變數 `varname` 的值。'
os.remove =
'刪除指定名字的檔案。'
os.rename =
'將名字為 `oldname` 的檔案或目錄更名為 `newname`。'
os.setlocale =
'設定程式的目前區域。'
os.time =
'當不傳引數時,回傳目前時刻。如果傳入一張表,就回傳由這張表表示的時刻。'
os.tmpname =
'回傳一個可用於臨時檔案的檔名字串。'
osdate.year =
'四位數字'
osdate.month =
'1-12'
osdate.day =
'1-31'
osdate.hour =
'0-23'
osdate.min =
'0-59'
osdate.sec =
'0-61'
osdate.wday =
'星期幾範圍為1-7星期天為 1'
osdate.yday =
'該年的第幾天範圍為1-366'
osdate.isdst =
'是否為夏令時間,一個布林值'
package =
''
require['<5.3'] =
'載入一個模組,回傳該模組的回傳值( `nil` 時為 `true` )。'
require['>5.4'] =
'載入一個模組,回傳該模組的回傳值( `nil` 時為 `true` )與搜尋器回傳的載入資料。預設搜尋器的載入資料指示了載入位置,對於檔案來説就是檔案路徑。'
package.config =
'一個描述一些為包管理準備的編譯時期組態的字串。'
package.cpath =
'這個路徑被 `require` 在 C 載入器中做搜尋時用到。'
package.loaded =
'用於 `require` 控制哪些模組已經被載入的表。'
package.loaders =
'用於 `require` 控制如何載入模組的表。'
package.loadlib =
'讓宿主程式動態連結 C 庫 `libname` 。'
package.path =
'這個路徑被 `require` 在 Lua 載入器中做搜尋時用到。'
package.preload =
'儲存有一些特殊模組的載入器。'
package.searchers =
'用於 `require` 控制如何載入模組的表。'
package.searchpath =
'在指定 `path` 中搜尋指定的 `name` 。'
package.seeall =
'給 `module` 設定一個中繼資料表,該中繼資料表的 `__index` 域為全域環境,這樣模組便會繼承全域環境的值。可作為 `module` 函式的選項。'
string =
''
string.byte =
'回傳字元 `s[i]` 、 `s[i+1]` ... `s[j]` 的內部數字編碼。'
string.char =
'接收零或更多的整數,回傳和引數數量相同長度的字串。其中每個字元的內部編碼值等於對應的引數值。'
string.dump =
'回傳包含有以二進制方式表示的(一個 *二進制程式碼區塊* )指定函式的字串。'
string.find =
'尋找第一個字串中配對到的 `pattern`(參見 §6.4.1)。'
string.format =
'回傳不定數量引數的格式化版本,格式化字串為第一個引數。'
string.gmatch =
[[
`pattern`  §6.4.1 s
s
```lua
s =
"hello world from Lua"
for w in string.gmatch(s, "%a+") do
print(w)
end
```
]]
string.gsub =
'將字串 s 中,所有的(或是在 n 給出時的前 n 個) `pattern` (參見 §6.4.1)都替換成 `repl` ,並回傳其副本。'
string.len =
'回傳其長度。'
string.lower =
'將其中的大寫字元都轉為小寫後回傳其副本。'
string.match =
'在字串 s 中找到第一個能用 `pattern` (參見 §6.4.1)配對到的部分。如果能找到,回傳其中的捕獲物,否則回傳 `nil` 。'
string.pack =
'回傳一個壓縮了(即以二進制形式序列化) v1, v2 等值的二進制字串。字串 `fmt` 為壓縮格式(參見 §6.4.2)。'
string.packsize =
[[回傳以指定格式用 $string.pack 壓縮的字串的長度。格式化字串中不可以有變長選項 's' 或 'z' (參見 §6.4.2)。]]
string.rep['>5.2'] =
'回傳 `n` 個字串 `s` 以字串 `sep` 為分割符連在一起的字串。預設的 `sep` 值為空字串(即沒有分割符)。如果 `n` 不是正數則回傳空字串。'
string.rep['<5.1'] =
'回傳 `n` 個字串 `s` 連在一起的字串。如果 `n` 不是正數則回傳空字串。'
string.reverse =
'回傳字串 s 的反轉字串。'
string.sub =
'回傳一個從 `i` 開始並在 `j` 結束的子字串。'
string.unpack =
'回傳以格式 `fmt` (參見 §6.4.2 壓縮在字串 `s` (參見 $string.pack 中的值。'
string.upper =
'接收一個字串,將其中的小寫字元都轉為大寫後回傳其副本。'
table =
''
table.concat =
'提供一個列表,其所有元素都是字串或數字,回傳字串 `list[i]..sep..list[i+1] ··· sep..list[j]`。'
table.insert =
'在 `list` 的位置 `pos` 處插入元素 `value`。'
table.maxn =
'回傳給定表的最大正數索引,如果表沒有正數索引,則回傳零。'
table.move =
[[
`a1` `a2`
```lua
a2[t],··· =
a1[f],···,a1[e]
return a2
```
]]
table.pack =
'回傳用所有引數以鍵 `1`,`2`, 等填充的新表,並將 `"n"` 這個域設為引數的總數。'
table.remove =
'移除 `list` 中 `pos` 位置上的元素,並回傳這個被移除的值。'
table.sort =
'在表內從 `list[1]` 到 `list[#list]` *原地* 對其間元素按指定順序排序。'
table.unpack =
[[
```lua
return list[i], list[i+1], ···, list[j]
```
i 1 j #list
]]
table.foreach =
'走訪表中的每一個元素並以key和value執行回呼函式。如果回呼函式回傳一個非nil值則循環終止並且回傳這個值。該函式等同pair(list)比pair(list)更慢。不推薦使用。'
table.foreachi =
'走訪表中的每一個元素並以索引號index和value執行回呼函式。如果回呼函式回傳一個非nil值則循環終止並且回傳這個值。該函式等同ipair(list)比ipair(list)更慢。不推薦使用。'
table.getn =
'回傳表的長度。該函式等價於#list。'
table.new =
[[ C API `lua_createtable()` `narray` `nhash` 使 require
```lua
require("table.new")
```
]]
table.clear =
[[使/使 require
```lua
require("table.clear")
```
]]
utf8 =
''
utf8.char =
'接收零或多個整數,將每個整數轉換成對應的 UTF-8 位元組序列,並回傳這些序列連接到一起的字串。'
utf8.charpattern =
'用於精確配對到一個 UTF-8 位元組序列的模式,它假定處理的對象是一個合法的 UTF-8 字串。'
utf8.codes =
[[
```lua
for p, c in utf8.codes(s) do
body
end
```
`s` `p` `c`
]]
utf8.codepoint =
'以整數形式回傳 `s` 中 從位置 `i` 到 `j` 間(包括兩端)所有字元的編號。'
utf8.len =
'回傳字串 `s` 中 從位置 `i` 到 `j` 間 (包括兩端) UTF-8 字元的個數。'
utf8.offset =
'回傳編碼在 `s` 中的第 `n` 個字元的開始位置(按位元組數)(從位置 `i` 處開始統計)。'

View File

@ -1,443 +0,0 @@
---@diagnostic disable: undefined-global
config.addonManager.enable = -- TODO: need translate!
"Whether the addon manager is enabled or not."
config.runtime.version =
"Lua執行版本。"
config.runtime.path =
[[
使 `require`
`?/init.lua` `require 'myfile'` `{workspace}/myfile/init.lua`
`runtime.pathStrict` `false` `${workspace}/**/myfile/init.lua`
`Lua.workspace.library`
]]
config.runtime.pathStrict =
'啟用後 `runtime.path` 將只搜尋第一層目錄,見 `runtime.path` 的説明。'
config.runtime.special =
[[
`include` `require`
```json
"Lua.runtime.special" : {
"include" : "require"
}
```
]]
config.runtime.unicodeName =
"允許在名字中使用 Unicode 字元。"
config.runtime.nonstandardSymbol =
"支援非標準的符號。請務必確認你的執行環境支援這些符號。"
config.runtime.plugin =
"延伸模組路徑,請查閱[文件](https://github.com/LuaLS/lua-language-server/wiki/Plugins)瞭解用法。"
config.runtime.pluginArgs = -- TODO: need translate!
"Additional arguments for the plugin."
config.runtime.fileEncoding =
"檔案編碼,選項 `ansi` 只在 `Windows` 平台下有效。"
config.runtime.builtin =
[[
調
* `default`:
* `enable`:
* `disable`:
]]
config.runtime.meta =
'meta檔案的目錄名稱格式'
config.diagnostics.enable =
"啟用診斷。"
config.diagnostics.disable =
"停用的診斷(使用浮框括號內的程式碼)。"
config.diagnostics.globals =
"已定義的全域變數。"
config.diagnostics.severity =
[[
`!` `diagnostics.groupSeverity`
]]
config.diagnostics.neededFileStatus =
[[
* Opened:
* Any:
* None:
`!` `diagnostics.groupFileStatus`
]]
config.diagnostics.groupSeverity =
[[
`Fallback` `diagnostics.severity`
`!`
]]
config.diagnostics.groupFileStatus =
[[
* Opened:
* Any:
* None:
`Fallback` `diagnostics.neededFileStatus`
`!`
]]
config.diagnostics.workspaceEvent = -- TODO: need translate!
"Set the time to trigger workspace diagnostics."
config.diagnostics.workspaceEvent.OnChange = -- TODO: need translate!
"Trigger workspace diagnostics when the file is changed."
config.diagnostics.workspaceEvent.OnSave = -- TODO: need translate!
"Trigger workspace diagnostics when the file is saved."
config.diagnostics.workspaceEvent.None = -- TODO: need translate!
"Disable workspace diagnostics."
config.diagnostics.workspaceDelay =
"進行工作區診斷的延遲(毫秒)。"
config.diagnostics.workspaceRate =
"工作區診斷的執行速率百分比。降低該值會減少CPU使用率但是也會降低工作區診斷的速度。你目前正在編輯的檔案的診斷總是全速完成不受該選項影響。"
config.diagnostics.libraryFiles =
"如何診斷透過 `Lua.workspace.library` 載入的檔案。"
config.diagnostics.libraryFiles.Enable =
"總是診斷這些檔案。"
config.diagnostics.libraryFiles.Opened =
"只有打開這些檔案時才會診斷。"
config.diagnostics.libraryFiles.Disable =
"不診斷這些檔案。"
config.diagnostics.ignoredFiles =
"如何診斷被忽略的檔案。"
config.diagnostics.ignoredFiles.Enable =
"總是診斷這些檔案。"
config.diagnostics.ignoredFiles.Opened =
"只有打開這些檔案時才會診斷。"
config.diagnostics.ignoredFiles.Disable =
"不診斷這些檔案。"
config.diagnostics.disableScheme =
'不診斷使用以下 scheme 的lua檔案。'
config.diagnostics.unusedLocalExclude = -- TODO: need translate!
'Do not diagnose `unused-local` when the variable name matches the following pattern.'
config.workspace.ignoreDir =
"忽略的檔案與目錄(使用 `.gitignore` 語法)。"
config.workspace.ignoreSubmodules =
"忽略子模組。"
config.workspace.useGitIgnore =
"忽略 `.gitignore` 中列舉的檔案。"
config.workspace.maxPreload =
"最大預載入檔案數。"
config.workspace.preloadFileSize =
"預載入時跳過大小大於該值KB的檔案。"
config.workspace.library =
"除了目前工作區以外,還會從哪些目錄中載入檔案。這些目錄中的檔案將被視作外部提供的程式碼庫,部分操作(如重新命名欄位)不會修改這些檔案。"
config.workspace.checkThirdParty =
[[
* OpenResty
* Cocos4.0
* LÖVE
* LÖVR
* skynet
* Jass
]]
config.workspace.userThirdParty =
'在這裡添加私有的第三方庫適應檔案路徑,請參考內建的[組態檔案路徑](https://github.com/LuaLS/lua-language-server/tree/master/meta/3rd)'
config.workspace.supportScheme =
'為以下 `scheme` 的lua檔案提供語言伺服。'
config.completion.enable =
'啟用自動完成。'
config.completion.callSnippet =
'顯示函式呼叫片段。'
config.completion.callSnippet.Disable =
"只顯示 `函式名`。"
config.completion.callSnippet.Both =
"顯示 `函式名` 與 `呼叫片段`。"
config.completion.callSnippet.Replace =
"只顯示 `呼叫片段`。"
config.completion.keywordSnippet =
'顯示關鍵字語法片段。'
config.completion.keywordSnippet.Disable =
"只顯示 `關鍵字`。"
config.completion.keywordSnippet.Both =
"顯示 `關鍵字` 與 `語法片段`。"
config.completion.keywordSnippet.Replace =
"只顯示 `語法片段`。"
config.completion.displayContext =
"預覽建議的相關程式碼片段,可能可以幫助你瞭解這項建議的用法。設定的數字表示程式碼片段的擷取行數,設定為 `0` 可以停用此功能。"
config.completion.workspaceWord =
"顯示的上下文單詞是否包含工作區中其他檔案的內容。"
config.completion.showWord =
"在建議中顯示上下文單詞。"
config.completion.showWord.Enable =
"總是在建議中顯示上下文單詞。"
config.completion.showWord.Fallback =
"無法根據語義提供建議時才顯示上下文單詞。"
config.completion.showWord.Disable =
"不顯示上下文單詞。"
config.completion.autoRequire =
"輸入內容看起來是個檔名時,自動 `require` 此檔案。"
config.completion.showParams =
"在建議列表中顯示函式的參數資訊,函式擁有多個定義時會分開顯示。"
config.completion.requireSeparator =
"`require` 時使用的分隔符。"
config.completion.postfix =
"用於觸發後綴建議的符號。"
config.color.mode =
"著色模式。"
config.color.mode.Semantic =
"語義著色。你可能需要同時將 `editor.semanticHighlighting.enabled` 設定為 `true` 才能生效。"
config.color.mode.SemanticEnhanced =
"增強的語義顏色。類似於`Semantic`,但會進行額外的分析(也會帶來額外的開銷)。"
config.color.mode.Grammar =
"語法著色。"
config.semantic.enable =
"啟用語義著色。你可能需要同時將 `editor.semanticHighlighting.enabled` 設定為 `true` 才能生效。"
config.semantic.variable =
"對變數/欄位/參數進行語義著色。"
config.semantic.annotation =
"對類型註解進行語義著色。"
config.semantic.keyword =
"對關鍵字/字面常數/運算子進行語義著色。只有當你的編輯器無法進行語法著色時才需要啟用此功能。"
config.signatureHelp.enable =
"啟用參數提示。"
config.hover.enable =
"啟用懸浮提示。"
config.hover.viewString =
"懸浮提示檢視字串內容(僅當字面常數包含跳脫字元時)。"
config.hover.viewStringMax =
"懸浮提示檢視字串內容時的最大長度。"
config.hover.viewNumber =
"懸浮提示檢視數字內容(僅當字面常數不是十進制時)。"
config.hover.fieldInfer =
"懸浮提示檢視表時,會對表的每個欄位進行類型推測,當類型推測的用時累計達到該設定值(毫秒)時,將跳過後續欄位的類型推測。"
config.hover.previewFields =
"懸浮提示檢視表時,限制表內欄位的最大預覽數量。"
config.hover.enumsLimit =
"當值對應多個類型時,限制類型的顯示數量。"
config.hover.expandAlias =
[[
`---@alias myType boolean|number` 展開後顯示為 `boolean|number`,否則顯示為 `myType'。
]]
config.develop.enable =
'開發者模式。請勿開啟,會影響效能。'
config.develop.debuggerPort =
'除錯器監聽埠。'
config.develop.debuggerWait =
'除錯器連接之前懸置。'
config.intelliSense.searchDepth =
'設定智慧感知的搜尋深度。增大該值可以增加準確度,但會降低效能。不同的工作區對該設定的容忍度差異較大,請自己調整為合適的值。'
config.intelliSense.fastGlobal =
'在對全域變數進行補全,及檢視 `_G` 的懸浮提示時進行最佳化。這會略微降低類型推測的準確度,但是對於大量使用全域變數的專案會有大幅的效能提升。'
config.window.statusBar =
'在狀態欄顯示延伸模組狀態。'
config.window.progressBar =
'在狀態欄顯示進度條。'
config.hint.enable =
'啟用內嵌提示。'
config.hint.paramType =
'在函式的參數位置提示類型。'
config.hint.setType =
'在賦值操作位置提示類型。'
config.hint.paramName =
'在函式呼叫處提示參數名。'
config.hint.paramName.All =
'所有類型的參數均進行提示。'
config.hint.paramName.Literal =
'只有字面常數類型的參數進行提示。'
config.hint.paramName.Disable =
'停用參數提示。'
config.hint.arrayIndex =
'在建構表時提示陣列索引。'
config.hint.arrayIndex.Enable =
'所有的表中都提示陣列索引。'
config.hint.arrayIndex.Auto =
'只有表大於3項或者表是混合類型時才進行提示。'
config.hint.arrayIndex.Disable =
'停用陣列索引提示。'
config.hint.await =
'如果呼叫的函數被標記為了 `---@async`,則在呼叫處提示 `await`。'
config.hint.semicolon =
'若陳述式尾部沒有分號,則顯示虛擬分號。'
config.hint.semicolon.All =
'所有陳述式都顯示虛擬分號。'
config.hint.semicolon.SameLine =
'兩個陳述式在同一行時,在它們之間顯示分號。'
config.hint.semicolon.Disable =
'停用虛擬分號。'
config.codeLens.enable = -- TODO: need translate!
'Enable code lens.'
config.format.enable =
'啟用程式碼格式化程式。'
config.format.defaultConfig =
[[
`.editorconfig`
[](https://github.com/CppCXY/EmmyLuaCodeStyle/tree/master/docs)
]]
config.spell.dict =
'拼寫檢查的自訂單詞。'
config.nameStyle.config = -- TODO: need translate!
'Set name style config'
config.telemetry.enable =
[[
[](https://github.com/LuaLS/lua-language-server/wiki/Home#privacy)
]]
config.misc.parameters =
'VSCode中啟動語言伺服時的[命令列參數](https://github.com/LuaLS/lua-language-server/wiki/Getting-Started#arguments)。'
config.misc.executablePath = -- TODO: need translate!
'Specify the executable path in VSCode.'
config.IntelliSense.traceLocalSet =
'請查閱[文件](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features)瞭解用法。'
config.IntelliSense.traceReturn =
'請查閱[文件](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features)瞭解用法。'
config.IntelliSense.traceBeSetted =
'請查閱[文件](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features)瞭解用法。'
config.IntelliSense.traceFieldInject =
'請查閱[文件](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features)瞭解用法。'
config.type.castNumberToInteger =
'允許將 `number` 類型賦值給 `integer` 類型。'
config.type.weakUnionCheck =
[[
滿滿
`false` `number|boolean` `number` `true`
]]
config.type.weakNilCheck = -- TODO: need translate!
[[
When checking the type of union type, ignore the `nil` in it.
When this setting is `false`, the `number|nil` type cannot be assigned to the `number` type. It can be with `true`.
]]
config.doc.privateName = -- TODO: need translate!
'Treat specific field names as private, e.g. `m_*` means `XXX.m_id` and `XXX.m_type` are private, witch can only be accessed in the class where the definition is located.'
config.doc.protectedName = -- TODO: need translate!
'Treat specific field names as protected, e.g. `m_*` means `XXX.m_id` and `XXX.m_type` are protected, witch can only be accessed in the class where the definition is located and its subclasses.'
config.doc.packageName = -- TODO: need translate!
'Treat specific field names as package, e.g. `m_*` means `XXX.m_id` and `XXX.m_type` are package, witch can only be accessed in the file where the definition is located.'
config.diagnostics['unused-local'] =
'未使用的區域變數'
config.diagnostics['unused-function'] =
'未使用的函式'
config.diagnostics['undefined-global'] =
'未定義的全域變數'
config.diagnostics['global-in-nil-env'] =
'不能使用全域變數( `_ENV` 被設定為 `nil`'
config.diagnostics['unused-label'] =
'未使用的標籤'
config.diagnostics['unused-vararg'] =
'未使用的不定引數'
config.diagnostics['trailing-space'] =
'後置空格'
config.diagnostics['redefined-local'] =
'重複定義的區域變數'
config.diagnostics['newline-call'] =
'以 `(` 開始的新行,在語法上被解析為了上一行的函式呼叫'
config.diagnostics['newfield-call'] =
'在字面常數表中2行程式碼之間缺少分隔符在語法上被解析為了一次索引操作'
config.diagnostics['redundant-parameter'] =
'函式呼叫時,傳入了多餘的引數'
config.diagnostics['ambiguity-1'] =
'優先順序歧義,如: `num or 0 + 1` ,推測使用者的實際期望為 `(num or 0) + 1`'
config.diagnostics['lowercase-global'] =
'首字母小寫的全域變數定義'
config.diagnostics['undefined-env-child'] =
'`_ENV` 被設定為了新的字面常數表,但是試圖獲取的全域變數不在這張表中'
config.diagnostics['duplicate-index'] =
'在字面常數表中重複定義了索引'
config.diagnostics['empty-block'] =
'空程式碼區塊'
config.diagnostics['redundant-value'] =
'賦值操作時,值的數量比被賦值的對象多'
config.diagnostics['assign-type-mismatch'] = -- TODO: need translate!
'Enable diagnostics for assignments in which the value\'s type does not match the type of the assigned variable.'
config.diagnostics['await-in-sync'] = -- TODO: need translate!
'Enable diagnostics for calls of asynchronous functions within a synchronous function.'
config.diagnostics['cast-local-type'] = -- TODO: need translate!
'Enable diagnostics for casts of local variables where the target type does not match the defined type.'
config.diagnostics['cast-type-mismatch'] = -- TODO: need translate!
'Enable diagnostics for casts where the target type does not match the initial type.'
config.diagnostics['circular-doc-class'] = -- TODO: need translate!
'Enable diagnostics for two classes inheriting from each other introducing a circular relation.'
config.diagnostics['close-non-object'] = -- TODO: need translate!
'Enable diagnostics for attempts to close a variable with a non-object.'
config.diagnostics['code-after-break'] = -- TODO: need translate!
'Enable diagnostics for code placed after a break statement in a loop.'
config.diagnostics['codestyle-check'] = -- TODO: need translate!
'Enable diagnostics for incorrectly styled lines.'
config.diagnostics['count-down-loop'] = -- TODO: need translate!
'Enable diagnostics for `for` loops which will never reach their max/limit because the loop is incrementing instead of decrementing.'
config.diagnostics['deprecated'] = -- TODO: need translate!
'Enable diagnostics to highlight deprecated API.'
config.diagnostics['different-requires'] = -- TODO: need translate!
'Enable diagnostics for files which are required by two different paths.'
config.diagnostics['discard-returns'] = -- TODO: need translate!
'Enable diagnostics for calls of functions annotated with `---@nodiscard` where the return values are ignored.'
config.diagnostics['doc-field-no-class'] = -- TODO: need translate!
'Enable diagnostics to highlight a field annotation without a defining class annotation.'
config.diagnostics['duplicate-doc-alias'] = -- TODO: need translate!
'Enable diagnostics for a duplicated alias annotation name.'
config.diagnostics['duplicate-doc-field'] = -- TODO: need translate!
'Enable diagnostics for a duplicated field annotation name.'
config.diagnostics['duplicate-doc-param'] = -- TODO: need translate!
'Enable diagnostics for a duplicated param annotation name.'
config.diagnostics['duplicate-set-field'] = -- TODO: need translate!
'Enable diagnostics for setting the same field in a class more than once.'
config.diagnostics['incomplete-signature-doc'] = -- TODO: need translate!
'Incomplete @param or @return annotations for functions.'
config.diagnostics['invisible'] = -- TODO: need translate!
'Enable diagnostics for accesses to fields which are invisible.'
config.diagnostics['missing-global-doc'] = -- TODO: need translate!
'Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.'
config.diagnostics['missing-local-export-doc'] = -- TODO: need translate!
'Missing annotations for exported locals! Exported local functions must have a comment and annotations for all parameters and return values.'
config.diagnostics['missing-parameter'] = -- TODO: need translate!
'Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.'
config.diagnostics['missing-return'] = -- TODO: need translate!
'Enable diagnostics for functions with return annotations which have no return statement.'
config.diagnostics['missing-return-value'] = -- TODO: need translate!
'Enable diagnostics for return statements without values although the containing function declares returns.'
config.diagnostics['need-check-nil'] = -- TODO: need translate!
'Enable diagnostics for variable usages if `nil` or an optional (potentially `nil`) value was assigned to the variable before.'
config.diagnostics['no-unknown'] = -- TODO: need translate!
'Enable diagnostics for cases in which the type cannot be inferred.'
config.diagnostics['not-yieldable'] = -- TODO: need translate!
'Enable diagnostics for calls to `coroutine.yield()` when it is not permitted.'
config.diagnostics['param-type-mismatch'] = -- TODO: need translate!
'Enable diagnostics for function calls where the type of a provided parameter does not match the type of the annotated function definition.'
config.diagnostics['redundant-return'] = -- TODO: need translate!
'Enable diagnostics for return statements which are not needed because the function would exit on its own.'
config.diagnostics['redundant-return-value']= -- TODO: need translate!
'Enable diagnostics for return statements which return an extra value which is not specified by a return annotation.'
config.diagnostics['return-type-mismatch'] = -- TODO: need translate!
'Enable diagnostics for return values whose type does not match the type declared in the corresponding return annotation.'
config.diagnostics['spell-check'] = -- TODO: need translate!
'Enable diagnostics for typos in strings.'
config.diagnostics['name-style-check'] = -- TODO: need translate!
'Enable diagnostics for name style.'
config.diagnostics['unbalanced-assignments']= -- TODO: need translate!
'Enable diagnostics on multiple assignments if not all variables obtain a value (e.g., `local x,y = 1`).'
config.diagnostics['undefined-doc-class'] = -- TODO: need translate!
'Enable diagnostics for class annotations in which an undefined class is referenced.'
config.diagnostics['undefined-doc-name'] = -- TODO: need translate!
'Enable diagnostics for type annotations referencing an undefined type or alias.'
config.diagnostics['undefined-doc-param'] = -- TODO: need translate!
'Enable diagnostics for cases in which a parameter annotation is given without declaring the parameter in the function definition.'
config.diagnostics['undefined-field'] = -- TODO: need translate!
'Enable diagnostics for cases in which an undefined field of a variable is read.'
config.diagnostics['unknown-cast-variable'] = -- TODO: need translate!
'Enable diagnostics for casts of undefined variables.'
config.diagnostics['unknown-diag-code'] = -- TODO: need translate!
'Enable diagnostics in cases in which an unknown diagnostics code is entered.'
config.diagnostics['unknown-operator'] = -- TODO: need translate!
'Enable diagnostics for unknown operators.'
config.diagnostics['unreachable-code'] = -- TODO: need translate!
'Enable diagnostics for unreachable code.'
config.diagnostics['global-element'] = -- TODO: need translate!
'Enable diagnostics to warn about global elements.'
config.typeFormat.config = -- TODO: need translate!
'Configures the formatting behavior while typing Lua code.'
config.typeFormat.config.auto_complete_end = -- TODO: need translate!
'Controls if `end` is automatically completed at suitable positions.'
config.typeFormat.config.auto_complete_table_sep = -- TODO: need translate!
'Controls if a separator is automatically appended at the end of a table declaration.'
config.typeFormat.config.format_line = -- TODO: need translate!
'Controls if a line is formatted at all.'
command.exportDocument = -- TODO: need translate!
'Lua: Export Document ...'
command.addon_manager.open = -- TODO: need translate!
'Lua: Open Addon Manager ...'
command.reloadFFIMeta = -- TODO: need translate!
'Lua: Reload luajit ffi meta'

View File

@ -1,83 +0,0 @@
PUSH [===[]===]
if not JIT then DISABLE() end
PUSH [===[
---@meta bit
---@version JIT
---@class bitlib
bit = {}
---@param x integer
---@return integer y
---@nodiscard
function bit.tobit(x) end
---@param x integer
---@param n? integer
---@return integer y
---@nodiscard
function bit.tohex(x, n) end
---@param x integer
---@return integer y
---@nodiscard
function bit.bnot(x) end
---@param x integer
---@param x2 integer
---@param ... integer
---@return integer y
---@nodiscard
function bit.bor(x, x2, ...) end
---@param x integer
---@param x2 integer
---@param ... integer
---@return integer y
---@nodiscard
function bit.band(x, x2, ...) end
---@param x integer
---@param x2 integer
---@param ... integer
---@return integer y
---@nodiscard
function bit.bxor(x, x2, ...) end
---@param x integer
---@param n integer
---@return integer y
---@nodiscard
function bit.lshift(x, n) end
---@param x integer
---@param n integer
---@return integer y
---@nodiscard
function bit.rshift(x, n) end
---@param x integer
---@param n integer
---@return integer y
---@nodiscard
function bit.arshift(x, n) end
---@param x integer
---@param n integer
---@return integer y
---@nodiscard
function bit.rol(x, n) end
---@param x integer
---@param n integer
---@return integer y
---@nodiscard
function bit.ror(x, n) end
---@param x integer
---@return integer y
---@nodiscard
function bit.bswap(x) end
return bit
]===]

View File

@ -1,80 +0,0 @@
local fs = require 'bee.filesystem'
local util = require 'utility'
local version = require 'version'
local function getValue(value)
if value == 'true' or value == nil then
value = true
elseif value == 'false' then
value = false
elseif tonumber(value) then
value = tonumber(value)
elseif value:sub(1, 1) == '"' and value:sub(-1, -1) == '"' then
value = value:sub(2, -2)
end
return value
end
local function loadArgs()
---@type string?
local lastKey
for _, v in ipairs(arg) do
---@type string?
local key, tail = v:match '^%-%-([%w_]+)(.*)$'
local value
if key then
value = tail:match '=(.+)'
lastKey = nil
if not value then
lastKey = key
end
else
if lastKey then
key = lastKey
value = v
lastKey = nil
end
end
if key then
_G[key:upper()] = getValue(value)
end
end
end
loadArgs()
local currentPath = debug.getinfo(1, 'S').source:sub(2)
local rootPath = currentPath:gsub('[/\\]*[^/\\]-$', '')
rootPath = (rootPath == '' and '.' or rootPath)
ROOT = fs.path(util.expandPath(rootPath))
LOGPATH = LOGPATH and util.expandPath(LOGPATH) or (ROOT:string() .. '/log')
METAPATH = METAPATH and util.expandPath(METAPATH) or (ROOT:string() .. '/meta')
---@diagnostic disable-next-line: deprecated
debug.setcstacklimit(200)
collectgarbage('generational', 10, 50)
--collectgarbage('incremental', 120, 120, 0)
---@diagnostic disable-next-line: lowercase-global
log = require 'log'
log.init(ROOT, fs.path(LOGPATH) / 'service.log')
if LOGLEVEL then
log.level = tostring(LOGLEVEL):lower()
end
log.info('Lua Lsp startup, root: ', ROOT)
log.info('ROOT:', ROOT:string())
log.info('LOGPATH:', LOGPATH)
log.info('METAPATH:', METAPATH)
log.info('VERSION:', version.getVersion())
require 'tracy'
xpcall(dofile, log.debug, (ROOT / 'debugger.lua'):string())
require 'cli'
local _, service = xpcall(require, log.error, 'service')
service.start()

View File

@ -1,5 +0,0 @@
---@meta
---@class ffi.namespace*.
local m = {}
function m.test() end

View File

@ -1,7 +0,0 @@
{
"name": "Cocos",
"files": ["cocos"],
"settings": {
"Lua.runtime.version": "LuaJIT"
}
}

View File

@ -1,84 +0,0 @@
---@meta
---@class cc.Action :cc.Ref
local Action={ }
cc.Action=Action
---* Called before the action start. It will also set the target. <br>
---* param target A certain target.
---@param target cc.Node
---@return self
function Action:startWithTarget (target) end
---* Set the original target, since target can be nil.<br>
---* Is the target that were used to run the action. Unless you are doing something complex, like ActionManager, you should NOT call this method.<br>
---* The target is 'assigned', it is not 'retained'.<br>
---* since v0.8.2<br>
---* param originalTarget Is 'assigned', it is not 'retained'.
---@param originalTarget cc.Node
---@return self
function Action:setOriginalTarget (originalTarget) end
---* Returns a clone of action.<br>
---* return A clone action.
---@return self
function Action:clone () end
---* Return a original Target. <br>
---* return A original Target.
---@return cc.Node
function Action:getOriginalTarget () end
---* Called after the action has finished. It will set the 'target' to nil.<br>
---* IMPORTANT: You should never call "Action::stop()" manually. Instead, use: "target->stopAction(action);".
---@return self
function Action:stop () end
---* Called once per frame. time a value between 0 and 1.<br>
---* For example:<br>
---* - 0 Means that the action just started.<br>
---* - 0.5 Means that the action is in the middle.<br>
---* - 1 Means that the action is over.<br>
---* param time A value between 0 and 1.
---@param time float
---@return self
function Action:update (time) end
---* Return certain target.<br>
---* return A certain target.
---@return cc.Node
function Action:getTarget () end
---* Returns a flag field that is used to group the actions easily.<br>
---* return A tag.
---@return unsigned_int
function Action:getFlags () end
---* Called every frame with it's delta time, dt in seconds. DON'T override unless you know what you are doing. <br>
---* param dt In seconds.
---@param dt float
---@return self
function Action:step (dt) end
---* Changes the tag that is used to identify the action easily. <br>
---* param tag Used to identify the action easily.
---@param tag int
---@return self
function Action:setTag (tag) end
---* Changes the flag field that is used to group the actions easily.<br>
---* param flags Used to group the actions easily.
---@param flags unsigned_int
---@return self
function Action:setFlags (flags) end
---* Returns a tag that is used to identify the action easily. <br>
---* return A tag.
---@return int
function Action:getTag () end
---* The action will modify the target properties. <br>
---* param target A certain target.
---@param target cc.Node
---@return self
function Action:setTarget (target) end
---* Return true if the action has finished. <br>
---* return Is true if the action has finished.
---@return boolean
function Action:isDone () end
---* Returns a new action that performs the exact reverse of the action. <br>
---* return A new action that performs the exact reverse of the action.<br>
---* js NA
---@return self
function Action:reverse () end

View File

@ -1,47 +0,0 @@
---@meta
---@class cc.ActionCamera :cc.ActionInterval
local ActionCamera={ }
cc.ActionCamera=ActionCamera
---@overload fun(float:float,float:float,float:float):self
---@overload fun(float0:vec3_table):self
---@param x float
---@param y float
---@param z float
---@return self
function ActionCamera:setEye (x,y,z) end
---*
---@return vec3_table
function ActionCamera:getEye () end
---*
---@param up vec3_table
---@return self
function ActionCamera:setUp (up) end
---*
---@return vec3_table
function ActionCamera:getCenter () end
---*
---@param center vec3_table
---@return self
function ActionCamera:setCenter (center) end
---*
---@return vec3_table
function ActionCamera:getUp () end
---*
---@param target cc.Node
---@return self
function ActionCamera:startWithTarget (target) end
---*
---@return self
function ActionCamera:clone () end
---*
---@return self
function ActionCamera:reverse () end
---* js ctor<br>
---* lua new
---@return self
function ActionCamera:ActionCamera () end

View File

@ -1,29 +0,0 @@
---@meta
---@class cc.ActionEase :cc.ActionInterval
local ActionEase={ }
cc.ActionEase=ActionEase
---* brief Initializes the action.<br>
---* return Return true when the initialization success, otherwise return false.
---@param action cc.ActionInterval
---@return boolean
function ActionEase:initWithAction (action) end
---* brief Get the pointer of the inner action.<br>
---* return The pointer of the inner action.
---@return cc.ActionInterval
function ActionEase:getInnerAction () end
---*
---@param target cc.Node
---@return self
function ActionEase:startWithTarget (target) end
---*
---@return self
function ActionEase:stop () end
---*
---@param time float
---@return self
function ActionEase:update (time) end

View File

@ -1,46 +0,0 @@
---@meta
---@class cc.ActionFloat :cc.ActionInterval
local ActionFloat={ }
cc.ActionFloat=ActionFloat
---*
---@param duration float
---@param from float
---@param to float
---@param callback function
---@return boolean
function ActionFloat:initWithDuration (duration,from,to,callback) end
---* Creates FloatAction with specified duration, from value, to value and callback to report back<br>
---* results<br>
---* param duration of the action<br>
---* param from value to start from<br>
---* param to value to be at the end of the action<br>
---* param callback to report back result<br>
---* return An autoreleased ActionFloat object
---@param duration float
---@param from float
---@param to float
---@param callback function
---@return self
function ActionFloat:create (duration,from,to,callback) end
---* Overridden ActionInterval methods
---@param target cc.Node
---@return self
function ActionFloat:startWithTarget (target) end
---*
---@return self
function ActionFloat:clone () end
---*
---@param delta float
---@return self
function ActionFloat:update (delta) end
---*
---@return self
function ActionFloat:reverse () end
---*
---@return self
function ActionFloat:ActionFloat () end

View File

@ -1,30 +0,0 @@
---@meta
---@class cc.ActionInstant :cc.FiniteTimeAction
local ActionInstant={ }
cc.ActionInstant=ActionInstant
---*
---@param target cc.Node
---@return self
function ActionInstant:startWithTarget (target) end
---*
---@return self
function ActionInstant:reverse () end
---*
---@return self
function ActionInstant:clone () end
---* param time In seconds.
---@param time float
---@return self
function ActionInstant:update (time) end
---* param dt In seconds.
---@param dt float
---@return self
function ActionInstant:step (dt) end
---*
---@return boolean
function ActionInstant:isDone () end

View File

@ -1,43 +0,0 @@
---@meta
---@class cc.ActionInterval :cc.FiniteTimeAction
local ActionInterval={ }
cc.ActionInterval=ActionInterval
---* Gets the amplitude rate, extension in GridAction<br>
---* return The amplitude rate.
---@return float
function ActionInterval:getAmplitudeRate () end
---* initializes the action
---@param d float
---@return boolean
function ActionInterval:initWithDuration (d) end
---* Sets the amplitude rate, extension in GridAction<br>
---* param amp The amplitude rate.
---@param amp float
---@return self
function ActionInterval:setAmplitudeRate (amp) end
---* How many seconds had elapsed since the actions started to run.<br>
---* return The seconds had elapsed since the actions started to run.
---@return float
function ActionInterval:getElapsed () end
---*
---@param target cc.Node
---@return self
function ActionInterval:startWithTarget (target) end
---* param dt in seconds
---@param dt float
---@return self
function ActionInterval:step (dt) end
---*
---@return self
function ActionInterval:clone () end
---*
---@return self
function ActionInterval:reverse () end
---*
---@return boolean
function ActionInterval:isDone () end

View File

@ -1,124 +0,0 @@
---@meta
---@class cc.ActionManager :cc.Ref
local ActionManager={ }
cc.ActionManager=ActionManager
---* Gets an action given its tag an a target.<br>
---* param tag The action's tag.<br>
---* param target A certain target.<br>
---* return The Action the with the given tag.
---@param tag int
---@param target cc.Node
---@return cc.Action
function ActionManager:getActionByTag (tag,target) end
---* Removes an action given its tag and the target.<br>
---* param tag The action's tag.<br>
---* param target A certain target.
---@param tag int
---@param target cc.Node
---@return self
function ActionManager:removeActionByTag (tag,target) end
---* Removes all actions matching at least one bit in flags and the target.<br>
---* param flags The flag field to match the actions' flags based on bitwise AND.<br>
---* param target A certain target.<br>
---* js NA
---@param flags unsigned_int
---@param target cc.Node
---@return self
function ActionManager:removeActionsByFlags (flags,target) end
---* Removes all actions from all the targets.
---@return self
function ActionManager:removeAllActions () end
---* Adds an action with a target. <br>
---* If the target is already present, then the action will be added to the existing target.<br>
---* If the target is not present, a new instance of this target will be created either paused or not, and the action will be added to the newly created target.<br>
---* When the target is paused, the queued actions won't be 'ticked'.<br>
---* param action A certain action.<br>
---* param target The target which need to be added an action.<br>
---* param paused Is the target paused or not.
---@param action cc.Action
---@param target cc.Node
---@param paused boolean
---@return self
function ActionManager:addAction (action,target,paused) end
---* Resumes the target. All queued actions will be resumed.<br>
---* param target A certain target.
---@param target cc.Node
---@return self
function ActionManager:resumeTarget (target) end
---* Returns the numbers of actions that are running in all targets.<br>
---* return The numbers of actions that are running in all target.<br>
---* js NA
---@return int
function ActionManager:getNumberOfRunningActions () end
---* Pauses the target: all running actions and newly added actions will be paused.<br>
---* param target A certain target.
---@param target cc.Node
---@return self
function ActionManager:pauseTarget (target) end
---* Returns the numbers of actions that are running in a certain target. <br>
---* Composable actions are counted as 1 action. Example:<br>
---* - If you are running 1 Sequence of 7 actions, it will return 1.<br>
---* - If you are running 7 Sequences of 2 actions, it will return 7.<br>
---* param target A certain target.<br>
---* return The numbers of actions that are running in a certain target.<br>
---* js NA
---@param target cc.Node
---@return int
function ActionManager:getNumberOfRunningActionsInTarget (target) end
---* Removes all actions from a certain target.<br>
---* All the actions that belongs to the target will be removed.<br>
---* param target A certain target.
---@param target cc.Node
---@return self
function ActionManager:removeAllActionsFromTarget (target) end
---* Resume a set of targets (convenience function to reverse a pauseAllRunningActions call).<br>
---* param targetsToResume A set of targets need to be resumed.
---@param targetsToResume array_table
---@return self
function ActionManager:resumeTargets (targetsToResume) end
---* Removes an action given an action reference.<br>
---* param action A certain target.
---@param action cc.Action
---@return self
function ActionManager:removeAction (action) end
---* Pauses all running actions, returning a list of targets whose actions were paused.<br>
---* return A list of targets whose actions were paused.
---@return array_table
function ActionManager:pauseAllRunningActions () end
---* Main loop of ActionManager.<br>
---* param dt In seconds.
---@param dt float
---@return self
function ActionManager:update (dt) end
---* Removes all actions given its tag and the target.<br>
---* param tag The actions' tag.<br>
---* param target A certain target.<br>
---* js NA
---@param tag int
---@param target cc.Node
---@return self
function ActionManager:removeAllActionsByTag (tag,target) end
---* Returns the numbers of actions that are running in a<br>
---* certain target with a specific tag.<br>
---* Like getNumberOfRunningActionsInTarget Composable actions<br>
---* are counted as 1 action. Example:<br>
---* - If you are running 1 Sequence of 7 actions, it will return 1.<br>
---* - If you are running 7 Sequences of 2 actions, it will return 7.<br>
---* param target A certain target.<br>
---* param tag Tag that will be searched.<br>
---* return The numbers of actions that are running in a certain target<br>
---* with a specific tag.<br>
---* see getNumberOfRunningActionsInTarget<br>
---* js NA
---@param target cc.Node
---@param tag int
---@return unsigned_int
function ActionManager:getNumberOfRunningActionsInTargetByTag (target,tag) end
---* js ctor
---@return self
function ActionManager:ActionManager () end

View File

@ -1,47 +0,0 @@
---@meta
---@class cc.ActionTween :cc.ActionInterval
local ActionTween={ }
cc.ActionTween=ActionTween
---* brief Initializes the action with the property name (key), and the from and to parameters.<br>
---* param duration The duration of the ActionTween. It's a value in seconds.<br>
---* param key The key of property which should be updated.<br>
---* param from The value of the specified property when the action begin.<br>
---* param to The value of the specified property when the action end.<br>
---* return If the initialization success, return true; otherwise, return false.
---@param duration float
---@param key string
---@param from float
---@param to float
---@return boolean
function ActionTween:initWithDuration (duration,key,from,to) end
---* brief Create and initializes the action with the property name (key), and the from and to parameters.<br>
---* param duration The duration of the ActionTween. It's a value in seconds.<br>
---* param key The key of property which should be updated.<br>
---* param from The value of the specified property when the action begin.<br>
---* param to The value of the specified property when the action end.<br>
---* return If the creation success, return a pointer of ActionTween; otherwise, return nil.
---@param duration float
---@param key string
---@param from float
---@param to float
---@return self
function ActionTween:create (duration,key,from,to) end
---*
---@param target cc.Node
---@return self
function ActionTween:startWithTarget (target) end
---*
---@return self
function ActionTween:clone () end
---*
---@param dt float
---@return self
function ActionTween:update (dt) end
---*
---@return self
function ActionTween:reverse () end

View File

@ -1,21 +0,0 @@
---@meta
---@class cc.AmbientLight :cc.BaseLight
local AmbientLight={ }
cc.AmbientLight=AmbientLight
---* Creates a ambient light.<br>
---* param color The light's color.<br>
---* return The new ambient light.
---@param color color3b_table
---@return self
function AmbientLight:create (color) end
---*
---@return int
function AmbientLight:getLightType () end
---*
---@return self
function AmbientLight:AmbientLight () end

View File

@ -1,52 +0,0 @@
---@meta
---@class cc.Animate :cc.ActionInterval
local Animate={ }
cc.Animate=Animate
---* initializes the action with an Animation and will restore the original frame when the animation is over
---@param animation cc.Animation
---@return boolean
function Animate:initWithAnimation (animation) end
---@overload fun():self
---@overload fun():self
---@return cc.Animation
function Animate:getAnimation () end
---* Gets the index of sprite frame currently displayed.<br>
---* return int the index of sprite frame currently displayed.
---@return int
function Animate:getCurrentFrameIndex () end
---* Sets the Animation object to be animated <br>
---* param animation certain animation.
---@param animation cc.Animation
---@return self
function Animate:setAnimation (animation) end
---* Creates the action with an Animation and will restore the original frame when the animation is over.<br>
---* param animation A certain animation.<br>
---* return An autoreleased Animate object.
---@param animation cc.Animation
---@return self
function Animate:create (animation) end
---*
---@param target cc.Node
---@return self
function Animate:startWithTarget (target) end
---*
---@return self
function Animate:clone () end
---*
---@return self
function Animate:stop () end
---*
---@return self
function Animate:reverse () end
---* param t In seconds.
---@param t float
---@return self
function Animate:update (t) end
---*
---@return self
function Animate:Animate () end

View File

@ -1,109 +0,0 @@
---@meta
---@class cc.Animate3D :cc.ActionInterval
local Animate3D={ }
cc.Animate3D=Animate3D
---*
---@param keyFrame int
---@param userInfo map_table
---@return self
function Animate3D:setKeyFrameUserInfo (keyFrame,userInfo) end
---* get & set speed, negative speed means playing reverse
---@return float
function Animate3D:getSpeed () end
---* set animate quality
---@param quality int
---@return self
function Animate3D:setQuality (quality) end
---*
---@param weight float
---@return self
function Animate3D:setWeight (weight) end
---*
---@return self
function Animate3D:removeFromMap () end
---*
---@param animation cc.Animation3D
---@param startFrame int
---@param endFrame int
---@param frameRate float
---@return boolean
function Animate3D:initWithFrames (animation,startFrame,endFrame,frameRate) end
---*
---@return float
function Animate3D:getOriginInterval () end
---*
---@param speed float
---@return self
function Animate3D:setSpeed (speed) end
---@overload fun(cc.Animation3D:cc.Animation3D,float:float,float:float):self
---@overload fun(cc.Animation3D:cc.Animation3D):self
---@param animation cc.Animation3D
---@param fromTime float
---@param duration float
---@return boolean
function Animate3D:init (animation,fromTime,duration) end
---* get & set origin interval
---@param interval float
---@return self
function Animate3D:setOriginInterval (interval) end
---* get & set blend weight, weight must positive
---@return float
function Animate3D:getWeight () end
---* get animate quality
---@return int
function Animate3D:getQuality () end
---@overload fun(cc.Animation3D:cc.Animation3D,float:float,float:float):self
---@overload fun(cc.Animation3D:cc.Animation3D):self
---@param animation cc.Animation3D
---@param fromTime float
---@param duration float
---@return self
function Animate3D:create (animation,fromTime,duration) end
---* get animate transition time between 3d animations
---@return float
function Animate3D:getTransitionTime () end
---* create Animate3D by frame section, [startFrame, endFrame)<br>
---* param animation used to generate animate3D<br>
---* param startFrame<br>
---* param endFrame<br>
---* param frameRate default is 30 per second<br>
---* return Animate3D created using animate
---@param animation cc.Animation3D
---@param startFrame int
---@param endFrame int
---@param frameRate float
---@return self
function Animate3D:createWithFrames (animation,startFrame,endFrame,frameRate) end
---* set animate transition time between 3d animations
---@param transTime float
---@return self
function Animate3D:setTransitionTime (transTime) end
---*
---@param target cc.Node
---@return self
function Animate3D:startWithTarget (target) end
---*
---@return self
function Animate3D:reverse () end
---*
---@return self
function Animate3D:clone () end
---*
---@return self
function Animate3D:stop () end
---*
---@param t float
---@return self
function Animate3D:update (t) end
---*
---@param dt float
---@return self
function Animate3D:step (dt) end
---*
---@return self
function Animate3D:Animate3D () end

View File

@ -1,110 +0,0 @@
---@meta
---@class cc.Animation :cc.Ref
local Animation={ }
cc.Animation=Animation
---* Gets the times the animation is going to loop. 0 means animation is not animated. 1, animation is executed one time, ... <br>
---* return The times the animation is going to loop.
---@return unsigned_int
function Animation:getLoops () end
---* Adds a SpriteFrame to a Animation.<br>
---* param frame The frame will be added with one "delay unit".
---@param frame cc.SpriteFrame
---@return self
function Animation:addSpriteFrame (frame) end
---* Sets whether to restore the original frame when animation finishes. <br>
---* param restoreOriginalFrame Whether to restore the original frame when animation finishes.
---@param restoreOriginalFrame boolean
---@return self
function Animation:setRestoreOriginalFrame (restoreOriginalFrame) end
---*
---@return self
function Animation:clone () end
---* Gets the duration in seconds of the whole animation. It is the result of totalDelayUnits * delayPerUnit.<br>
---* return Result of totalDelayUnits * delayPerUnit.
---@return float
function Animation:getDuration () end
---* Initializes a Animation with AnimationFrame.<br>
---* since v2.0
---@param arrayOfAnimationFrameNames array_table
---@param delayPerUnit float
---@param loops unsigned_int
---@return boolean
function Animation:initWithAnimationFrames (arrayOfAnimationFrameNames,delayPerUnit,loops) end
---* Initializes a Animation.
---@return boolean
function Animation:init () end
---* Sets the array of AnimationFrames. <br>
---* param frames The array of AnimationFrames.
---@param frames array_table
---@return self
function Animation:setFrames (frames) end
---* Gets the array of AnimationFrames.<br>
---* return The array of AnimationFrames.
---@return array_table
function Animation:getFrames () end
---* Sets the times the animation is going to loop. 0 means animation is not animated. 1, animation is executed one time, ... <br>
---* param loops The times the animation is going to loop.
---@param loops unsigned_int
---@return self
function Animation:setLoops (loops) end
---* Sets the delay in seconds of the "delay unit".<br>
---* param delayPerUnit The delay in seconds of the "delay unit".
---@param delayPerUnit float
---@return self
function Animation:setDelayPerUnit (delayPerUnit) end
---* Adds a frame with an image filename. Internally it will create a SpriteFrame and it will add it.<br>
---* The frame will be added with one "delay unit".<br>
---* Added to facilitate the migration from v0.8 to v0.9.<br>
---* param filename The path of SpriteFrame.
---@param filename string
---@return self
function Animation:addSpriteFrameWithFile (filename) end
---* Gets the total Delay units of the Animation. <br>
---* return The total Delay units of the Animation.
---@return float
function Animation:getTotalDelayUnits () end
---* Gets the delay in seconds of the "delay unit".<br>
---* return The delay in seconds of the "delay unit".
---@return float
function Animation:getDelayPerUnit () end
---* Initializes a Animation with frames and a delay between frames.<br>
---* since v0.99.5
---@param arrayOfSpriteFrameNames array_table
---@param delay float
---@param loops unsigned_int
---@return boolean
function Animation:initWithSpriteFrames (arrayOfSpriteFrameNames,delay,loops) end
---* Checks whether to restore the original frame when animation finishes. <br>
---* return Restore the original frame when animation finishes.
---@return boolean
function Animation:getRestoreOriginalFrame () end
---* Adds a frame with a texture and a rect. Internally it will create a SpriteFrame and it will add it.<br>
---* The frame will be added with one "delay unit".<br>
---* Added to facilitate the migration from v0.8 to v0.9.<br>
---* param pobTexture A frame with a texture.<br>
---* param rect The Texture of rect.
---@param pobTexture cc.Texture2D
---@param rect rect_table
---@return self
function Animation:addSpriteFrameWithTexture (pobTexture,rect) end
---@overload fun(array_table:array_table,float:float,unsigned_int:unsigned_int):self
---@overload fun():self
---@param arrayOfAnimationFrameNames array_table
---@param delayPerUnit float
---@param loops unsigned_int
---@return self
function Animation:create (arrayOfAnimationFrameNames,delayPerUnit,loops) end
---*
---@param arrayOfSpriteFrameNames array_table
---@param delay float
---@param loops unsigned_int
---@return self
function Animation:createWithSpriteFrames (arrayOfSpriteFrameNames,delay,loops) end
---*
---@return self
function Animation:Animation () end

View File

@ -1,29 +0,0 @@
---@meta
---@class cc.Animation3D :cc.Ref
local Animation3D={ }
cc.Animation3D=Animation3D
---* init Animation3D with file name and animation name
---@param filename string
---@param animationName string
---@return boolean
function Animation3D:initWithFile (filename,animationName) end
---* init Animation3D from bundle data
---@param data cc.Animation3DData
---@return boolean
function Animation3D:init (data) end
---* get duration
---@return float
function Animation3D:getDuration () end
---* read all animation or only the animation with given animationName? animationName == "" read the first.
---@param filename string
---@param animationName string
---@return self
function Animation3D:create (filename,animationName) end
---*
---@return self
function Animation3D:Animation3D () end

View File

@ -1,61 +0,0 @@
---@meta
---@class cc.AnimationCache :cc.Ref
local AnimationCache={ }
cc.AnimationCache=AnimationCache
---* Returns a Animation that was previously added.<br>
---* If the name is not found it will return nil.<br>
---* You should retain the returned copy if you are going to use it.<br>
---* return A Animation that was previously added. If the name is not found it will return nil.
---@param name string
---@return cc.Animation
function AnimationCache:getAnimation (name) end
---* Adds a Animation with a name.<br>
---* param animation An animation.<br>
---* param name The name of animation.
---@param animation cc.Animation
---@param name string
---@return self
function AnimationCache:addAnimation (animation,name) end
---*
---@return boolean
function AnimationCache:init () end
---* Adds an animation from an NSDictionary.<br>
---* Make sure that the frames were previously loaded in the SpriteFrameCache.<br>
---* param dictionary An NSDictionary.<br>
---* param plist The path of the relative file,it use to find the plist path for load SpriteFrames.<br>
---* since v1.1<br>
---* js NA
---@param dictionary map_table
---@param plist string
---@return self
function AnimationCache:addAnimationsWithDictionary (dictionary,plist) end
---* Deletes a Animation from the cache.<br>
---* param name The name of animation.
---@param name string
---@return self
function AnimationCache:removeAnimation (name) end
---* Adds an animation from a plist file.<br>
---* Make sure that the frames were previously loaded in the SpriteFrameCache.<br>
---* since v1.1<br>
---* js addAnimations<br>
---* lua addAnimations<br>
---* param plist An animation from a plist file.
---@param plist string
---@return self
function AnimationCache:addAnimationsWithFile (plist) end
---* Purges the cache. It releases all the Animation objects and the shared instance.<br>
---* js NA
---@return self
function AnimationCache:destroyInstance () end
---* Returns the shared instance of the Animation cache <br>
---* js NA
---@return self
function AnimationCache:getInstance () end
---* js ctor
---@return self
function AnimationCache:AnimationCache () end

View File

@ -1,58 +0,0 @@
---@meta
---@class cc.AnimationFrame :cc.Ref
local AnimationFrame={ }
cc.AnimationFrame=AnimationFrame
---* Set the SpriteFrame.<br>
---* param frame A SpriteFrame will be used.
---@param frame cc.SpriteFrame
---@return self
function AnimationFrame:setSpriteFrame (frame) end
---@overload fun():self
---@overload fun():self
---@return map_table
function AnimationFrame:getUserInfo () end
---* Sets the units of time the frame takes.<br>
---* param delayUnits The units of time the frame takes.
---@param delayUnits float
---@return self
function AnimationFrame:setDelayUnits (delayUnits) end
---*
---@return self
function AnimationFrame:clone () end
---* Return a SpriteFrameName to be used.<br>
---* return a SpriteFrameName to be used.
---@return cc.SpriteFrame
function AnimationFrame:getSpriteFrame () end
---* Gets the units of time the frame takes.<br>
---* return The units of time the frame takes.
---@return float
function AnimationFrame:getDelayUnits () end
---* Sets user information.<br>
---* param userInfo A dictionary as UserInfo.
---@param userInfo map_table
---@return self
function AnimationFrame:setUserInfo (userInfo) end
---* initializes the animation frame with a spriteframe, number of delay units and a notification user info
---@param spriteFrame cc.SpriteFrame
---@param delayUnits float
---@param userInfo map_table
---@return boolean
function AnimationFrame:initWithSpriteFrame (spriteFrame,delayUnits,userInfo) end
---* Creates the animation frame with a spriteframe, number of delay units and a notification user info.<br>
---* param spriteFrame The animation frame with a spriteframe.<br>
---* param delayUnits Number of delay units.<br>
---* param userInfo A notification user info.<br>
---* since 3.0
---@param spriteFrame cc.SpriteFrame
---@param delayUnits float
---@param userInfo map_table
---@return self
function AnimationFrame:create (spriteFrame,delayUnits,userInfo) end
---* js ctor
---@return self
function AnimationFrame:AnimationFrame () end

View File

@ -1,38 +0,0 @@
---@meta
---@class cc.Application
local Application={ }
cc.Application=Application
---* brief Get target platform
---@return int
function Application:getTargetPlatform () end
---* brief Get current language config<br>
---* return Current language config
---@return int
function Application:getCurrentLanguage () end
---* brief Get current language iso 639-1 code<br>
---* return Current language iso 639-1 code
---@return char
function Application:getCurrentLanguageCode () end
---* brief Open url in default browser<br>
---* param String with url to open.<br>
---* return true if the resource located by the URL was successfully opened; otherwise false.
---@param url string
---@return boolean
function Application:openURL (url) end
---* brief Get application version.
---@return string
function Application:getVersion () end
---* brief Callback by Director to limit FPS.<br>
---* param interval The time, expressed in seconds, between current frame and next.
---@param interval float
---@return self
function Application:setAnimationInterval (interval) end
---* brief Get current application instance.<br>
---* return Current application instance pointer.
---@return self
function Application:getInstance () end

View File

@ -1,61 +0,0 @@
---@meta
---@class cc.AssetsManager :cc.Node
local AssetsManager={ }
cc.AssetsManager=AssetsManager
---*
---@param storagePath char
---@return self
function AssetsManager:setStoragePath (storagePath) end
---*
---@param packageUrl char
---@return self
function AssetsManager:setPackageUrl (packageUrl) end
---*
---@return boolean
function AssetsManager:checkUpdate () end
---*
---@return char
function AssetsManager:getStoragePath () end
---*
---@return self
function AssetsManager:update () end
---* @brief Sets connection time out in seconds
---@param timeout unsigned_int
---@return self
function AssetsManager:setConnectionTimeout (timeout) end
---*
---@param versionFileUrl char
---@return self
function AssetsManager:setVersionFileUrl (versionFileUrl) end
---*
---@return char
function AssetsManager:getPackageUrl () end
---* @brief Gets connection time out in seconds
---@return unsigned_int
function AssetsManager:getConnectionTimeout () end
---*
---@return string
function AssetsManager:getVersion () end
---*
---@return char
function AssetsManager:getVersionFileUrl () end
---*
---@return self
function AssetsManager:deleteVersion () end
---*
---@param packageUrl char
---@param versionFileUrl char
---@param storagePath char
---@param errorCallback function
---@param progressCallback function
---@param successCallback function
---@return self
function AssetsManager:create (packageUrl,versionFileUrl,storagePath,errorCallback,progressCallback,successCallback) end
---*
---@return self
function AssetsManager:AssetsManager () end

View File

@ -1,63 +0,0 @@
---@meta
---@class cc.AssetsManagerEx :cc.Ref
local AssetsManagerEx={ }
cc.AssetsManagerEx=AssetsManagerEx
---* @brief Gets the current update state.
---@return int
function AssetsManagerEx:getState () end
---* @brief Function for retrieving the max concurrent task count
---@return int
function AssetsManagerEx:getMaxConcurrentTask () end
---* @brief Check out if there is a new version of manifest.<br>
---* You may use this method before updating, then let user determine whether<br>
---* he wants to update resources.
---@return self
function AssetsManagerEx:checkUpdate () end
---* @brief Set the verification function for checking whether downloaded asset is correct, e.g. using md5 verification<br>
---* param callback The verify callback function
---@param callback function
---@return self
function AssetsManagerEx:setVerifyCallback (callback) end
---* @brief Gets storage path.
---@return string
function AssetsManagerEx:getStoragePath () end
---* @brief Update with the current local manifest.
---@return self
function AssetsManagerEx:update () end
---* @brief Set the handle function for comparing manifests versions<br>
---* param handle The compare function
---@param handle function
---@return self
function AssetsManagerEx:setVersionCompareHandle (handle) end
---* @brief Function for setting the max concurrent task count
---@param max int
---@return self
function AssetsManagerEx:setMaxConcurrentTask (max) end
---* @brief Function for retrieving the local manifest object
---@return cc.Manifest
function AssetsManagerEx:getLocalManifest () end
---* @brief Function for retrieving the remote manifest object
---@return cc.Manifest
function AssetsManagerEx:getRemoteManifest () end
---* @brief Reupdate all failed assets under the current AssetsManagerEx context
---@return self
function AssetsManagerEx:downloadFailedAssets () end
---* @brief Create function for creating a new AssetsManagerEx<br>
---* param manifestUrl The url for the local manifest file<br>
---* param storagePath The storage path for downloaded assets<br>
---* warning The cached manifest in your storage path have higher priority and will be searched first,<br>
---* only if it doesn't exist, AssetsManagerEx will use the given manifestUrl.
---@param manifestUrl string
---@param storagePath string
---@return self
function AssetsManagerEx:create (manifestUrl,storagePath) end
---*
---@param manifestUrl string
---@param storagePath string
---@return self
function AssetsManagerEx:AssetsManagerEx (manifestUrl,storagePath) end

View File

@ -1,31 +0,0 @@
---@meta
---@class cc.AsyncTaskPool
local AsyncTaskPool={ }
cc.AsyncTaskPool=AsyncTaskPool
---@overload fun(int:int,function:function):self
---@overload fun(int:int,function:function,void:void,function:function):self
---@param type int
---@param callback function
---@param callbackParam void
---@param task function
---@return self
function AsyncTaskPool:enqueue (type,callback,callbackParam,task) end
---* Stop tasks.<br>
---* param type Task type you want to stop.
---@param type int
---@return self
function AsyncTaskPool:stopTasks (type) end
---* Destroys the async task pool.
---@return self
function AsyncTaskPool:destroyInstance () end
---* Returns the shared instance of the async task pool.
---@return self
function AsyncTaskPool:getInstance () end
---*
---@return self
function AsyncTaskPool:AsyncTaskPool () end

View File

@ -1,98 +0,0 @@
---@meta
---@class cc.AtlasNode :cc.Node@all parent class: Node,TextureProtocol
local AtlasNode={ }
cc.AtlasNode=AtlasNode
---* lua NA
---@return cc.BlendFunc
function AtlasNode:getBlendFunc () end
---* Initializes an AtlasNode with an Atlas file the width and height of each item and the quantity of items to render
---@param tile string
---@param tileWidth int
---@param tileHeight int
---@param itemsToRender int
---@return boolean
function AtlasNode:initWithTileFile (tile,tileWidth,tileHeight,itemsToRender) end
---* code<br>
---* When this function bound into js or lua,the parameter will be changed<br>
---* In js: var setBlendFunc(var src, var dst)<br>
---* endcode<br>
---* lua NA
---@param blendFunc cc.BlendFunc
---@return self
function AtlasNode:setBlendFunc (blendFunc) end
---* Set an buffer manager of the texture vertex.
---@param textureAtlas cc.TextureAtlas
---@return self
function AtlasNode:setTextureAtlas (textureAtlas) end
---*
---@return cc.Texture2D
function AtlasNode:getTexture () end
---* Return the buffer manager of the texture vertex. <br>
---* return Return A TextureAtlas.
---@return cc.TextureAtlas
function AtlasNode:getTextureAtlas () end
---* updates the Atlas (indexed vertex array).<br>
---* Shall be overridden in subclasses.
---@return self
function AtlasNode:updateAtlasValues () end
---*
---@param texture cc.Texture2D
---@return self
function AtlasNode:setTexture (texture) end
---* Initializes an AtlasNode with a texture the width and height of each item measured in points and the quantity of items to render
---@param texture cc.Texture2D
---@param tileWidth int
---@param tileHeight int
---@param itemsToRender int
---@return boolean
function AtlasNode:initWithTexture (texture,tileWidth,tileHeight,itemsToRender) end
---*
---@return unsigned_int
function AtlasNode:getQuadsToDraw () end
---*
---@param quadsToDraw int
---@return self
function AtlasNode:setQuadsToDraw (quadsToDraw) end
---* creates a AtlasNode with an Atlas file the width and height of each item and the quantity of items to render.<br>
---* param filename The path of Atlas file.<br>
---* param tileWidth The width of the item.<br>
---* param tileHeight The height of the item.<br>
---* param itemsToRender The quantity of items to render.
---@param filename string
---@param tileWidth int
---@param tileHeight int
---@param itemsToRender int
---@return self
function AtlasNode:create (filename,tileWidth,tileHeight,itemsToRender) end
---*
---@param renderer cc.Renderer
---@param transform mat4_table
---@param flags unsigned_int
---@return self
function AtlasNode:draw (renderer,transform,flags) end
---*
---@return boolean
function AtlasNode:isOpacityModifyRGB () end
---*
---@param color color3b_table
---@return self
function AtlasNode:setColor (color) end
---*
---@return color3b_table
function AtlasNode:getColor () end
---*
---@param isOpacityModifyRGB boolean
---@return self
function AtlasNode:setOpacityModifyRGB (isOpacityModifyRGB) end
---*
---@param opacity unsigned_char
---@return self
function AtlasNode:setOpacity (opacity) end
---*
---@return self
function AtlasNode:AtlasNode () end

View File

@ -1,32 +0,0 @@
---@meta
---@class cc.AttachNode :cc.Node
local AttachNode={ }
cc.AttachNode=AttachNode
---* creates an AttachNode<br>
---* param attachBone The bone to which the AttachNode is going to attach, the attacheBone must be a bone of the AttachNode's parent
---@param attachBone cc.Bone3D
---@return self
function AttachNode:create (attachBone) end
---*
---@param renderer cc.Renderer
---@param parentTransform mat4_table
---@param parentFlags unsigned_int
---@return self
function AttachNode:visit (renderer,parentTransform,parentFlags) end
---*
---@return mat4_table
function AttachNode:getWorldToNodeTransform () end
---*
---@return mat4_table
function AttachNode:getNodeToWorldTransform () end
---*
---@return mat4_table
function AttachNode:getNodeToParentTransform () end
---*
---@return self
function AttachNode:AttachNode () end

View File

@ -1,151 +0,0 @@
---@meta
---@class cc.AudioEngine
local AudioEngine={ }
cc.AudioEngine=AudioEngine
---*
---@return boolean
function AudioEngine:lazyInit () end
---* Sets the current playback position of an audio instance.<br>
---* param audioID An audioID returned by the play2d function.<br>
---* param sec The offset in seconds from the start to seek to.<br>
---* return
---@param audioID int
---@param sec float
---@return boolean
function AudioEngine:setCurrentTime (audioID,sec) end
---* Gets the volume value of an audio instance.<br>
---* param audioID An audioID returned by the play2d function.<br>
---* return Volume value (range from 0.0 to 1.0).
---@param audioID int
---@return float
function AudioEngine:getVolume (audioID) end
---* Uncache the audio data from internal buffer.<br>
---* AudioEngine cache audio data on ios,mac, and win32 platform.<br>
---* warning This can lead to stop related audio first.<br>
---* param filePath Audio file path.
---@param filePath string
---@return self
function AudioEngine:uncache (filePath) end
---* Resume all suspended audio instances.
---@return self
function AudioEngine:resumeAll () end
---* Stop all audio instances.
---@return self
function AudioEngine:stopAll () end
---* Pause an audio instance.<br>
---* param audioID An audioID returned by the play2d function.
---@param audioID int
---@return self
function AudioEngine:pause (audioID) end
---* Gets the maximum number of simultaneous audio instance of AudioEngine.
---@return int
function AudioEngine:getMaxAudioInstance () end
---* Check whether AudioEngine is enabled.
---@return boolean
function AudioEngine:isEnabled () end
---* Gets the current playback position of an audio instance.<br>
---* param audioID An audioID returned by the play2d function.<br>
---* return The current playback position of an audio instance.
---@param audioID int
---@return float
function AudioEngine:getCurrentTime (audioID) end
---* Sets the maximum number of simultaneous audio instance for AudioEngine.<br>
---* param maxInstances The maximum number of simultaneous audio instance.
---@param maxInstances int
---@return boolean
function AudioEngine:setMaxAudioInstance (maxInstances) end
---* Checks whether an audio instance is loop.<br>
---* param audioID An audioID returned by the play2d function.<br>
---* return Whether or not an audio instance is loop.
---@param audioID int
---@return boolean
function AudioEngine:isLoop (audioID) end
---* Pause all playing audio instances.
---@return self
function AudioEngine:pauseAll () end
---* Uncache all audio data from internal buffer.<br>
---* warning All audio will be stopped first.
---@return self
function AudioEngine:uncacheAll () end
---* Sets volume for an audio instance.<br>
---* param audioID An audioID returned by the play2d function.<br>
---* param volume Volume value (range from 0.0 to 1.0).
---@param audioID int
---@param volume float
---@return self
function AudioEngine:setVolume (audioID,volume) end
---@overload fun(string:string,function:function):self
---@overload fun(string:string):self
---@param filePath string
---@param callback function
---@return self
function AudioEngine:preload (filePath,callback) end
---* Whether to enable playing audios<br>
---* note If it's disabled, current playing audios will be stopped and the later 'preload', 'play2d' methods will take no effects.
---@param isEnabled boolean
---@return self
function AudioEngine:setEnabled (isEnabled) end
---* Play 2d sound.<br>
---* param filePath The path of an audio file.<br>
---* param loop Whether audio instance loop or not.<br>
---* param volume Volume value (range from 0.0 to 1.0).<br>
---* param profile A profile for audio instance. When profile is not specified, default profile will be used.<br>
---* return An audio ID. It allows you to dynamically change the behavior of an audio instance on the fly.<br>
---* see `AudioProfile`
---@param filePath string
---@param loop boolean
---@param volume float
---@param profile cc.AudioProfile
---@return int
function AudioEngine:play2d (filePath,loop,volume,profile) end
---* Returns the state of an audio instance.<br>
---* param audioID An audioID returned by the play2d function.<br>
---* return The status of an audio instance.
---@param audioID int
---@return int
function AudioEngine:getState (audioID) end
---* Resume an audio instance.<br>
---* param audioID An audioID returned by the play2d function.
---@param audioID int
---@return self
function AudioEngine:resume (audioID) end
---* Stop an audio instance.<br>
---* param audioID An audioID returned by the play2d function.
---@param audioID int
---@return self
function AudioEngine:stop (audioID) end
---* Release objects relating to AudioEngine.<br>
---* warning It must be called before the application exit.<br>
---* lua endToLua
---@return self
function AudioEngine:endToLua () end
---* Gets the duration of an audio instance.<br>
---* param audioID An audioID returned by the play2d function.<br>
---* return The duration of an audio instance.
---@param audioID int
---@return float
function AudioEngine:getDuration (audioID) end
---* Sets whether an audio instance loop or not.<br>
---* param audioID An audioID returned by the play2d function.<br>
---* param loop Whether audio instance loop or not.
---@param audioID int
---@param loop boolean
---@return self
function AudioEngine:setLoop (audioID,loop) end
---* Gets the default profile of audio instances.<br>
---* return The default profile of audio instances.
---@return cc.AudioProfile
function AudioEngine:getDefaultProfile () end
---@overload fun(int0:string):self
---@overload fun(int:int):self
---@param audioID int
---@return cc.AudioProfile
function AudioEngine:getProfile (audioID) end
---* Gets playing audio count.
---@return int
function AudioEngine:getPlayingAudioCount () end

View File

@ -1,13 +0,0 @@
---@meta
---@class cc.AudioProfile
local AudioProfile={ }
cc.AudioProfile=AudioProfile
---* Default constructor<br>
---* lua new
---@return self
function AudioProfile:AudioProfile () end

View File

@ -1,16 +0,0 @@
---@meta
---@class cc.AutoPolygon
local AutoPolygon={ }
cc.AutoPolygon=AutoPolygon
---* create an AutoPolygon and initialize it with an image file<br>
---* the image must be a 32bit PNG for current version 3.7<br>
---* param filename a path to image file, e.g., "scene1/monster.png".<br>
---* return an AutoPolygon object;
---@param filename string
---@return self
function AutoPolygon:AutoPolygon (filename) end

View File

@ -1,34 +0,0 @@
---@meta
---@class cc.BaseLight :cc.Node
local BaseLight={ }
cc.BaseLight=BaseLight
---* light enabled getter and setter.
---@param enabled boolean
---@return self
function BaseLight:setEnabled (enabled) end
---* intensity getter and setter
---@return float
function BaseLight:getIntensity () end
---*
---@return boolean
function BaseLight:isEnabled () end
---* Get the light type,light type MUST be one of LightType::DIRECTIONAL ,<br>
---* LightType::POINT, LightType::SPOT, LightType::AMBIENT.
---@return int
function BaseLight:getLightType () end
---*
---@param flag int
---@return self
function BaseLight:setLightFlag (flag) end
---*
---@param intensity float
---@return self
function BaseLight:setIntensity (intensity) end
---* light flag getter and setter
---@return int
function BaseLight:getLightFlag () end

View File

@ -1,32 +0,0 @@
---@meta
---@class cc.BezierBy :cc.ActionInterval
local BezierBy={ }
cc.BezierBy=BezierBy
---* initializes the action with a duration and a bezier configuration<br>
---* param t in seconds
---@param t float
---@param c cc._ccBezierConfig
---@return boolean
function BezierBy:initWithDuration (t,c) end
---*
---@param target cc.Node
---@return self
function BezierBy:startWithTarget (target) end
---*
---@return self
function BezierBy:clone () end
---*
---@return self
function BezierBy:reverse () end
---* param time In seconds.
---@param time float
---@return self
function BezierBy:update (time) end
---*
---@return self
function BezierBy:BezierBy () end

View File

@ -1,27 +0,0 @@
---@meta
---@class cc.BezierTo :cc.BezierBy
local BezierTo={ }
cc.BezierTo=BezierTo
---* param t In seconds.
---@param t float
---@param c cc._ccBezierConfig
---@return boolean
function BezierTo:initWithDuration (t,c) end
---*
---@param target cc.Node
---@return self
function BezierTo:startWithTarget (target) end
---*
---@return self
function BezierTo:clone () end
---*
---@return self
function BezierTo:reverse () end
---*
---@return self
function BezierTo:BezierTo () end

View File

@ -1,41 +0,0 @@
---@meta
---@class cc.BillBoard :cc.Sprite
local BillBoard={ }
cc.BillBoard=BillBoard
---* Get the billboard rotation mode.
---@return int
function BillBoard:getMode () end
---* Set the billboard rotation mode.
---@param mode int
---@return self
function BillBoard:setMode (mode) end
---@overload fun(string:string,rect_table1:int):self
---@overload fun(string0:int):self
---@overload fun(string:string,rect_table:rect_table,int:int):self
---@param filename string
---@param rect rect_table
---@param mode int
---@return self
function BillBoard:create (filename,rect,mode) end
---* Creates a BillBoard with a Texture2D object.<br>
---* After creation, the rect will be the size of the texture, and the offset will be (0,0).<br>
---* param texture A pointer to a Texture2D object.<br>
---* return An autoreleased BillBoard object
---@param texture cc.Texture2D
---@param mode int
---@return self
function BillBoard:createWithTexture (texture,mode) end
---* update billboard's transform and turn it towards camera
---@param renderer cc.Renderer
---@param parentTransform mat4_table
---@param parentFlags unsigned_int
---@return self
function BillBoard:visit (renderer,parentTransform,parentFlags) end
---*
---@return self
function BillBoard:BillBoard () end

View File

@ -1,43 +0,0 @@
---@meta
---@class cc.Blink :cc.ActionInterval
local Blink={ }
cc.Blink=Blink
---* initializes the action <br>
---* param duration in seconds
---@param duration float
---@param blinks int
---@return boolean
function Blink:initWithDuration (duration,blinks) end
---* Creates the action.<br>
---* param duration Duration time, in seconds.<br>
---* param blinks Blink times.<br>
---* return An autoreleased Blink object.
---@param duration float
---@param blinks int
---@return self
function Blink:create (duration,blinks) end
---*
---@param target cc.Node
---@return self
function Blink:startWithTarget (target) end
---*
---@return self
function Blink:clone () end
---*
---@return self
function Blink:stop () end
---*
---@return self
function Blink:reverse () end
---* param time In seconds.
---@param time float
---@return self
function Blink:update (time) end
---*
---@return self
function Blink:Blink () end

View File

@ -1,59 +0,0 @@
---@meta
---@class cc.Bundle3D
local Bundle3D={ }
cc.Bundle3D=Bundle3D
---* load a file. You must load a file first, then call loadMeshData, loadSkinData, and so on<br>
---* param path File to be loaded<br>
---* return result of load
---@param path string
---@return boolean
function Bundle3D:load (path) end
---* load skin data from bundle<br>
---* param id The ID of the skin, load the first Skin in the bundle if it is empty
---@param id string
---@param skindata cc.SkinData
---@return boolean
function Bundle3D:loadSkinData (id,skindata) end
---*
---@return self
function Bundle3D:clear () end
---*
---@param materialdatas cc.MaterialDatas
---@return boolean
function Bundle3D:loadMaterials (materialdatas) end
---*
---@param nodedatas cc.NodeDatas
---@return boolean
function Bundle3D:loadNodes (nodedatas) end
---* load material data from bundle<br>
---* param id The ID of the animation, load the first animation in the bundle if it is empty
---@param id string
---@param animationdata cc.Animation3DData
---@return boolean
function Bundle3D:loadAnimationData (id,animationdata) end
---* get define data type<br>
---* param str The type in string
---@param str string
---@return int
function Bundle3D:parseSamplerAddressMode (str) end
---*
---@param bundle cc.Bundle3D
---@return self
function Bundle3D:destroyBundle (bundle) end
---* create a new bundle, destroy it when finish using it
---@return self
function Bundle3D:createBundle () end
---* get define data type<br>
---* param str The type in string
---@param str string
---@param size int
---@return int
function Bundle3D:parseGLDataType (str,size) end
---*
---@return self
function Bundle3D:Bundle3D () end

View File

@ -1,68 +0,0 @@
---@meta
---@class cc.CSLoader
local CSLoader={ }
cc.CSLoader=CSLoader
---*
---@param filename string
---@return cc.Node
function CSLoader:createNodeFromJson (filename) end
---*
---@param filename string
---@return cc.Node
function CSLoader:createNodeWithFlatBuffersFile (filename) end
---*
---@param fileName string
---@return cc.Node
function CSLoader:loadNodeWithFile (fileName) end
---*
---@param callbackName string
---@param callbackType string
---@param sender ccui.Widget
---@param handler cc.Node
---@return boolean
function CSLoader:bindCallback (callbackName,callbackType,sender,handler) end
---*
---@param jsonPath string
---@return self
function CSLoader:setJsonPath (jsonPath) end
---*
---@return self
function CSLoader:init () end
---*
---@param content string
---@return cc.Node
function CSLoader:loadNodeWithContent (content) end
---*
---@return boolean
function CSLoader:isRecordJsonPath () end
---*
---@return string
function CSLoader:getJsonPath () end
---*
---@param record boolean
---@return self
function CSLoader:setRecordJsonPath (record) end
---*
---@param filename string
---@return cc.Node
function CSLoader:createNodeWithFlatBuffersForSimulator (filename) end
---*
---@return self
function CSLoader:destroyInstance () end
---@overload fun(string:string,function:function):self
---@overload fun(string:string):self
---@param filename string
---@param callback function
---@return cc.Node
function CSLoader:createNodeWithVisibleSize (filename,callback) end
---*
---@return self
function CSLoader:getInstance () end
---*
---@return self
function CSLoader:CSLoader () end

View File

@ -1,25 +0,0 @@
---@meta
---@class cc.CallFunc :cc.ActionInstant
local CallFunc={ }
cc.CallFunc=CallFunc
---* Executes the callback.
---@return self
function CallFunc:execute () end
---*
---@return self
function CallFunc:clone () end
---* param time In seconds.
---@param time float
---@return self
function CallFunc:update (time) end
---*
---@return self
function CallFunc:reverse () end
---*
---@return self
function CallFunc:CallFunc () end

View File

@ -1,166 +0,0 @@
---@meta
---@class cc.Camera :cc.Node
local Camera={ }
cc.Camera=Camera
---* get depth, camera with larger depth is drawn on top of camera with smaller depth, the depth of camera with CameraFlag::DEFAULT is 0, user defined camera is -1 by default
---@return char
function Camera:getDepth () end
---* get view projection matrix
---@return mat4_table
function Camera:getViewProjectionMatrix () end
---*
---@return self
function Camera:applyViewport () end
---* set the background brush. See CameraBackgroundBrush for more information.<br>
---* param clearBrush Brush used to clear the background
---@param clearBrush cc.CameraBackgroundBrush
---@return self
function Camera:setBackgroundBrush (clearBrush) end
---* Make Camera looks at target<br>
---* param target The target camera is point at<br>
---* param up The up vector, usually it's Y axis
---@param target vec3_table
---@param up vec3_table
---@return self
function Camera:lookAt (target,up) end
---* Apply the FBO, RenderTargets and viewport.
---@return self
function Camera:apply () end
---* Get clear brush
---@return cc.CameraBackgroundBrush
function Camera:getBackgroundBrush () end
---* Gets the camera's projection matrix.<br>
---* return The camera projection matrix.
---@return mat4_table
function Camera:getProjectionMatrix () end
---*
---@return boolean
function Camera:isBrushValid () end
---* Get object depth towards camera
---@param transform mat4_table
---@return float
function Camera:getDepthInView (transform) end
---* Before rendering scene with this camera, the background need to be cleared. It clears the depth buffer with max depth by default. Use setBackgroundBrush to modify the default behavior
---@return self
function Camera:clearBackground () end
---* set additional matrix for the projection matrix, it multiplies mat to projection matrix when called, used by WP8
---@param mat mat4_table
---@return self
function Camera:setAdditionalProjection (mat) end
---* init camera
---@return boolean
function Camera:initDefault () end
---* get & set Camera flag
---@return int
function Camera:getCameraFlag () end
---* Gets the type of camera.<br>
---* return The camera type.
---@return int
function Camera:getType () end
---*
---@param zoomX float
---@param zoomY float
---@param nearPlane float
---@param farPlane float
---@return boolean
function Camera:initOrthographic (zoomX,zoomY,nearPlane,farPlane) end
---* get rendered order
---@return int
function Camera:getRenderOrder () end
---* Is this aabb visible in frustum
---@param aabb cc.AABB
---@return boolean
function Camera:isVisibleInFrustum (aabb) end
---* set depth, camera with larger depth is drawn on top of camera with smaller depth, the depth of camera with CameraFlag::DEFAULT is 0, user defined camera is -1 by default
---@param depth char
---@return self
function Camera:setDepth (depth) end
---* Set the scene,this method shall not be invoke manually
---@param scene cc.Scene
---@return self
function Camera:setScene (scene) end
---*
---@param src vec3_table
---@return vec2_table
function Camera:projectGL (src) end
---* Gets the camera's view matrix.<br>
---* return The camera view matrix.
---@return mat4_table
function Camera:getViewMatrix () end
---* Get the frustum's near plane.
---@return float
function Camera:getNearPlane () end
---*
---@param src vec3_table
---@return vec2_table
function Camera:project (src) end
---*
---@param flag int
---@return self
function Camera:setCameraFlag (flag) end
---* Get the frustum's far plane.
---@return float
function Camera:getFarPlane () end
---* Whether or not the viewprojection matrix was updated since the last frame.<br>
---* return True if the viewprojection matrix was updated since the last frame.
---@return boolean
function Camera:isViewProjectionUpdated () end
---*
---@param fieldOfView float
---@param aspectRatio float
---@param nearPlane float
---@param farPlane float
---@return boolean
function Camera:initPerspective (fieldOfView,aspectRatio,nearPlane,farPlane) end
---* Creates an orthographic camera.<br>
---* param zoomX The zoom factor along the X-axis of the orthographic projection (the width of the ortho projection).<br>
---* param zoomY The zoom factor along the Y-axis of the orthographic projection (the height of the ortho projection).<br>
---* param nearPlane The near plane distance.<br>
---* param farPlane The far plane distance.
---@param zoomX float
---@param zoomY float
---@param nearPlane float
---@param farPlane float
---@return self
function Camera:createOrthographic (zoomX,zoomY,nearPlane,farPlane) end
---* Get the visiting camera , the visiting camera shall be set on Scene::render
---@return self
function Camera:getVisitingCamera () end
---* create default camera, the camera type depends on Director::getProjection, the depth of the default camera is 0
---@return self
function Camera:create () end
---* Creates a perspective camera.<br>
---* param fieldOfView The field of view for the perspective camera (normally in the range of 40-60 degrees).<br>
---* param aspectRatio The aspect ratio of the camera (normally the width of the viewport divided by the height of the viewport).<br>
---* param nearPlane The near plane distance.<br>
---* param farPlane The far plane distance.
---@param fieldOfView float
---@param aspectRatio float
---@param nearPlane float
---@param farPlane float
---@return self
function Camera:createPerspective (fieldOfView,aspectRatio,nearPlane,farPlane) end
---*
---@return cc.Viewport
function Camera:getDefaultViewport () end
---*
---@param vp cc.Viewport
---@return self
function Camera:setDefaultViewport (vp) end
---* Get the default camera of the current running scene.
---@return self
function Camera:getDefaultCamera () end
---*
---@param renderer cc.Renderer
---@param parentTransform mat4_table
---@param parentFlags unsigned_int
---@return self
function Camera:visit (renderer,parentTransform,parentFlags) end
---*
---@return self
function Camera:Camera () end

View File

@ -1,59 +0,0 @@
---@meta
---@class cc.CameraBackgroundBrush :cc.Ref
local CameraBackgroundBrush={ }
cc.CameraBackgroundBrush=CameraBackgroundBrush
---* get brush type<br>
---* return BrushType
---@return int
function CameraBackgroundBrush:getBrushType () end
---* draw the background
---@param a cc.Camer
---@return self
function CameraBackgroundBrush:drawBackground (a) end
---*
---@return boolean
function CameraBackgroundBrush:init () end
---*
---@return boolean
function CameraBackgroundBrush:isValid () end
---* Creates a Skybox brush with 6 textures.<br>
---* param positive_x texture for the right side of the texture cube face.<br>
---* param negative_x texture for the up side of the texture cube face.<br>
---* param positive_y texture for the top side of the texture cube face<br>
---* param negative_y texture for the bottom side of the texture cube face<br>
---* param positive_z texture for the forward side of the texture cube face.<br>
---* param negative_z texture for the rear side of the texture cube face.<br>
---* return A new brush inited with given parameters.
---@param positive_x string
---@param negative_x string
---@param positive_y string
---@param negative_y string
---@param positive_z string
---@param negative_z string
---@return cc.CameraBackgroundSkyBoxBrush
function CameraBackgroundBrush:createSkyboxBrush (positive_x,negative_x,positive_y,negative_y,positive_z,negative_z) end
---* Creates a color brush<br>
---* param color Color of brush<br>
---* param depth Depth used to clear depth buffer<br>
---* return Created brush
---@param color color4f_table
---@param depth float
---@return cc.CameraBackgroundColorBrush
function CameraBackgroundBrush:createColorBrush (color,depth) end
---* Creates a none brush, it does nothing when clear the background<br>
---* return Created brush.
---@return self
function CameraBackgroundBrush:createNoneBrush () end
---* Creates a depth brush, which clears depth buffer with a given depth.<br>
---* param depth Depth used to clear depth buffer<br>
---* return Created brush
---@return cc.CameraBackgroundDepthBrush
function CameraBackgroundBrush:createDepthBrush () end
---*
---@return self
function CameraBackgroundBrush:CameraBackgroundBrush () end

View File

@ -1,36 +0,0 @@
---@meta
---@class cc.CameraBackgroundColorBrush :cc.CameraBackgroundDepthBrush
local CameraBackgroundColorBrush={ }
cc.CameraBackgroundColorBrush=CameraBackgroundColorBrush
---* Set clear color<br>
---* param color Color used to clear the color buffer
---@param color color4f_table
---@return self
function CameraBackgroundColorBrush:setColor (color) end
---* Create a color brush<br>
---* param color Color used to clear the color buffer<br>
---* param depth Depth used to clear the depth buffer<br>
---* return Created brush
---@param color color4f_table
---@param depth float
---@return self
function CameraBackgroundColorBrush:create (color,depth) end
---* Get brush type. Should be BrushType::COLOR<br>
---* return brush type
---@return int
function CameraBackgroundColorBrush:getBrushType () end
---* Draw background
---@param camera cc.Camera
---@return self
function CameraBackgroundColorBrush:drawBackground (camera) end
---*
---@return boolean
function CameraBackgroundColorBrush:init () end
---*
---@return self
function CameraBackgroundColorBrush:CameraBackgroundColorBrush () end

View File

@ -1,34 +0,0 @@
---@meta
---@class cc.CameraBackgroundDepthBrush :cc.CameraBackgroundBrush
local CameraBackgroundDepthBrush={ }
cc.CameraBackgroundDepthBrush=CameraBackgroundDepthBrush
---* Set depth<br>
---* param depth Depth used to clear depth buffer
---@param depth float
---@return self
function CameraBackgroundDepthBrush:setDepth (depth) end
---* Create a depth brush<br>
---* param depth Depth used to clear the depth buffer<br>
---* return Created brush
---@param depth float
---@return self
function CameraBackgroundDepthBrush:create (depth) end
---* Get brush type. Should be BrushType::DEPTH<br>
---* return brush type
---@return int
function CameraBackgroundDepthBrush:getBrushType () end
---* Draw background
---@param camera cc.Camera
---@return self
function CameraBackgroundDepthBrush:drawBackground (camera) end
---*
---@return boolean
function CameraBackgroundDepthBrush:init () end
---*
---@return self
function CameraBackgroundDepthBrush:CameraBackgroundDepthBrush () end

View File

@ -1,52 +0,0 @@
---@meta
---@class cc.CameraBackgroundSkyBoxBrush :cc.CameraBackgroundBrush
local CameraBackgroundSkyBoxBrush={ }
cc.CameraBackgroundSkyBoxBrush=CameraBackgroundSkyBoxBrush
---*
---@param valid boolean
---@return self
function CameraBackgroundSkyBoxBrush:setTextureValid (valid) end
---* Set skybox texture <br>
---* param texture Skybox texture
---@param texture cc.TextureCube
---@return self
function CameraBackgroundSkyBoxBrush:setTexture (texture) end
---*
---@param actived boolean
---@return self
function CameraBackgroundSkyBoxBrush:setActived (actived) end
---*
---@return boolean
function CameraBackgroundSkyBoxBrush:isActived () end
---@overload fun():self
---@overload fun(string:string,string:string,string:string,string:string,string:string,string:string):self
---@param positive_x string
---@param negative_x string
---@param positive_y string
---@param negative_y string
---@param positive_z string
---@param negative_z string
---@return self
function CameraBackgroundSkyBoxBrush:create (positive_x,negative_x,positive_y,negative_y,positive_z,negative_z) end
---* Get brush type. Should be BrushType::SKYBOX<br>
---* return brush type
---@return int
function CameraBackgroundSkyBoxBrush:getBrushType () end
---* Draw background
---@param camera cc.Camera
---@return self
function CameraBackgroundSkyBoxBrush:drawBackground (camera) end
---* init Skybox.
---@return boolean
function CameraBackgroundSkyBoxBrush:init () end
---*
---@return boolean
function CameraBackgroundSkyBoxBrush:isValid () end
---*
---@return self
function CameraBackgroundSkyBoxBrush:CameraBackgroundSkyBoxBrush () end

View File

@ -1,26 +0,0 @@
---@meta
---@class cc.CardinalSplineBy :cc.CardinalSplineTo
local CardinalSplineBy={ }
cc.CardinalSplineBy=CardinalSplineBy
---*
---@param target cc.Node
---@return self
function CardinalSplineBy:startWithTarget (target) end
---*
---@return self
function CardinalSplineBy:clone () end
---*
---@param newPos vec2_table
---@return self
function CardinalSplineBy:updatePosition (newPos) end
---*
---@return self
function CardinalSplineBy:reverse () end
---*
---@return self
function CardinalSplineBy:CardinalSplineBy () end

View File

@ -1,45 +0,0 @@
---@meta
---@class cc.CardinalSplineTo :cc.ActionInterval
local CardinalSplineTo={ }
cc.CardinalSplineTo=CardinalSplineTo
---* Return a PointArray.<br>
---* return A PointArray.
---@return point_table
function CardinalSplineTo:getPoints () end
---* It will update the target position and change the _previousPosition to newPos<br>
---* param newPos The new position.
---@param newPos vec2_table
---@return self
function CardinalSplineTo:updatePosition (newPos) end
---* Initializes the action with a duration and an array of points.<br>
---* param duration In seconds.<br>
---* param points An PointArray.<br>
---* param tension Goodness of fit.
---@param duration float
---@param points point_table
---@param tension float
---@return boolean
function CardinalSplineTo:initWithDuration (duration,points,tension) end
---*
---@param target cc.Node
---@return self
function CardinalSplineTo:startWithTarget (target) end
---*
---@return self
function CardinalSplineTo:clone () end
---*
---@return self
function CardinalSplineTo:reverse () end
---* param time In seconds.
---@param time float
---@return self
function CardinalSplineTo:update (time) end
---* js ctor<br>
---* lua NA
---@return self
function CardinalSplineTo:CardinalSplineTo () end

View File

@ -1,22 +0,0 @@
---@meta
---@class cc.CatmullRomBy :cc.CardinalSplineBy
local CatmullRomBy={ }
cc.CatmullRomBy=CatmullRomBy
---* Initializes the action with a duration and an array of points.<br>
---* param dt In seconds.<br>
---* param points An PointArray.
---@param dt float
---@param points point_table
---@return boolean
function CatmullRomBy:initWithDuration (dt,points) end
---*
---@return self
function CatmullRomBy:clone () end
---*
---@return self
function CatmullRomBy:reverse () end

View File

@ -1,22 +0,0 @@
---@meta
---@class cc.CatmullRomTo :cc.CardinalSplineTo
local CatmullRomTo={ }
cc.CatmullRomTo=CatmullRomTo
---* Initializes the action with a duration and an array of points.<br>
---* param dt In seconds.<br>
---* param points An PointArray.
---@param dt float
---@param points point_table
---@return boolean
function CatmullRomTo:initWithDuration (dt,points) end
---*
---@return self
function CatmullRomTo:clone () end
---*
---@return self
function CatmullRomTo:reverse () end

View File

@ -1,77 +0,0 @@
---@meta
---@class cc.ClippingNode :cc.Node
local ClippingNode={ }
cc.ClippingNode=ClippingNode
---* If stencil has no children it will not be drawn.<br>
---* If you have custom stencil-based node with stencil drawing mechanics other then children-based,<br>
---* then this method should return true every time you wish stencil to be visited.<br>
---* By default returns true if has any children attached.<br>
---* return If you have custom stencil-based node with stencil drawing mechanics other then children-based,<br>
---* then this method should return true every time you wish stencil to be visited.<br>
---* By default returns true if has any children attached.<br>
---* js NA
---@return boolean
function ClippingNode:hasContent () end
---* Set the ClippingNode whether or not invert.<br>
---* param inverted A bool Type,to set the ClippingNode whether or not invert.
---@param inverted boolean
---@return self
function ClippingNode:setInverted (inverted) end
---* Set the Node to use as a stencil to do the clipping.<br>
---* param stencil The Node to use as a stencil to do the clipping.
---@param stencil cc.Node
---@return self
function ClippingNode:setStencil (stencil) end
---* The alpha threshold.<br>
---* The content is drawn only where the stencil have pixel with alpha greater than the alphaThreshold.<br>
---* Should be a float between 0 and 1.<br>
---* This default to 1 (so alpha test is disabled).<br>
---* return The alpha threshold value,Should be a float between 0 and 1.
---@return float
function ClippingNode:getAlphaThreshold () end
---* Initializes a clipping node with an other node as its stencil.<br>
---* The stencil node will be retained, and its parent will be set to this clipping node.
---@param stencil cc.Node
---@return boolean
function ClippingNode:init (stencil) end
---* The Node to use as a stencil to do the clipping.<br>
---* The stencil node will be retained.<br>
---* This default to nil.<br>
---* return The stencil node.
---@return cc.Node
function ClippingNode:getStencil () end
---* Set the alpha threshold. <br>
---* param alphaThreshold The alpha threshold.
---@param alphaThreshold float
---@return self
function ClippingNode:setAlphaThreshold (alphaThreshold) end
---* Inverted. If this is set to true,<br>
---* the stencil is inverted, so the content is drawn where the stencil is NOT drawn.<br>
---* This default to false.<br>
---* return If the clippingNode is Inverted, it will be return true.
---@return boolean
function ClippingNode:isInverted () end
---@overload fun(cc.Node:cc.Node):self
---@overload fun():self
---@param stencil cc.Node
---@return self
function ClippingNode:create (stencil) end
---*
---@param mask unsigned short
---@param applyChildren boolean
---@return self
function ClippingNode:setCameraMask (mask,applyChildren) end
---*
---@param renderer cc.Renderer
---@param parentTransform mat4_table
---@param parentFlags unsigned_int
---@return self
function ClippingNode:visit (renderer,parentTransform,parentFlags) end
---* Initializes a clipping node without a stencil.
---@return boolean
function ClippingNode:init () end

View File

@ -1,38 +0,0 @@
---@meta
---@class cc.ClippingRectangleNode :cc.Node
local ClippingRectangleNode={ }
cc.ClippingRectangleNode=ClippingRectangleNode
---* brief Get whether the clipping is enabled or not.<br>
---* return Whether the clipping is enabled or not. Default is true.
---@return boolean
function ClippingRectangleNode:isClippingEnabled () end
---* brief Enable/Disable the clipping.<br>
---* param enabled Pass true to enable clipping. Pass false to disable clipping.
---@param enabled boolean
---@return self
function ClippingRectangleNode:setClippingEnabled (enabled) end
---* brief Get the clipping rectangle.<br>
---* return The clipping rectangle.
---@return rect_table
function ClippingRectangleNode:getClippingRegion () end
---* brief Set the clipping rectangle.<br>
---* param clippingRegion Specify the clipping rectangle.
---@param clippingRegion rect_table
---@return self
function ClippingRectangleNode:setClippingRegion (clippingRegion) end
---@overload fun():self
---@overload fun(rect_table:rect_table):self
---@param clippingRegion rect_table
---@return self
function ClippingRectangleNode:create (clippingRegion) end
---*
---@param renderer cc.Renderer
---@param parentTransform mat4_table
---@param parentFlags unsigned_int
---@return self
function ClippingRectangleNode:visit (renderer,parentTransform,parentFlags) end

View File

@ -1,46 +0,0 @@
---@meta
---@class cc.Component :cc.Ref
local Component={ }
cc.Component=Component
---*
---@param enabled boolean
---@return self
function Component:setEnabled (enabled) end
---*
---@return self
function Component:onRemove () end
---*
---@param name string
---@return self
function Component:setName (name) end
---*
---@return boolean
function Component:isEnabled () end
---*
---@param delta float
---@return self
function Component:update (delta) end
---*
---@return cc.Node
function Component:getOwner () end
---*
---@return boolean
function Component:init () end
---*
---@param owner cc.Node
---@return self
function Component:setOwner (owner) end
---*
---@return string
function Component:getName () end
---*
---@return self
function Component:onAdd () end
---*
---@return self
function Component:create () end

View File

@ -1,24 +0,0 @@
---@meta
---@class cc.ComponentLua :cc.Component
local ComponentLua={ }
cc.ComponentLua=ComponentLua
---* This function is used to be invoked from lua side to get the corresponding script object of this component.
---@return void
function ComponentLua:getScriptObject () end
---*
---@param dt float
---@return self
function ComponentLua:update (dt) end
---*
---@param scriptFileName string
---@return self
function ComponentLua:create (scriptFileName) end
---*
---@param scriptFileName string
---@return self
function ComponentLua:ComponentLua (scriptFileName) end

View File

@ -1,40 +0,0 @@
---@meta
---@class cc.Console :cc.Ref
local Console={ }
cc.Console=Console
---* starts listening to specified TCP port
---@param port int
---@return boolean
function Console:listenOnTCP (port) end
---* log something in the console
---@param buf char
---@return self
function Console:log (buf) end
---* delete custom command
---@param cmdName string
---@return self
function Console:delCommand (cmdName) end
---* stops the Console. 'stop' will be called at destruction time as well
---@return self
function Console:stop () end
---* starts listening to specified file descriptor
---@param fd int
---@return boolean
function Console:listenOnFileDescriptor (fd) end
---*
---@param var char
---@return self
function Console:setCommandSeparator (var) end
---* set bind address<br>
---* address : 127.0.0.1
---@param address string
---@return self
function Console:setBindAddress (address) end
---* Checks whether the server for console is bound with ipv6 address
---@return boolean
function Console:isIpv6Server () end

View File

@ -1,94 +0,0 @@
---@meta
---@class cc.Control :cc.Layer
local Control={ }
cc.Control=Control
---* Tells whether the control is enabled.
---@param bEnabled boolean
---@return self
function Control:setEnabled (bEnabled) end
---*
---@return int
function Control:getState () end
---* Sends action messages for the given control events.<br>
---* param controlEvents A bitmask whose set flags specify the control events for<br>
---* which action messages are sent. See "CCControlEvent" for bitmask constants.
---@param controlEvents int
---@return self
function Control:sendActionsForControlEvents (controlEvents) end
---* A Boolean value that determines the control selected state.
---@param bSelected boolean
---@return self
function Control:setSelected (bSelected) end
---*
---@return boolean
function Control:isEnabled () end
---* Updates the control layout using its current internal state.
---@return self
function Control:needsLayout () end
---*
---@return boolean
function Control:hasVisibleParents () end
---*
---@return boolean
function Control:isSelected () end
---* Returns a boolean value that indicates whether a touch is inside the bounds<br>
---* of the receiver. The given touch must be relative to the world.<br>
---* param touch A Touch object that represents a touch.<br>
---* return Whether a touch is inside the receiver's rect.
---@param touch cc.Touch
---@return boolean
function Control:isTouchInside (touch) end
---* A Boolean value that determines whether the control is highlighted.
---@param bHighlighted boolean
---@return self
function Control:setHighlighted (bHighlighted) end
---* Returns a point corresponding to the touch location converted into the<br>
---* control space coordinates.<br>
---* param touch A Touch object that represents a touch.
---@param touch cc.Touch
---@return vec2_table
function Control:getTouchLocation (touch) end
---*
---@return boolean
function Control:isHighlighted () end
---* Creates a Control object
---@return self
function Control:create () end
---*
---@param touch cc.Touch
---@param event cc.Event
---@return self
function Control:onTouchMoved (touch,event) end
---*
---@return boolean
function Control:isOpacityModifyRGB () end
---*
---@param bOpacityModifyRGB boolean
---@return self
function Control:setOpacityModifyRGB (bOpacityModifyRGB) end
---*
---@param touch cc.Touch
---@param event cc.Event
---@return self
function Control:onTouchCancelled (touch,event) end
---*
---@return boolean
function Control:init () end
---*
---@param touch cc.Touch
---@param event cc.Event
---@return self
function Control:onTouchEnded (touch,event) end
---*
---@param touch cc.Touch
---@param event cc.Event
---@return boolean
function Control:onTouchBegan (touch,event) end
---* js ctor
---@return self
function Control:Control () end

View File

@ -1,263 +0,0 @@
---@meta
---@class cc.ControlButton :cc.Control
local ControlButton={ }
cc.ControlButton=ControlButton
---*
---@return boolean
function ControlButton:isPushed () end
---* Sets the title label to use for the specified state.<br>
---* If a property is not specified for a state, the default is to use<br>
---* the ButtonStateNormal value.<br>
---* param label The title label to use for the specified state.<br>
---* param state The state that uses the specified title. The values are described<br>
---* in "CCControlState".
---@param label cc.Node
---@param state int
---@return self
function ControlButton:setTitleLabelForState (label,state) end
---*
---@param adjustBackgroundImage boolean
---@return self
function ControlButton:setAdjustBackgroundImage (adjustBackgroundImage) end
---* Sets the title string to use for the specified state.<br>
---* If a property is not specified for a state, the default is to use<br>
---* the ButtonStateNormal value.<br>
---* param title The title string to use for the specified state.<br>
---* param state The state that uses the specified title. The values are described<br>
---* in "CCControlState".
---@param title string
---@param state int
---@return self
function ControlButton:setTitleForState (title,state) end
---*
---@param var vec2_table
---@return self
function ControlButton:setLabelAnchorPoint (var) end
---*
---@return vec2_table
function ControlButton:getLabelAnchorPoint () end
---*
---@param sprite ccui.Scale9Sprite
---@return boolean
function ControlButton:initWithBackgroundSprite (sprite) end
---*
---@param state int
---@return float
function ControlButton:getTitleTTFSizeForState (state) end
---*
---@param fntFile string
---@param state int
---@return self
function ControlButton:setTitleTTFForState (fntFile,state) end
---*
---@param size float
---@param state int
---@return self
function ControlButton:setTitleTTFSizeForState (size,state) end
---*
---@param var cc.Node
---@return self
function ControlButton:setTitleLabel (var) end
---*
---@param var size_table
---@return self
function ControlButton:setPreferredSize (var) end
---*
---@return color3b_table
function ControlButton:getCurrentTitleColor () end
---*
---@param var boolean
---@return self
function ControlButton:setZoomOnTouchDown (var) end
---*
---@param var ccui.Scale9Sprite
---@return self
function ControlButton:setBackgroundSprite (var) end
---* Returns the background sprite used for a state.<br>
---* param state The state that uses the background sprite. Possible values are<br>
---* described in "CCControlState".
---@param state int
---@return ccui.Scale9Sprite
function ControlButton:getBackgroundSpriteForState (state) end
---*
---@return int
function ControlButton:getHorizontalOrigin () end
---*
---@param title string
---@param fontName string
---@param fontSize float
---@return boolean
function ControlButton:initWithTitleAndFontNameAndFontSize (title,fontName,fontSize) end
---* Sets the font of the label, changes the label to a BMFont if necessary.<br>
---* param fntFile The name of the font to change to<br>
---* param state The state that uses the specified fntFile. The values are described<br>
---* in "CCControlState".
---@param fntFile string
---@param state int
---@return self
function ControlButton:setTitleBMFontForState (fntFile,state) end
---*
---@return float
function ControlButton:getScaleRatio () end
---*
---@param state int
---@return string
function ControlButton:getTitleTTFForState (state) end
---*
---@return ccui.Scale9Sprite
function ControlButton:getBackgroundSprite () end
---* Returns the title color used for a state.<br>
---* param state The state that uses the specified color. The values are described<br>
---* in "CCControlState".<br>
---* return The color of the title for the specified state.
---@param state int
---@return color3b_table
function ControlButton:getTitleColorForState (state) end
---* Sets the color of the title to use for the specified state.<br>
---* param color The color of the title to use for the specified state.<br>
---* param state The state that uses the specified color. The values are described<br>
---* in "CCControlState".
---@param color color3b_table
---@param state int
---@return self
function ControlButton:setTitleColorForState (color,state) end
---* Adjust the background image. YES by default. If the property is set to NO, the<br>
---* background will use the preferred size of the background image.
---@return boolean
function ControlButton:doesAdjustBackgroundImage () end
---* Sets the background spriteFrame to use for the specified button state.<br>
---* param spriteFrame The background spriteFrame to use for the specified state.<br>
---* param state The state that uses the specified image. The values are described<br>
---* in "CCControlState".
---@param spriteFrame cc.SpriteFrame
---@param state int
---@return self
function ControlButton:setBackgroundSpriteFrameForState (spriteFrame,state) end
---* Sets the background sprite to use for the specified button state.<br>
---* param sprite The background sprite to use for the specified state.<br>
---* param state The state that uses the specified image. The values are described<br>
---* in "CCControlState".
---@param sprite ccui.Scale9Sprite
---@param state int
---@return self
function ControlButton:setBackgroundSpriteForState (sprite,state) end
---*
---@param var float
---@return self
function ControlButton:setScaleRatio (var) end
---*
---@param state int
---@return string
function ControlButton:getTitleBMFontForState (state) end
---*
---@return cc.Node
function ControlButton:getTitleLabel () end
---*
---@return size_table
function ControlButton:getPreferredSize () end
---*
---@return int
function ControlButton:getVerticalMargin () end
---* Returns the title label used for a state.<br>
---* param state The state that uses the title label. Possible values are described<br>
---* in "CCControlState".
---@param state int
---@return cc.Node
function ControlButton:getTitleLabelForState (state) end
---*
---@param marginH int
---@param marginV int
---@return self
function ControlButton:setMargins (marginH,marginV) end
---@overload fun():self
---@overload fun():self
---@return string
function ControlButton:getCurrentTitle () end
---*
---@param label cc.Node
---@param backgroundSprite ccui.Scale9Sprite
---@param adjustBackGroundSize boolean
---@return boolean
function ControlButton:initWithLabelAndBackgroundSprite (label,backgroundSprite,adjustBackGroundSize) end
---*
---@return boolean
function ControlButton:getZoomOnTouchDown () end
---* Returns the title used for a state.<br>
---* param state The state that uses the title. Possible values are described in<br>
---* "CCControlState".<br>
---* return The title for the specified state.
---@param state int
---@return string
function ControlButton:getTitleForState (state) end
---@overload fun(cc.Node0:ccui.Scale9Sprite):self
---@overload fun():self
---@overload fun(cc.Node:cc.Node,ccui.Scale9Sprite:ccui.Scale9Sprite):self
---@overload fun(cc.Node0:string,ccui.Scale9Sprite1:string,boolean2:float):self
---@overload fun(cc.Node:cc.Node,ccui.Scale9Sprite:ccui.Scale9Sprite,boolean:boolean):self
---@param label cc.Node
---@param backgroundSprite ccui.Scale9Sprite
---@param adjustBackGroundSize boolean
---@return self
function ControlButton:create (label,backgroundSprite,adjustBackGroundSize) end
---*
---@param enabled boolean
---@return self
function ControlButton:setEnabled (enabled) end
---*
---@param touch cc.Touch
---@param event cc.Event
---@return self
function ControlButton:onTouchEnded (touch,event) end
---*
---@param e color3b_tabl
---@return self
function ControlButton:setColor (e) end
---*
---@param touch cc.Touch
---@param event cc.Event
---@return self
function ControlButton:onTouchMoved (touch,event) end
---*
---@param enabled boolean
---@return self
function ControlButton:setSelected (enabled) end
---*
---@param touch cc.Touch
---@param event cc.Event
---@return self
function ControlButton:onTouchCancelled (touch,event) end
---*
---@return self
function ControlButton:needsLayout () end
---*
---@param touch cc.Touch
---@param event cc.Event
---@return boolean
function ControlButton:onTouchBegan (touch,event) end
---*
---@param parentOpacity unsigned_char
---@return self
function ControlButton:updateDisplayedOpacity (parentOpacity) end
---*
---@return boolean
function ControlButton:init () end
---*
---@param enabled boolean
---@return self
function ControlButton:setHighlighted (enabled) end
---*
---@param parentColor color3b_table
---@return self
function ControlButton:updateDisplayedColor (parentColor) end
---*
---@param var unsigned_char
---@return self
function ControlButton:setOpacity (var) end
---* js ctor
---@return self
function ControlButton:ControlButton () end

View File

@ -1,58 +0,0 @@
---@meta
---@class cc.ControlColourPicker :cc.Control
local ControlColourPicker={ }
cc.ControlColourPicker=ControlColourPicker
---*
---@param sender cc.Ref
---@param controlEvent int
---@return self
function ControlColourPicker:hueSliderValueChanged (sender,controlEvent) end
---*
---@return cc.ControlHuePicker
function ControlColourPicker:getHuePicker () end
---*
---@return cc.ControlSaturationBrightnessPicker
function ControlColourPicker:getcolourPicker () end
---*
---@param var cc.Sprite
---@return self
function ControlColourPicker:setBackground (var) end
---*
---@param var cc.ControlSaturationBrightnessPicker
---@return self
function ControlColourPicker:setcolourPicker (var) end
---*
---@param sender cc.Ref
---@param controlEvent int
---@return self
function ControlColourPicker:colourSliderValueChanged (sender,controlEvent) end
---*
---@param var cc.ControlHuePicker
---@return self
function ControlColourPicker:setHuePicker (var) end
---*
---@return cc.Sprite
function ControlColourPicker:getBackground () end
---*
---@return self
function ControlColourPicker:create () end
---*
---@param bEnabled boolean
---@return self
function ControlColourPicker:setEnabled (bEnabled) end
---*
---@return boolean
function ControlColourPicker:init () end
---*
---@param colorValue color3b_table
---@return self
function ControlColourPicker:setColor (colorValue) end
---* js ctor<br>
---* lua new
---@return self
function ControlColourPicker:ControlColourPicker () end

View File

@ -1,67 +0,0 @@
---@meta
---@class cc.ControlHuePicker :cc.Control
local ControlHuePicker={ }
cc.ControlHuePicker=ControlHuePicker
---*
---@param target cc.Node
---@param pos vec2_table
---@return boolean
function ControlHuePicker:initWithTargetAndPos (target,pos) end
---*
---@param val float
---@return self
function ControlHuePicker:setHue (val) end
---*
---@return vec2_table
function ControlHuePicker:getStartPos () end
---*
---@return float
function ControlHuePicker:getHue () end
---*
---@return cc.Sprite
function ControlHuePicker:getSlider () end
---*
---@param var cc.Sprite
---@return self
function ControlHuePicker:setBackground (var) end
---*
---@param val float
---@return self
function ControlHuePicker:setHuePercentage (val) end
---*
---@return cc.Sprite
function ControlHuePicker:getBackground () end
---*
---@return float
function ControlHuePicker:getHuePercentage () end
---*
---@param var cc.Sprite
---@return self
function ControlHuePicker:setSlider (var) end
---*
---@param target cc.Node
---@param pos vec2_table
---@return self
function ControlHuePicker:create (target,pos) end
---*
---@param enabled boolean
---@return self
function ControlHuePicker:setEnabled (enabled) end
---*
---@param pTouch cc.Touch
---@param pEvent cc.Event
---@return self
function ControlHuePicker:onTouchMoved (pTouch,pEvent) end
---*
---@param touch cc.Touch
---@param pEvent cc.Event
---@return boolean
function ControlHuePicker:onTouchBegan (touch,pEvent) end
---* js ctor
---@return self
function ControlHuePicker:ControlHuePicker () end

View File

@ -1,116 +0,0 @@
---@meta
---@class cc.ControlPotentiometer :cc.Control
local ControlPotentiometer={ }
cc.ControlPotentiometer=ControlPotentiometer
---*
---@param var vec2_table
---@return self
function ControlPotentiometer:setPreviousLocation (var) end
---*
---@param value float
---@return self
function ControlPotentiometer:setValue (value) end
---*
---@return cc.ProgressTimer
function ControlPotentiometer:getProgressTimer () end
---*
---@return float
function ControlPotentiometer:getMaximumValue () end
---* Returns the angle in degree between line1 and line2.
---@param beginLineA vec2_table
---@param endLineA vec2_table
---@param beginLineB vec2_table
---@param endLineB vec2_table
---@return float
function ControlPotentiometer:angleInDegreesBetweenLineFromPoint_toPoint_toLineFromPoint_toPoint (beginLineA,endLineA,beginLineB,endLineB) end
---* Factorize the event dispatch into these methods.
---@param location vec2_table
---@return self
function ControlPotentiometer:potentiometerBegan (location) end
---*
---@param maximumValue float
---@return self
function ControlPotentiometer:setMaximumValue (maximumValue) end
---*
---@return float
function ControlPotentiometer:getMinimumValue () end
---*
---@param var cc.Sprite
---@return self
function ControlPotentiometer:setThumbSprite (var) end
---*
---@return float
function ControlPotentiometer:getValue () end
---* Returns the distance between the point1 and point2.
---@param point1 vec2_table
---@param point2 vec2_table
---@return float
function ControlPotentiometer:distanceBetweenPointAndPoint (point1,point2) end
---*
---@param location vec2_table
---@return self
function ControlPotentiometer:potentiometerEnded (location) end
---*
---@return vec2_table
function ControlPotentiometer:getPreviousLocation () end
---*
---@param var cc.ProgressTimer
---@return self
function ControlPotentiometer:setProgressTimer (var) end
---*
---@param minimumValue float
---@return self
function ControlPotentiometer:setMinimumValue (minimumValue) end
---*
---@return cc.Sprite
function ControlPotentiometer:getThumbSprite () end
---* Initializes a potentiometer with a track sprite and a progress bar.<br>
---* param trackSprite Sprite, that is used as a background.<br>
---* param progressTimer ProgressTimer, that is used as a progress bar.
---@param trackSprite cc.Sprite
---@param progressTimer cc.ProgressTimer
---@param thumbSprite cc.Sprite
---@return boolean
function ControlPotentiometer:initWithTrackSprite_ProgressTimer_ThumbSprite (trackSprite,progressTimer,thumbSprite) end
---*
---@param location vec2_table
---@return self
function ControlPotentiometer:potentiometerMoved (location) end
---* Creates potentiometer with a track filename and a progress filename.
---@param backgroundFile char
---@param progressFile char
---@param thumbFile char
---@return self
function ControlPotentiometer:create (backgroundFile,progressFile,thumbFile) end
---*
---@param touch cc.Touch
---@return boolean
function ControlPotentiometer:isTouchInside (touch) end
---*
---@param enabled boolean
---@return self
function ControlPotentiometer:setEnabled (enabled) end
---*
---@param pTouch cc.Touch
---@param pEvent cc.Event
---@return self
function ControlPotentiometer:onTouchMoved (pTouch,pEvent) end
---*
---@param pTouch cc.Touch
---@param pEvent cc.Event
---@return self
function ControlPotentiometer:onTouchEnded (pTouch,pEvent) end
---*
---@param pTouch cc.Touch
---@param pEvent cc.Event
---@return boolean
function ControlPotentiometer:onTouchBegan (pTouch,pEvent) end
---* js ctor<br>
---* lua new
---@return self
function ControlPotentiometer:ControlPotentiometer () end

View File

@ -1,47 +0,0 @@
---@meta
---@class cc.ControlSaturationBrightnessPicker :cc.Control
local ControlSaturationBrightnessPicker={ }
cc.ControlSaturationBrightnessPicker=ControlSaturationBrightnessPicker
---*
---@return cc.Sprite
function ControlSaturationBrightnessPicker:getShadow () end
---*
---@param target cc.Node
---@param pos vec2_table
---@return boolean
function ControlSaturationBrightnessPicker:initWithTargetAndPos (target,pos) end
---*
---@return vec2_table
function ControlSaturationBrightnessPicker:getStartPos () end
---*
---@return cc.Sprite
function ControlSaturationBrightnessPicker:getOverlay () end
---*
---@return cc.Sprite
function ControlSaturationBrightnessPicker:getSlider () end
---*
---@return cc.Sprite
function ControlSaturationBrightnessPicker:getBackground () end
---*
---@return float
function ControlSaturationBrightnessPicker:getSaturation () end
---*
---@return float
function ControlSaturationBrightnessPicker:getBrightness () end
---*
---@param target cc.Node
---@param pos vec2_table
---@return self
function ControlSaturationBrightnessPicker:create (target,pos) end
---*
---@param enabled boolean
---@return self
function ControlSaturationBrightnessPicker:setEnabled (enabled) end
---* js ctor
---@return self
function ControlSaturationBrightnessPicker:ControlSaturationBrightnessPicker () end

View File

@ -1,109 +0,0 @@
---@meta
---@class cc.ControlSlider :cc.Control
local ControlSlider={ }
cc.ControlSlider=ControlSlider
---*
---@return float
function ControlSlider:getMaximumAllowedValue () end
---@overload fun(cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite):self
---@overload fun(cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite):self
---@param backgroundSprite cc.Sprite
---@param progressSprite cc.Sprite
---@param thumbSprite cc.Sprite
---@param selectedThumbSprite cc.Sprite
---@return boolean
function ControlSlider:initWithSprites (backgroundSprite,progressSprite,thumbSprite,selectedThumbSprite) end
---*
---@return float
function ControlSlider:getMinimumAllowedValue () end
---*
---@return float
function ControlSlider:getMaximumValue () end
---*
---@return cc.Sprite
function ControlSlider:getSelectedThumbSprite () end
---*
---@param var cc.Sprite
---@return self
function ControlSlider:setProgressSprite (var) end
---*
---@param val float
---@return self
function ControlSlider:setMaximumValue (val) end
---*
---@return float
function ControlSlider:getMinimumValue () end
---*
---@param var cc.Sprite
---@return self
function ControlSlider:setThumbSprite (var) end
---*
---@return float
function ControlSlider:getValue () end
---*
---@return cc.Sprite
function ControlSlider:getBackgroundSprite () end
---*
---@return cc.Sprite
function ControlSlider:getThumbSprite () end
---*
---@param val float
---@return self
function ControlSlider:setValue (val) end
---*
---@param touch cc.Touch
---@return vec2_table
function ControlSlider:locationFromTouch (touch) end
---*
---@param val float
---@return self
function ControlSlider:setMinimumValue (val) end
---*
---@param var float
---@return self
function ControlSlider:setMinimumAllowedValue (var) end
---*
---@return cc.Sprite
function ControlSlider:getProgressSprite () end
---*
---@param var cc.Sprite
---@return self
function ControlSlider:setSelectedThumbSprite (var) end
---*
---@param var cc.Sprite
---@return self
function ControlSlider:setBackgroundSprite (var) end
---*
---@param var float
---@return self
function ControlSlider:setMaximumAllowedValue (var) end
---@overload fun(cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite):self
---@overload fun(cc.Sprite0:char,cc.Sprite1:char,cc.Sprite2:char):self
---@overload fun(cc.Sprite0:char,cc.Sprite1:char,cc.Sprite2:char,cc.Sprite3:char):self
---@overload fun(cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite):self
---@param backgroundSprite cc.Sprite
---@param pogressSprite cc.Sprite
---@param thumbSprite cc.Sprite
---@param selectedThumbSprite cc.Sprite
---@return self
function ControlSlider:create (backgroundSprite,pogressSprite,thumbSprite,selectedThumbSprite) end
---*
---@param touch cc.Touch
---@return boolean
function ControlSlider:isTouchInside (touch) end
---*
---@param enabled boolean
---@return self
function ControlSlider:setEnabled (enabled) end
---*
---@return self
function ControlSlider:needsLayout () end
---* js ctor<br>
---* lua new
---@return self
function ControlSlider:ControlSlider () end

View File

@ -1,111 +0,0 @@
---@meta
---@class cc.ControlStepper :cc.Control
local ControlStepper={ }
cc.ControlStepper=ControlStepper
---*
---@return cc.Sprite
function ControlStepper:getMinusSprite () end
---*
---@param value double
---@return self
function ControlStepper:setValue (value) end
---*
---@param stepValue double
---@return self
function ControlStepper:setStepValue (stepValue) end
---*
---@param minusSprite cc.Sprite
---@param plusSprite cc.Sprite
---@return boolean
function ControlStepper:initWithMinusSpriteAndPlusSprite (minusSprite,plusSprite) end
---* Set the numeric value of the stepper. If send is true, the Control::EventType::VALUE_CHANGED is sent.
---@param value double
---@param send boolean
---@return self
function ControlStepper:setValueWithSendingEvent (value,send) end
---*
---@param maximumValue double
---@return self
function ControlStepper:setMaximumValue (maximumValue) end
---*
---@return cc.Label
function ControlStepper:getMinusLabel () end
---*
---@return cc.Label
function ControlStepper:getPlusLabel () end
---*
---@param wraps boolean
---@return self
function ControlStepper:setWraps (wraps) end
---*
---@param var cc.Label
---@return self
function ControlStepper:setMinusLabel (var) end
---* Start the autorepeat increment/decrement.
---@return self
function ControlStepper:startAutorepeat () end
---* Update the layout of the stepper with the given touch location.
---@param location vec2_table
---@return self
function ControlStepper:updateLayoutUsingTouchLocation (location) end
---*
---@return boolean
function ControlStepper:isContinuous () end
---* Stop the autorepeat.
---@return self
function ControlStepper:stopAutorepeat () end
---*
---@param minimumValue double
---@return self
function ControlStepper:setMinimumValue (minimumValue) end
---*
---@param var cc.Label
---@return self
function ControlStepper:setPlusLabel (var) end
---*
---@return double
function ControlStepper:getValue () end
---*
---@return cc.Sprite
function ControlStepper:getPlusSprite () end
---*
---@param var cc.Sprite
---@return self
function ControlStepper:setPlusSprite (var) end
---*
---@param var cc.Sprite
---@return self
function ControlStepper:setMinusSprite (var) end
---*
---@param minusSprite cc.Sprite
---@param plusSprite cc.Sprite
---@return self
function ControlStepper:create (minusSprite,plusSprite) end
---*
---@param pTouch cc.Touch
---@param pEvent cc.Event
---@return self
function ControlStepper:onTouchMoved (pTouch,pEvent) end
---*
---@param pTouch cc.Touch
---@param pEvent cc.Event
---@return self
function ControlStepper:onTouchEnded (pTouch,pEvent) end
---*
---@param dt float
---@return self
function ControlStepper:update (dt) end
---*
---@param pTouch cc.Touch
---@param pEvent cc.Event
---@return boolean
function ControlStepper:onTouchBegan (pTouch,pEvent) end
---* js ctor<br>
---* lua new
---@return self
function ControlStepper:ControlStepper () end

View File

@ -1,73 +0,0 @@
---@meta
---@class cc.ControlSwitch :cc.Control
local ControlSwitch={ }
cc.ControlSwitch=ControlSwitch
---@overload fun(boolean:boolean):self
---@overload fun(boolean:boolean,boolean:boolean):self
---@param isOn boolean
---@param animated boolean
---@return self
function ControlSwitch:setOn (isOn,animated) end
---*
---@param touch cc.Touch
---@return vec2_table
function ControlSwitch:locationFromTouch (touch) end
---*
---@return boolean
function ControlSwitch:isOn () end
---@overload fun(cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Label:cc.Label,cc.Label:cc.Label):self
---@overload fun(cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite):self
---@param maskSprite cc.Sprite
---@param onSprite cc.Sprite
---@param offSprite cc.Sprite
---@param thumbSprite cc.Sprite
---@param onLabel cc.Label
---@param offLabel cc.Label
---@return boolean
function ControlSwitch:initWithMaskSprite (maskSprite,onSprite,offSprite,thumbSprite,onLabel,offLabel) end
---*
---@return boolean
function ControlSwitch:hasMoved () end
---@overload fun(cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite):self
---@overload fun(cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Label:cc.Label,cc.Label:cc.Label):self
---@param maskSprite cc.Sprite
---@param onSprite cc.Sprite
---@param offSprite cc.Sprite
---@param thumbSprite cc.Sprite
---@param onLabel cc.Label
---@param offLabel cc.Label
---@return self
function ControlSwitch:create (maskSprite,onSprite,offSprite,thumbSprite,onLabel,offLabel) end
---*
---@param enabled boolean
---@return self
function ControlSwitch:setEnabled (enabled) end
---*
---@param pTouch cc.Touch
---@param pEvent cc.Event
---@return self
function ControlSwitch:onTouchMoved (pTouch,pEvent) end
---*
---@param pTouch cc.Touch
---@param pEvent cc.Event
---@return self
function ControlSwitch:onTouchEnded (pTouch,pEvent) end
---*
---@param pTouch cc.Touch
---@param pEvent cc.Event
---@return self
function ControlSwitch:onTouchCancelled (pTouch,pEvent) end
---*
---@param pTouch cc.Touch
---@param pEvent cc.Event
---@return boolean
function ControlSwitch:onTouchBegan (pTouch,pEvent) end
---* js ctor<br>
---* lua new
---@return self
function ControlSwitch:ControlSwitch () end

View File

@ -1,56 +0,0 @@
---@meta
---@class cc.Controller
local Controller={ }
cc.Controller=Controller
---* Activate receives key event from external key. e.g. back,menu.<br>
---* Controller receives only standard key which contained within enum Key by default.<br>
---* warning The API only work on the android platform for support diversified game controller.<br>
---* param externalKeyCode External key code.<br>
---* param receive True if external key event on this controller should be receive, false otherwise.
---@param externalKeyCode int
---@param receive boolean
---@return self
function Controller:receiveExternalKeyEvent (externalKeyCode,receive) end
---* Gets the name of this Controller object.
---@return string
function Controller:getDeviceName () end
---* Indicates whether the Controller is connected.
---@return boolean
function Controller:isConnected () end
---* Gets the Controller id.
---@return int
function Controller:getDeviceId () end
---* Changes the tag that is used to identify the controller easily.<br>
---* param tag A integer that identifies the controller.
---@param tag int
---@return self
function Controller:setTag (tag) end
---* Returns a tag that is used to identify the controller easily.<br>
---* return An integer that identifies the controller.
---@return int
function Controller:getTag () end
---* Start discovering new controllers.<br>
---* warning The API has an empty implementation on Android.
---@return self
function Controller:startDiscoveryController () end
---* Stop the discovery process.<br>
---* warning The API has an empty implementation on Android.
---@return self
function Controller:stopDiscoveryController () end
---* Gets a Controller object with device ID.<br>
---* param deviceId A unique identifier to find the controller.<br>
---* return A Controller object.
---@param deviceId int
---@return self
function Controller:getControllerByDeviceId (deviceId) end
---* Gets a Controller object with tag.<br>
---* param tag An identifier to find the controller.<br>
---* return A Controller object.
---@param tag int
---@return self
function Controller:getControllerByTag (tag) end

View File

@ -1,28 +0,0 @@
---@meta
---@class cc.DelayTime :cc.ActionInterval
local DelayTime={ }
cc.DelayTime=DelayTime
---* Creates the action.<br>
---* param d Duration time, in seconds.<br>
---* return An autoreleased DelayTime object.
---@param d float
---@return self
function DelayTime:create (d) end
---*
---@return self
function DelayTime:clone () end
---* param time In seconds.
---@param time float
---@return self
function DelayTime:update (time) end
---*
---@return self
function DelayTime:reverse () end
---*
---@return self
function DelayTime:DelayTime () end

View File

@ -1,34 +0,0 @@
---@meta
---@class cc.Device
local Device={ }
cc.Device=Device
---* To enable or disable accelerometer.
---@param isEnabled boolean
---@return self
function Device:setAccelerometerEnabled (isEnabled) end
---* Sets the interval of accelerometer.
---@param interval float
---@return self
function Device:setAccelerometerInterval (interval) end
---* Controls whether the screen should remain on.<br>
---* param keepScreenOn One flag indicating that the screen should remain on.
---@param keepScreenOn boolean
---@return self
function Device:setKeepScreenOn (keepScreenOn) end
---* Vibrate for the specified amount of time.<br>
---* If vibrate is not supported, then invoking this method has no effect.<br>
---* Some platforms limit to a maximum duration of 5 seconds.<br>
---* Duration is ignored on iOS due to API limitations.<br>
---* param duration The duration in seconds.
---@param duration float
---@return self
function Device:vibrate (duration) end
---* Gets the DPI of device<br>
---* return The DPI of device.
---@return int
function Device:getDPI () end

View File

@ -1,34 +0,0 @@
---@meta
---@class cc.DirectionLight :cc.BaseLight
local DirectionLight={ }
cc.DirectionLight=DirectionLight
---* Returns the Direction in parent.
---@return vec3_table
function DirectionLight:getDirection () end
---* Returns direction in world.
---@return vec3_table
function DirectionLight:getDirectionInWorld () end
---* Sets the Direction in parent.<br>
---* param dir The Direction in parent.
---@param dir vec3_table
---@return self
function DirectionLight:setDirection (dir) end
---* Creates a direction light.<br>
---* param direction The light's direction<br>
---* param color The light's color.<br>
---* return The new direction light.
---@param direction vec3_table
---@param color color3b_table
---@return self
function DirectionLight:create (direction,color) end
---*
---@return int
function DirectionLight:getLightType () end
---*
---@return self
function DirectionLight:DirectionLight () end

View File

@ -1,309 +0,0 @@
---@meta
---@class cc.Director
local Director={ }
cc.Director=Director
---* Pauses the running scene.<br>
---* The running scene will be _drawed_ but all scheduled timers will be paused.<br>
---* While paused, the draw rate will be 4 FPS to reduce CPU consumption.
---@return self
function Director:pause () end
---* Sets the EventDispatcher associated with this director.<br>
---* since v3.0<br>
---* js NA
---@param dispatcher cc.EventDispatcher
---@return self
function Director:setEventDispatcher (dispatcher) end
---* The size in pixels of the surface. It could be different than the screen size.<br>
---* High-res devices might have a higher surface size than the screen size.<br>
---* Only available when compiled using SDK >= 4.0.<br>
---* since v0.99.4
---@param scaleFactor float
---@return self
function Director:setContentScaleFactor (scaleFactor) end
---*
---@return float
function Director:getDeltaTime () end
---* Gets content scale factor.<br>
---* see Director::setContentScaleFactor()
---@return float
function Director:getContentScaleFactor () end
---* Returns the size of the OpenGL view in pixels.
---@return size_table
function Director:getWinSizeInPixels () end
---* Returns safe area rectangle of the OpenGL view in points.
---@return rect_table
function Director:getSafeAreaRect () end
---* Sets the OpenGL default values.<br>
---* It will enable alpha blending, disable depth test.<br>
---* js NA
---@return self
function Director:setGLDefaultValues () end
---* Sets the ActionManager associated with this director.<br>
---* since v2.0
---@param actionManager cc.ActionManager
---@return self
function Director:setActionManager (actionManager) end
---* Pops out all scenes from the stack until the root scene in the queue.<br>
---* This scene will replace the running one.<br>
---* Internally it will call `popToSceneStackLevel(1)`.
---@return self
function Director:popToRootScene () end
---* Adds a matrix to the top of specified type of matrix stack.<br>
---* param type Matrix type.<br>
---* param mat The matrix that to be added.<br>
---* js NA
---@param type int
---@param mat mat4_table
---@return self
function Director:loadMatrix (type,mat) end
---* This object will be visited after the main scene is visited.<br>
---* This object MUST implement the "visit" function.<br>
---* Useful to hook a notification object, like Notifications (http:github.com/manucorporat/CCNotifications)<br>
---* since v0.99.5
---@return cc.Node
function Director:getNotificationNode () end
---* Returns the size of the OpenGL view in points.
---@return size_table
function Director:getWinSize () end
---*
---@return cc.TextureCache
function Director:getTextureCache () end
---* Whether or not the replaced scene will receive the cleanup message.<br>
---* If the new scene is pushed, then the old scene won't receive the "cleanup" message.<br>
---* If the new scene replaces the old one, the it will receive the "cleanup" message.<br>
---* since v0.99.0
---@return boolean
function Director:isSendCleanupToScene () end
---* Returns visible origin coordinate of the OpenGL view in points.
---@return vec2_table
function Director:getVisibleOrigin () end
---@overload fun(float:float):self
---@overload fun():self
---@param dt float
---@return self
function Director:mainLoop (dt) end
---* Gets Frame Rate.<br>
---* js NA
---@return float
function Director:getFrameRate () end
---* Get seconds per frame.
---@return float
function Director:getSecondsPerFrame () end
---* Clear all types of matrix stack, and add identity matrix to these matrix stacks.<br>
---* js NA
---@return self
function Director:resetMatrixStack () end
---* Converts an OpenGL coordinate to a screen coordinate.<br>
---* Useful to convert node points to window points for calls such as glScissor.
---@param point vec2_table
---@return vec2_table
function Director:convertToUI (point) end
---* Clones a specified type matrix and put it to the top of specified type of matrix stack.<br>
---* js NA
---@param type int
---@return self
function Director:pushMatrix (type) end
---* Sets the default values based on the Configuration info.
---@return self
function Director:setDefaultValues () end
---*
---@return boolean
function Director:init () end
---* Sets the Scheduler associated with this director.<br>
---* since v2.0
---@param scheduler cc.Scheduler
---@return self
function Director:setScheduler (scheduler) end
---* Gets the top matrix of specified type of matrix stack.<br>
---* js NA
---@param type int
---@return mat4_table
function Director:getMatrix (type) end
---* returns whether or not the Director is in a valid state
---@return boolean
function Director:isValid () end
---* The main loop is triggered again.<br>
---* Call this function only if [stopAnimation] was called earlier.<br>
---* warning Don't call this function to start the main loop. To run the main loop call runWithScene.
---@return self
function Director:startAnimation () end
---* Returns the Renderer associated with this director.<br>
---* since v3.0
---@return cc.Renderer
function Director:getRenderer () end
---* Get the GLView.<br>
---* lua NA
---@return cc.GLView
function Director:getOpenGLView () end
---* Gets current running Scene. Director can only run one Scene at a time.
---@return cc.Scene
function Director:getRunningScene () end
---* Sets the glViewport.
---@return self
function Director:setViewport () end
---* Stops the animation. Nothing will be drawn. The main loop won't be triggered anymore.<br>
---* If you don't want to pause your animation call [pause] instead.
---@return self
function Director:stopAnimation () end
---* Pops out all scenes from the stack until it reaches `level`.<br>
---* If level is 0, it will end the director.<br>
---* If level is 1, it will pop all scenes until it reaches to root scene.<br>
---* If level is <= than the current stack level, it won't do anything.
---@param level int
---@return self
function Director:popToSceneStackLevel (level) end
---* Resumes the paused scene.<br>
---* The scheduled timers will be activated again.<br>
---* The "delta time" will be 0 (as if the game wasn't paused).
---@return self
function Director:resume () end
---* Whether or not `_nextDeltaTimeZero` is set to 0.
---@return boolean
function Director:isNextDeltaTimeZero () end
---* Sets clear values for the color buffers,<br>
---* value range of each element is [0.0, 1.0].<br>
---* js NA
---@param clearColor color4f_table
---@return self
function Director:setClearColor (clearColor) end
---* Ends the execution, releases the running scene.<br>
---* lua endToLua
---@return self
function Director:endToLua () end
---* Sets the GLView. <br>
---* lua NA
---@param openGLView cc.GLView
---@return self
function Director:setOpenGLView (openGLView) end
---* Converts a screen coordinate to an OpenGL coordinate.<br>
---* Useful to convert (multi) touch coordinates to the current layout (portrait or landscape).
---@param point vec2_table
---@return vec2_table
function Director:convertToGL (point) end
---* Removes all cocos2d cached data.<br>
---* It will purge the TextureCache, SpriteFrameCache, LabelBMFont cache<br>
---* since v0.99.3
---@return self
function Director:purgeCachedData () end
---* How many frames were called since the director started
---@return unsigned_int
function Director:getTotalFrames () end
---* Enters the Director's main loop with the given Scene.<br>
---* Call it to run only your FIRST scene.<br>
---* Don't call it if there is already a running scene.<br>
---* It will call pushScene: and then it will call startAnimation<br>
---* js NA
---@param scene cc.Scene
---@return self
function Director:runWithScene (scene) end
---* Sets the notification node.<br>
---* see Director::getNotificationNode()
---@param node cc.Node
---@return self
function Director:setNotificationNode (node) end
---* Draw the scene.<br>
---* This method is called every frame. Don't call it manually.
---@return self
function Director:drawScene () end
---*
---@return self
function Director:restart () end
---* Pops out a scene from the stack.<br>
---* This scene will replace the running one.<br>
---* The running scene will be deleted. If there are no more scenes in the stack the execution is terminated.<br>
---* ONLY call it if there is a running scene.
---@return self
function Director:popScene () end
---* Adds an identity matrix to the top of specified type of matrix stack.<br>
---* js NA
---@param type int
---@return self
function Director:loadIdentityMatrix (type) end
---* Whether or not displaying the FPS on the bottom-left corner of the screen.
---@return boolean
function Director:isDisplayStats () end
---* Sets OpenGL projection.
---@param projection int
---@return self
function Director:setProjection (projection) end
---* Returns the Console associated with this director.<br>
---* since v3.0<br>
---* js NA
---@return cc.Console
function Director:getConsole () end
---* Multiplies a matrix to the top of specified type of matrix stack.<br>
---* param type Matrix type.<br>
---* param mat The matrix that to be multiplied.<br>
---* js NA
---@param type int
---@param mat mat4_table
---@return self
function Director:multiplyMatrix (type,mat) end
---* Gets the distance between camera and near clipping frame.<br>
---* It is correct for default camera that near clipping frame is same as the screen.
---@return float
function Director:getZEye () end
---* Sets the delta time between current frame and next frame is 0.<br>
---* This value will be used in Schedule, and will affect all functions that are using frame delta time, such as Actions.<br>
---* This value will take effect only one time.
---@param nextDeltaTimeZero boolean
---@return self
function Director:setNextDeltaTimeZero (nextDeltaTimeZero) end
---* Pops the top matrix of the specified type of matrix stack.<br>
---* js NA
---@param type int
---@return self
function Director:popMatrix (type) end
---* Returns visible size of the OpenGL view in points.<br>
---* The value is equal to `Director::getWinSize()` if don't invoke `GLView::setDesignResolutionSize()`.
---@return size_table
function Director:getVisibleSize () end
---* Gets the Scheduler associated with this director.<br>
---* since v2.0
---@return cc.Scheduler
function Director:getScheduler () end
---* Suspends the execution of the running scene, pushing it on the stack of suspended scenes.<br>
---* The new scene will be executed.<br>
---* Try to avoid big stacks of pushed scenes to reduce memory allocation. <br>
---* ONLY call it if there is a running scene.
---@param scene cc.Scene
---@return self
function Director:pushScene (scene) end
---* Gets the FPS value.
---@return float
function Director:getAnimationInterval () end
---* Whether or not the Director is paused.
---@return boolean
function Director:isPaused () end
---* Display the FPS on the bottom-left corner of the screen.
---@param displayStats boolean
---@return self
function Director:setDisplayStats (displayStats) end
---* Gets the EventDispatcher associated with this director.<br>
---* since v3.0<br>
---* js NA
---@return cc.EventDispatcher
function Director:getEventDispatcher () end
---* Replaces the running scene with a new one. The running scene is terminated.<br>
---* ONLY call it if there is a running scene.<br>
---* js NA
---@param scene cc.Scene
---@return self
function Director:replaceScene (scene) end
---* Sets the FPS value. FPS = 1/interval.
---@param interval float
---@return self
function Director:setAnimationInterval (interval) end
---* Gets the ActionManager associated with this director.<br>
---* since v2.0
---@return cc.ActionManager
function Director:getActionManager () end
---* Returns a shared instance of the director. <br>
---* js _getInstance
---@return self
function Director:getInstance () end

View File

@ -1,185 +0,0 @@
---@meta
---@class cc.DrawNode :cc.Node
local DrawNode={ }
cc.DrawNode=DrawNode
---* Draw an line from origin to destination with color. <br>
---* param origin The line origin.<br>
---* param destination The line destination.<br>
---* param color The line color.<br>
---* js NA
---@param origin vec2_table
---@param destination vec2_table
---@param color color4f_table
---@return self
function DrawNode:drawLine (origin,destination,color) end
---* When isolated is set, the position of the node is no longer affected by parent nodes.<br>
---* Which means it will be drawn just like a root node.
---@param isolated boolean
---@return self
function DrawNode:setIsolated (isolated) end
---@overload fun(vec2_table:vec2_table,vec2_table:vec2_table,vec2_table:vec2_table,vec2_table:vec2_table,color4f_table:color4f_table):self
---@overload fun(vec2_table:vec2_table,vec2_table:vec2_table,vec2_table2:color4f_table):self
---@param p1 vec2_table
---@param p2 vec2_table
---@param p3 vec2_table
---@param p4 vec2_table
---@param color color4f_table
---@return self
function DrawNode:drawRect (p1,p2,p3,p4,color) end
---@overload fun(vec2_table:vec2_table,float:float,float:float,unsigned_int:unsigned_int,float4:color4f_table):self
---@overload fun(vec2_table:vec2_table,float:float,float:float,unsigned_int:unsigned_int,float:float,float:float,color4f_table:color4f_table):self
---@param center vec2_table
---@param radius float
---@param angle float
---@param segments unsigned_int
---@param scaleX float
---@param scaleY float
---@param color color4f_table
---@return self
function DrawNode:drawSolidCircle (center,radius,angle,segments,scaleX,scaleY,color) end
---*
---@param lineWidth float
---@return self
function DrawNode:setLineWidth (lineWidth) end
---* draw a dot at a position, with a given radius and color. <br>
---* param pos The dot center.<br>
---* param radius The dot radius.<br>
---* param color The dot color.
---@param pos vec2_table
---@param radius float
---@param color color4f_table
---@return self
function DrawNode:drawDot (pos,radius,color) end
---* draw a segment with a radius and color. <br>
---* param from The segment origin.<br>
---* param to The segment destination.<br>
---* param radius The segment radius.<br>
---* param color The segment color.
---@param from vec2_table
---@param to vec2_table
---@param radius float
---@param color color4f_table
---@return self
function DrawNode:drawSegment (from,to,radius,color) end
---* Get the color mixed mode.<br>
---* lua NA
---@return cc.BlendFunc
function DrawNode:getBlendFunc () end
---@overload fun(vec2_table:vec2_table,float:float,float:float,unsigned_int:unsigned_int,boolean:boolean,float5:color4f_table):self
---@overload fun(vec2_table:vec2_table,float:float,float:float,unsigned_int:unsigned_int,boolean:boolean,float:float,float:float,color4f_table:color4f_table):self
---@param center vec2_table
---@param radius float
---@param angle float
---@param segments unsigned_int
---@param drawLineToCenter boolean
---@param scaleX float
---@param scaleY float
---@param color color4f_table
---@return self
function DrawNode:drawCircle (center,radius,angle,segments,drawLineToCenter,scaleX,scaleY,color) end
---* Draws a quad bezier path.<br>
---* param origin The origin of the bezier path.<br>
---* param control The control of the bezier path.<br>
---* param destination The destination of the bezier path.<br>
---* param segments The number of segments.<br>
---* param color Set the quad bezier color.
---@param origin vec2_table
---@param control vec2_table
---@param destination vec2_table
---@param segments unsigned_int
---@param color color4f_table
---@return self
function DrawNode:drawQuadBezier (origin,control,destination,segments,color) end
---* draw a triangle with color. <br>
---* param p1 The triangle vertex point.<br>
---* param p2 The triangle vertex point.<br>
---* param p3 The triangle vertex point.<br>
---* param color The triangle color.<br>
---* js NA
---@param p1 vec2_table
---@param p2 vec2_table
---@param p3 vec2_table
---@param color color4f_table
---@return self
function DrawNode:drawTriangle (p1,p2,p3,color) end
---* Set the color mixed mode.<br>
---* code<br>
---* When this function bound into js or lua,the parameter will be changed<br>
---* In js: var setBlendFunc(var src, var dst)<br>
---* endcode<br>
---* lua NA
---@param blendFunc cc.BlendFunc
---@return self
function DrawNode:setBlendFunc (blendFunc) end
---* Clear the geometry in the node's buffer.
---@return self
function DrawNode:clear () end
---* Draws a solid rectangle given the origin and destination point measured in points.<br>
---* The origin and the destination can not have the same x and y coordinate.<br>
---* param origin The rectangle origin.<br>
---* param destination The rectangle destination.<br>
---* param color The rectangle color.<br>
---* js NA
---@param origin vec2_table
---@param destination vec2_table
---@param color color4f_table
---@return self
function DrawNode:drawSolidRect (origin,destination,color) end
---*
---@return float
function DrawNode:getLineWidth () end
---* Draw a point.<br>
---* param point A Vec2 used to point.<br>
---* param pointSize The point size.<br>
---* param color The point color.<br>
---* js NA
---@param point vec2_table
---@param pointSize float
---@param color color4f_table
---@return self
function DrawNode:drawPoint (point,pointSize,color) end
---*
---@return boolean
function DrawNode:isIsolated () end
---* Draw a cubic bezier curve with color and number of segments<br>
---* param origin The origin of the bezier path.<br>
---* param control1 The first control of the bezier path.<br>
---* param control2 The second control of the bezier path.<br>
---* param destination The destination of the bezier path.<br>
---* param segments The number of segments.<br>
---* param color Set the cubic bezier color.
---@param origin vec2_table
---@param control1 vec2_table
---@param control2 vec2_table
---@param destination vec2_table
---@param segments unsigned_int
---@param color color4f_table
---@return self
function DrawNode:drawCubicBezier (origin,control1,control2,destination,segments,color) end
---* creates and initialize a DrawNode node.<br>
---* return Return an autorelease object.
---@return self
function DrawNode:create () end
---*
---@param renderer cc.Renderer
---@param transform mat4_table
---@param flags unsigned_int
---@return self
function DrawNode:draw (renderer,transform,flags) end
---*
---@param renderer cc.Renderer
---@param parentTransform mat4_table
---@param parentFlags unsigned_int
---@return self
function DrawNode:visit (renderer,parentTransform,parentFlags) end
---*
---@return boolean
function DrawNode:init () end
---*
---@return self
function DrawNode:DrawNode () end

View File

@ -1,26 +0,0 @@
---@meta
---@class cc.EaseBackIn :cc.ActionEase
local EaseBackIn={ }
cc.EaseBackIn=EaseBackIn
---*
---@param action cc.ActionInterval
---@return self
function EaseBackIn:create (action) end
---*
---@return self
function EaseBackIn:clone () end
---*
---@param time float
---@return self
function EaseBackIn:update (time) end
---*
---@return cc.ActionEase
function EaseBackIn:reverse () end
---*
---@return self
function EaseBackIn:EaseBackIn () end

View File

@ -1,26 +0,0 @@
---@meta
---@class cc.EaseBackInOut :cc.ActionEase
local EaseBackInOut={ }
cc.EaseBackInOut=EaseBackInOut
---*
---@param action cc.ActionInterval
---@return self
function EaseBackInOut:create (action) end
---*
---@return self
function EaseBackInOut:clone () end
---*
---@param time float
---@return self
function EaseBackInOut:update (time) end
---*
---@return cc.ActionEase
function EaseBackInOut:reverse () end
---*
---@return self
function EaseBackInOut:EaseBackInOut () end

View File

@ -1,26 +0,0 @@
---@meta
---@class cc.EaseBackOut :cc.ActionEase
local EaseBackOut={ }
cc.EaseBackOut=EaseBackOut
---*
---@param action cc.ActionInterval
---@return self
function EaseBackOut:create (action) end
---*
---@return self
function EaseBackOut:clone () end
---*
---@param time float
---@return self
function EaseBackOut:update (time) end
---*
---@return cc.ActionEase
function EaseBackOut:reverse () end
---*
---@return self
function EaseBackOut:EaseBackOut () end

View File

@ -1,35 +0,0 @@
---@meta
---@class cc.EaseBezierAction :cc.ActionEase
local EaseBezierAction={ }
cc.EaseBezierAction=EaseBezierAction
---* brief Set the bezier parameters.
---@param p0 float
---@param p1 float
---@param p2 float
---@param p3 float
---@return self
function EaseBezierAction:setBezierParamer (p0,p1,p2,p3) end
---* brief Create the action with the inner action.<br>
---* param action The pointer of the inner action.<br>
---* return A pointer of EaseBezierAction action. If creation failed, return nil.
---@param action cc.ActionInterval
---@return self
function EaseBezierAction:create (action) end
---*
---@return self
function EaseBezierAction:clone () end
---*
---@param time float
---@return self
function EaseBezierAction:update (time) end
---*
---@return self
function EaseBezierAction:reverse () end
---*
---@return self
function EaseBezierAction:EaseBezierAction () end

View File

@ -1,8 +0,0 @@
---@meta
---@class cc.EaseBounce :cc.ActionEase
local EaseBounce={ }
cc.EaseBounce=EaseBounce

View File

@ -1,26 +0,0 @@
---@meta
---@class cc.EaseBounceIn :cc.ActionEase
local EaseBounceIn={ }
cc.EaseBounceIn=EaseBounceIn
---*
---@param action cc.ActionInterval
---@return self
function EaseBounceIn:create (action) end
---*
---@return self
function EaseBounceIn:clone () end
---*
---@param time float
---@return self
function EaseBounceIn:update (time) end
---*
---@return cc.ActionEase
function EaseBounceIn:reverse () end
---*
---@return self
function EaseBounceIn:EaseBounceIn () end

View File

@ -1,26 +0,0 @@
---@meta
---@class cc.EaseBounceInOut :cc.ActionEase
local EaseBounceInOut={ }
cc.EaseBounceInOut=EaseBounceInOut
---*
---@param action cc.ActionInterval
---@return self
function EaseBounceInOut:create (action) end
---*
---@return self
function EaseBounceInOut:clone () end
---*
---@param time float
---@return self
function EaseBounceInOut:update (time) end
---*
---@return cc.ActionEase
function EaseBounceInOut:reverse () end
---*
---@return self
function EaseBounceInOut:EaseBounceInOut () end

Some files were not shown because too many files have changed in this diff Show More