diff --git a/.building/lua-language-server-3.6.18-win32-x64/locale/en-us/meta.lua b/.building/lua-language-server-3.6.18-win32-x64/locale/en-us/meta.lua deleted file mode 100644 index 9ab6aab88..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/locale/en-us/meta.lua +++ /dev/null @@ -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 key–value 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 key–value 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, 1–7, Sunday is 1' -osdate.yday = -'day of the year, 1–366' -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.' diff --git a/.building/lua-language-server-3.6.18-win32-x64/locale/en-us/script.lua b/.building/lua-language-server-3.6.18-win32-x64/locale/en-us/script.lua deleted file mode 100644 index 4b74fa518..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/locale/en-us/script.lua +++ /dev/null @@ -1,1256 +0,0 @@ -DIAG_LINE_ONLY_SPACE = -'Line with spaces only.' -DIAG_LINE_POST_SPACE = -'Line with postspace.' -DIAG_UNUSED_LOCAL = -'Unused local `{}`.' -DIAG_UNDEF_GLOBAL = -'Undefined global `{}`.' -DIAG_UNDEF_FIELD = -'Undefined field `{}`.' -DIAG_UNDEF_ENV_CHILD = -'Undefined variable `{}` (overloaded `_ENV` ).' -DIAG_UNDEF_FENV_CHILD = -'Undefined variable `{}` (inside module).' -DIAG_GLOBAL_IN_NIL_ENV = -'Invalid global (`_ENV` is `nil`).' -DIAG_GLOBAL_IN_NIL_FENV = -'Invalid global (module environment is `nil`).' -DIAG_UNUSED_LABEL = -'Unused label `{}`.' -DIAG_UNUSED_FUNCTION = -'Unused functions.' -DIAG_UNUSED_VARARG = -'Unused vararg.' -DIAG_REDEFINED_LOCAL = -'Redefined local `{}`.' -DIAG_DUPLICATE_INDEX = -'Duplicate index `{}`.' -DIAG_DUPLICATE_METHOD = -'Duplicate method `{}`.' -DIAG_PREVIOUS_CALL = -'Will be interpreted as `{}{}`. It may be necessary to add a `,`.' -DIAG_PREFIELD_CALL = -'Will be interpreted as `{}{}`. It may be necessary to add a `,` or `;`.' -DIAG_OVER_MAX_ARGS = -'This function expects a maximum of {:d} argument(s) but instead it is receiving {:d}.' -DIAG_MISS_ARGS = -'This function requires {:d} argument(s) but instead it is receiving {:d}.' -DIAG_OVER_MAX_VALUES = -'Only has {} variables, but you set {} values.' -DIAG_AMBIGUITY_1 = -'Compute `{}` first. You may need to add brackets.' -DIAG_LOWERCASE_GLOBAL = -'Global variable in lowercase initial, Did you miss `local` or misspell it?' -DIAG_EMPTY_BLOCK = -'Empty block.' -DIAG_DIAGNOSTICS = -'Lua Diagnostics.' -DIAG_SYNTAX_CHECK = -'Lua Syntax Check.' -DIAG_NEED_VERSION = -'Supported in {}, current is {}.' -DIAG_DEFINED_VERSION = -'Defined in {}, current is {}.' -DIAG_DEFINED_CUSTOM = -'Defined in {}.' -DIAG_DUPLICATE_CLASS = -'Duplicate Class `{}`.' -DIAG_UNDEFINED_CLASS = -'Undefined Class `{}`.' -DIAG_CYCLIC_EXTENDS = -'Cyclic extends.' -DIAG_INEXISTENT_PARAM = -'Inexistent param.' -DIAG_DUPLICATE_PARAM = -'Duplicate param.' -DIAG_NEED_CLASS = -'Class needs to be defined first.' -DIAG_DUPLICATE_SET_FIELD= -'Duplicate field `{}`.' -DIAG_SET_CONST = -'Assignment to const variable.' -DIAG_SET_FOR_STATE = -'Assignment to for-state variable.' -DIAG_CODE_AFTER_BREAK = -'Unable to execute code after `break`.' -DIAG_UNBALANCED_ASSIGNMENTS = -'The value is assigned as `nil` because the number of values is not enough. In Lua, `x, y = 1 ` is equivalent to `x, y = 1, nil` .' -DIAG_REQUIRE_LIKE = -'You can treat `{}` as `require` by setting.' -DIAG_COSE_NON_OBJECT = -'Cannot close a value of this type. (Unless set `__close` meta method)' -DIAG_COUNT_DOWN_LOOP = -'Do you mean `{}` ?' -DIAG_UNKNOWN = -'Can not infer type.' -DIAG_DEPRECATED = -'Deprecated.' -DIAG_DIFFERENT_REQUIRES = -'The same file is required with different names.' -DIAG_REDUNDANT_RETURN = -'Redundant return.' -DIAG_AWAIT_IN_SYNC = -'Async function can only be called in async function.' -DIAG_NOT_YIELDABLE = -'The {}th parameter of this function was not marked as yieldable, but an async function was passed in. (Use `---@param name async fun()` to mark as yieldable)' -DIAG_DISCARD_RETURNS = -'The return values of this function cannot be discarded.' -DIAG_NEED_CHECK_NIL = -'Need check nil.' -DIAG_CIRCLE_DOC_CLASS = -'Circularly inherited classes.' -DIAG_DOC_FIELD_NO_CLASS = -'The field must be defined after the class.' -DIAG_DUPLICATE_DOC_ALIAS = -'Duplicate defined alias `{}`.' -DIAG_DUPLICATE_DOC_FIELD = -'Duplicate defined fields `{}`.' -DIAG_DUPLICATE_DOC_PARAM = -'Duplicate params `{}`.' -DIAG_UNDEFINED_DOC_CLASS = -'Undefined class `{}`.' -DIAG_UNDEFINED_DOC_NAME = -'Undefined type or alias `{}`.' -DIAG_UNDEFINED_DOC_PARAM = -'Undefined param `{}`.' -DIAG_UNKNOWN_DIAG_CODE = -'Unknown diagnostic code `{}`.' -DIAG_CAST_LOCAL_TYPE = -'This variable is defined as type `{def}`. Cannot convert its type to `{ref}`.' -DIAG_CAST_FIELD_TYPE = -'This field is defined as type `{def}`. Cannot convert its type to `{ref}`.' -DIAG_ASSIGN_TYPE_MISMATCH = -'Cannot assign `{ref}` to `{def}`.' -DIAG_PARAM_TYPE_MISMATCH = -'Cannot assign `{ref}` to parameter `{def}`.' -DIAG_UNKNOWN_CAST_VARIABLE = -'Unknown type conversion variable `{}`.' -DIAG_CAST_TYPE_MISMATCH = -'Cannot convert `{def}` to `{ref}`。' -DIAG_MISSING_RETURN_VALUE = -'Annotations specify that at least {min} return value(s) are required, found {rmax} returned here instead.' -DIAG_MISSING_RETURN_VALUE_RANGE = -'Annotations specify that at least {min} return value(s) are required, found {rmin} to {rmax} returned here instead.' -DIAG_REDUNDANT_RETURN_VALUE = -'Annotations specify that at most {max} return value(s) are required, found {rmax} returned here instead.' -DIAG_REDUNDANT_RETURN_VALUE_RANGE = -'Annotations specify that at most {max} return value(s) are required, found {rmin} to {rmax} returned here instead.' -DIAG_MISSING_RETURN = -'Annotations specify that a return value is required here.' -DIAG_RETURN_TYPE_MISMATCH = -'Annotations specify that return value #{index} has a type of `{def}`, returning value of type `{ref}` here instead.' -DIAG_UNKNOWN_OPERATOR = -'Unknown operator `{}`.' -DIAG_UNREACHABLE_CODE = -'Unreachable code.' -DIAG_INVISIBLE_PRIVATE = -'Field `{field}` is private, it can only be accessed in class `{class}`.' -DIAG_INVISIBLE_PROTECTED = -'Field `{field}` is protected, it can only be accessed in class `{class}` and its subclasses.' -DIAG_INVISIBLE_PACKAGE = -'Field `{field}` can only be accessed in same file `{uri}`.' - -MWS_NOT_SUPPORT = -'{} does not support multi workspace for now, I may need to restart to support the new workspace ...' -MWS_RESTART = -'Restart' -MWS_NOT_COMPLETE = -'Workspace is not complete yet. You may try again later...' -MWS_COMPLETE = -'Workspace is complete now. You may try again...' -MWS_MAX_PRELOAD = -'Preloaded files has reached the upper limit ({}), you need to manually open the files that need to be loaded.' -MWS_UCONFIG_FAILED = -'Saving user setting failed.' -MWS_UCONFIG_UPDATED = -'User setting updated.' -MWS_WCONFIG_UPDATED = -'Workspace setting updated.' - -WORKSPACE_SKIP_LARGE_FILE = -'Too large file: {} skipped. The currently set size limit is: {} KB, and the file size is: {} KB.' -WORKSPACE_LOADING = -'Loading workspace' -WORKSPACE_DIAGNOSTIC = -'Diagnosing workspace' -WORKSPACE_SKIP_HUGE_FILE = -'For performance reasons, the parsing of this file has been stopped: {}' -WORKSPACE_NOT_ALLOWED = -'Your workspace is set to `{}`. Lua language server refused to load this directory. Please check your configuration.[learn more here](https://github.com/LuaLS/lua-language-server/wiki/FAQ#why-is-the-server-scanning-the-wrong-folder)' -WORKSPACE_SCAN_TOO_MUCH = -'More than {} files have been scanned. The current scanned directory is `{}`. Please confirm whether the configuration is correct.' - -PARSER_CRASH = -'Parser crashed! Last words:{}' -PARSER_UNKNOWN = -'Unknown syntax error...' -PARSER_MISS_NAME = -' expected.' -PARSER_UNKNOWN_SYMBOL = -'Unexpected symbol `{symbol}`.' -PARSER_MISS_SYMBOL = -'Missed symbol `{symbol}`.' -PARSER_MISS_ESC_X = -'Should be 2 hexadecimal digits.' -PARSER_UTF8_SMALL = -'At least 1 hexadecimal digit.' -PARSER_UTF8_MAX = -'Should be between {min} and {max} .' -PARSER_ERR_ESC = -'Invalid escape sequence.' -PARSER_MUST_X16 = -'Should be hexadecimal digits.' -PARSER_MISS_EXPONENT = -'Missed digits for the exponent.' -PARSER_MISS_EXP = -' expected.' -PARSER_MISS_FIELD = -' expected.' -PARSER_MISS_METHOD = -' expected.' -PARSER_ARGS_AFTER_DOTS = -'`...` should be the last arg.' -PARSER_KEYWORD = -' cannot be used as name.' -PARSER_EXP_IN_ACTION = -'Unexpected .' -PARSER_BREAK_OUTSIDE = -' not inside a loop.' -PARSER_MALFORMED_NUMBER = -'Malformed number.' -PARSER_ACTION_AFTER_RETURN = -' expected after `return`.' -PARSER_ACTION_AFTER_BREAK = -' expected after `break`.' -PARSER_NO_VISIBLE_LABEL = -'No visible label `{label}` .' -PARSER_REDEFINE_LABEL = -'Label `{label}` already defined.' -PARSER_UNSUPPORT_SYMBOL = -'{version} does not support this grammar.' -PARSER_UNEXPECT_DOTS = -'Cannot use `...` outside a vararg function.' -PARSER_UNEXPECT_SYMBOL = -'Unexpected symbol `{symbol}` .' -PARSER_UNKNOWN_TAG = -'Unknown attribute.' -PARSER_MULTI_TAG = -'Does not support multi attributes.' -PARSER_UNEXPECT_LFUNC_NAME = -'Local function can only use identifiers as name.' -PARSER_UNEXPECT_EFUNC_NAME = -'Function as expression cannot be named.' -PARSER_ERR_LCOMMENT_END = -'Multi-line annotations should be closed by `{symbol}` .' -PARSER_ERR_C_LONG_COMMENT = -'Lua should use `--[[ ]]` for multi-line annotations.' -PARSER_ERR_LSTRING_END = -'Long string should be closed by `{symbol}` .' -PARSER_ERR_ASSIGN_AS_EQ = -'Should use `=` for assignment.' -PARSER_ERR_EQ_AS_ASSIGN = -'Should use `==` for equal.' -PARSER_ERR_UEQ = -'Should use `~=` for not equal.' -PARSER_ERR_THEN_AS_DO = -'Should use `then` .' -PARSER_ERR_DO_AS_THEN = -'Should use `do` .' -PARSER_MISS_END = -'Miss corresponding `end` .' -PARSER_ERR_COMMENT_PREFIX = -'Lua should use `--` for annotations.' -PARSER_MISS_SEP_IN_TABLE = -'Miss symbol `,` or `;` .' -PARSER_SET_CONST = -'Assignment to const variable.' -PARSER_UNICODE_NAME = -'Contains Unicode characters.' -PARSER_ERR_NONSTANDARD_SYMBOL = -'Lua should use `{symbol}` .' -PARSER_MISS_SPACE_BETWEEN = -'Spaces must be left between symbols.' -PARSER_INDEX_IN_FUNC_NAME = -'The `[name]` form cannot be used in the name of a named function.' -PARSER_UNKNOWN_ATTRIBUTE = -'Local attribute should be `const` or `close`' -PARSER_AMBIGUOUS_SYNTAX = -- TODO: need translate! -'In Lua 5.1, the left brackets called by the function must be in the same line as the function.' -PARSER_NEED_PAREN = -- TODO: need translate! -'Need to add a pair of parentheses.' -PARSER_NESTING_LONG_MARK = -'Nesting of `[[...]]` is not allowed in Lua 5.1 .' -PARSER_LOCAL_LIMIT = -'Only 200 active local variables and upvalues can be existed at the same time.' -PARSER_LUADOC_MISS_CLASS_NAME = -' expected.' -PARSER_LUADOC_MISS_EXTENDS_SYMBOL = -'`:` expected.' -PARSER_LUADOC_MISS_CLASS_EXTENDS_NAME = -' expected.' -PARSER_LUADOC_MISS_SYMBOL = -'`{symbol}` expected.' -PARSER_LUADOC_MISS_ARG_NAME = -' expected.' -PARSER_LUADOC_MISS_TYPE_NAME = -' expected.' -PARSER_LUADOC_MISS_ALIAS_NAME = -' expected.' -PARSER_LUADOC_MISS_ALIAS_EXTENDS = -' expected.' -PARSER_LUADOC_MISS_PARAM_NAME = -' expected.' -PARSER_LUADOC_MISS_PARAM_EXTENDS = -' expected.' -PARSER_LUADOC_MISS_FIELD_NAME = -' expected.' -PARSER_LUADOC_MISS_FIELD_EXTENDS = -' expected.' -PARSER_LUADOC_MISS_GENERIC_NAME = -' expected.' -PARSER_LUADOC_MISS_GENERIC_EXTENDS_NAME = -' expected.' -PARSER_LUADOC_MISS_VARARG_TYPE = -' expected.' -PARSER_LUADOC_MISS_FUN_AFTER_OVERLOAD = -'`fun` expected.' -PARSER_LUADOC_MISS_CATE_NAME = -' expected.' -PARSER_LUADOC_MISS_DIAG_MODE = -' expected.' -PARSER_LUADOC_ERROR_DIAG_MODE = -' incorrect.' -PARSER_LUADOC_MISS_LOCAL_NAME = -' expected.' - -SYMBOL_ANONYMOUS = -'' - -HOVER_VIEW_DOCUMENTS = -'View documents' -HOVER_DOCUMENT_LUA51 = -'http://www.lua.org/manual/5.1/manual.html#{}' -HOVER_DOCUMENT_LUA52 = -'http://www.lua.org/manual/5.2/manual.html#{}' -HOVER_DOCUMENT_LUA53 = -'http://www.lua.org/manual/5.3/manual.html#{}' -HOVER_DOCUMENT_LUA54 = -'http://www.lua.org/manual/5.4/manual.html#{}' -HOVER_DOCUMENT_LUAJIT = -'http://www.lua.org/manual/5.1/manual.html#{}' -HOVER_NATIVE_DOCUMENT_LUA51 = -'command:extension.lua.doc?["en-us/51/manual.html/{}"]' -HOVER_NATIVE_DOCUMENT_LUA52 = -'command:extension.lua.doc?["en-us/52/manual.html/{}"]' -HOVER_NATIVE_DOCUMENT_LUA53 = -'command:extension.lua.doc?["en-us/53/manual.html/{}"]' -HOVER_NATIVE_DOCUMENT_LUA54 = -'command:extension.lua.doc?["en-us/54/manual.html/{}"]' -HOVER_NATIVE_DOCUMENT_LUAJIT = -'command:extension.lua.doc?["en-us/51/manual.html/{}"]' -HOVER_MULTI_PROTOTYPE = -'({} prototypes)' -HOVER_STRING_BYTES = -'{} bytes' -HOVER_STRING_CHARACTERS = -'{} bytes, {} characters' -HOVER_MULTI_DEF_PROTO = -'({} definitions, {} prototypes)' -HOVER_MULTI_PROTO_NOT_FUNC = -'({} non functional definition)' -HOVER_USE_LUA_PATH = -'(Search path: `{}`)' -HOVER_EXTENDS = -'Expand to {}' -HOVER_TABLE_TIME_UP = -'Partial type inference has been disabled for performance reasons.' -HOVER_WS_LOADING = -'Workspace loading: {} / {}' -HOVER_AWAIT_TOOLTIP = -'Calling async function, current thread may be yielded.' - -ACTION_DISABLE_DIAG = -'Disable diagnostics in the workspace ({}).' -ACTION_MARK_GLOBAL = -'Mark `{}` as defined global.' -ACTION_REMOVE_SPACE = -'Clear all postemptive spaces.' -ACTION_ADD_SEMICOLON = -'Add `;` .' -ACTION_ADD_BRACKETS = -'Add brackets.' -ACTION_RUNTIME_VERSION = -'Change runtime version to {} .' -ACTION_OPEN_LIBRARY = -'Load globals from {} .' -ACTION_ADD_DO_END = -'Add `do ... end` .' -ACTION_FIX_LCOMMENT_END = -'Modify to the correct multi-line annotations closing symbol.' -ACTION_ADD_LCOMMENT_END = -'Close multi-line annotations.' -ACTION_FIX_C_LONG_COMMENT = -'Modify to Lua multi-line annotations format.' -ACTION_FIX_LSTRING_END = -'Modify to the correct long string closing symbol.' -ACTION_ADD_LSTRING_END = -'Close long string.' -ACTION_FIX_ASSIGN_AS_EQ = -'Modify to `=` .' -ACTION_FIX_EQ_AS_ASSIGN = -'Modify to `==` .' -ACTION_FIX_UEQ = -'Modify to `~=` .' -ACTION_FIX_THEN_AS_DO = -'Modify to `then` .' -ACTION_FIX_DO_AS_THEN = -'Modify to `do` .' -ACTION_ADD_END = -'Add `end` (infer the addition location ny indentations).' -ACTION_FIX_COMMENT_PREFIX = -'Modify to `--` .' -ACTION_FIX_NONSTANDARD_SYMBOL = -'Modify to `{symbol}` .' -ACTION_RUNTIME_UNICODE_NAME = -'Allow Unicode characters.' -ACTION_SWAP_PARAMS = -'Change to parameter {index} of `{node}`' -ACTION_FIX_INSERT_SPACE = -'Insert space.' -ACTION_JSON_TO_LUA = -'Convert JSON to Lua' -ACTION_DISABLE_DIAG_LINE= -'Disable diagnostics on this line ({}).' -ACTION_DISABLE_DIAG_FILE= -'Disable diagnostics in this file ({}).' -ACTION_MARK_ASYNC = -'Mark current function as async.' -ACTION_ADD_DICT = -'Add \'{}\' to workspace dict' -ACTION_FIX_ADD_PAREN = -- TODO: need translate! -'Add parentheses.' - -COMMAND_DISABLE_DIAG = -'Disable diagnostics' -COMMAND_MARK_GLOBAL = -'Mark defined global' -COMMAND_REMOVE_SPACE = -'Clear all postemptive spaces' -COMMAND_ADD_BRACKETS = -'Add brackets' -COMMAND_RUNTIME_VERSION = -'Change runtime version' -COMMAND_OPEN_LIBRARY = -'Load globals from 3rd library' -COMMAND_UNICODE_NAME = -'Allow Unicode characters.' -COMMAND_JSON_TO_LUA = -'Convert JSON to Lua' -COMMAND_JSON_TO_LUA_FAILED = -'Convert JSON to Lua failed: {}' -COMMAND_ADD_DICT = -'Add Word to dictionary' -COMMAND_REFERENCE_COUNT = -'{} references' - -COMPLETION_IMPORT_FROM = -'Import from {}' -COMPLETION_DISABLE_AUTO_REQUIRE = -'Disable auto require' -COMPLETION_ASK_AUTO_REQUIRE = -'Add the code at the top of the file to require this file?' - -DEBUG_MEMORY_LEAK = -"{} I'm sorry for the serious memory leak. The language service will be restarted soon." -DEBUG_RESTART_NOW = -'Restart now' - -WINDOW_COMPILING = -'Compiling' -WINDOW_DIAGNOSING = -'Diagnosing' -WINDOW_INITIALIZING = -'Initializing...' -WINDOW_PROCESSING_HOVER = -'Processing hover...' -WINDOW_PROCESSING_DEFINITION = -'Processing definition...' -WINDOW_PROCESSING_REFERENCE = -'Processing reference...' -WINDOW_PROCESSING_RENAME = -'Processing rename...' -WINDOW_PROCESSING_COMPLETION = -'Processing completion...' -WINDOW_PROCESSING_SIGNATURE = -'Processing signature help...' -WINDOW_PROCESSING_SYMBOL = -'Processing file symbols...' -WINDOW_PROCESSING_WS_SYMBOL = -'Processing workspace symbols...' -WINDOW_PROCESSING_SEMANTIC_FULL = -'Processing full semantic tokens...' -WINDOW_PROCESSING_SEMANTIC_RANGE = -'Processing incremental semantic tokens...' -WINDOW_PROCESSING_HINT = -'Processing inline hint...' -WINDOW_PROCESSING_BUILD_META = -'Processing build meta...' -WINDOW_INCREASE_UPPER_LIMIT = -'Increase upper limit' -WINDOW_CLOSE = -'Close' -WINDOW_SETTING_WS_DIAGNOSTIC = -'You can delay or disable workspace diagnostics in settings' -WINDOW_DONT_SHOW_AGAIN = -"Don't show again" -WINDOW_DELAY_WS_DIAGNOSTIC = -'Idle time diagnosis (delay {} seconds)' -WINDOW_DISABLE_DIAGNOSTIC = -'Disable workspace diagnostics' -WINDOW_LUA_STATUS_WORKSPACE = -'Workspace : {}' -WINDOW_LUA_STATUS_CACHED_FILES = -'Cached files: {ast}/{max}' -WINDOW_LUA_STATUS_MEMORY_COUNT = -'Memory usage: {mem:.f}M' -WINDOW_LUA_STATUS_TIP = -[[ - -This icon is a cat, -Not a dog nor a fox! - ↓↓↓ -]] -WINDOW_LUA_STATUS_DIAGNOSIS_TITLE= -'Perform workspace diagnosis' -WINDOW_LUA_STATUS_DIAGNOSIS_MSG = -'Do you want to perform workspace diagnosis?' -WINDOW_APPLY_SETTING = -'Apply setting' -WINDOW_CHECK_SEMANTIC = -'If you are using the color theme in the market, you may need to modify `editor.semanticHighlighting.enabled` to `true` to make semantic tokens take effect.' -WINDOW_TELEMETRY_HINT = -'Please allow sending anonymous usage data and error reports to help us further improve this extension. Read our privacy policy [here](https://github.com/LuaLS/lua-language-server/wiki/Home#privacy) .' -WINDOW_TELEMETRY_ENABLE = -'Allow' -WINDOW_TELEMETRY_DISABLE = -'Prohibit' -WINDOW_CLIENT_NOT_SUPPORT_CONFIG = -'Your client does not support modifying settings from the server side, please manually modify the following settings:' -WINDOW_LCONFIG_NOT_SUPPORT_CONFIG= -'Automatic modification of local settings is not currently supported, please manually modify the following settings:' -WINDOW_MANUAL_CONFIG_ADD = -'`{key}`: add element `{value:q}` ;' -WINDOW_MANUAL_CONFIG_SET = -'`{key}`: set to `{value:q}` ;' -WINDOW_MANUAL_CONFIG_PROP = -'`{key}`: set the property `{prop}` to `{value:q}`;' -WINDOW_APPLY_WHIT_SETTING = -'Apply and modify settings' -WINDOW_APPLY_WHITOUT_SETTING = -'Apply but do not modify settings' -WINDOW_ASK_APPLY_LIBRARY = -'Do you need to configure your work environment as `{}`?' -WINDOW_SEARCHING_IN_FILES = -'Searching in files...' -WINDOW_CONFIG_LUA_DEPRECATED = -'`config.lua` is deprecated, please use `config.json` instead.' -WINDOW_CONVERT_CONFIG_LUA = -'Convert to `config.json`' -WINDOW_MODIFY_REQUIRE_PATH = -'Do you want to modify the require path?' -WINDOW_MODIFY_REQUIRE_OK = -'Modify' - -CONFIG_LOAD_FAILED = -'Unable to read the settings file: {}' -CONFIG_LOAD_ERROR = -'Setting file loading error: {}' -CONFIG_TYPE_ERROR = -'The setting file must be in lua or json format: {}' -CONFIG_MODIFY_FAIL_SYNTAX_ERROR = -'Failed to modify settings, there are syntax errors in the settings file: {}' -CONFIG_MODIFY_FAIL_NO_WORKSPACE = -[[ -Failed to modify settings: -* The current mode is single-file mode, server cannot create `.luarc.json` without workspace. -* The language client dose not support modifying settings from the server side. - -Please modify following settings manually: -{} -]] -CONFIG_MODIFY_FAIL = -[[ -Failed to modify settings - -Please modify following settings manually: -{} -]] - -PLUGIN_RUNTIME_ERROR = -[[ -An error occurred in the plugin, please report it to the plugin author. -Please check the details in the output or log. -Plugin path: {} -]] -PLUGIN_TRUST_LOAD = -[[ -The current settings try to load the plugin at this location:{} - -Note that malicious plugin may harm your computer -]] -PLUGIN_TRUST_YES = -[[ -Trust and load this plugin -]] -PLUGIN_TRUST_NO = -[[ -Don't load this plugin -]] - -CLI_CHECK_ERROR_TYPE = -'The argument of CHECK must be a string, but got {}' -CLI_CHECK_ERROR_URI = -'The argument of CHECK must be a valid uri, but got {}' -CLI_CHECK_ERROR_LEVEL = -'Checklevel must be one of: {}' -CLI_CHECK_INITING = -'Initializing ...' -CLI_CHECK_SUCCESS = -'Diagnosis completed, no problems found' -CLI_CHECK_RESULTS = -'Diagnosis complete, {} problems found, see {}' -CLI_DOC_INITING = -'Loading documents ...' -CLI_DOC_DONE = -[[ -Document exporting completed! -Raw data: {} -Markdown(example): {} -]] - -TYPE_ERROR_ENUM_GLOBAL_DISMATCH = -'Type `{child}` cannot match enumeration type of `{parent}`' -TYPE_ERROR_ENUM_GENERIC_UNSUPPORTED = -'Cannot use generic `{child}` in enumeration' -TYPE_ERROR_ENUM_LITERAL_DISMATCH = -'Literal `{child}` cannot match the enumeration value of `{parent}`' -TYPE_ERROR_ENUM_OBJECT_DISMATCH = -'The object `{child}` cannot match the enumeration value of `{parent}`. They must be the same object' -TYPE_ERROR_ENUM_NO_OBJECT = -'The passed in enumeration value `{child}` is not recognized' -TYPE_ERROR_INTEGER_DISMATCH = -'Literal `{child}` cannot match integer `{parent}`' -TYPE_ERROR_STRING_DISMATCH = -'Literal `{child}` cannot match string `{parent}`' -TYPE_ERROR_BOOLEAN_DISMATCH = -'Literal `{child}` cannot match boolean `{parent}`' -TYPE_ERROR_TABLE_NO_FIELD = -'Field `{key}` does not exist in the table' -TYPE_ERROR_TABLE_FIELD_DISMATCH = -'The type of field `{key}` is `{child}`, which cannot match `{parent}`' -TYPE_ERROR_CHILD_ALL_DISMATCH = -'All subtypes in `{child}` cannot match `{parent}`' -TYPE_ERROR_PARENT_ALL_DISMATCH = -'`{child}` cannot match any subtypes in `{parent}`' -TYPE_ERROR_UNION_DISMATCH = -'`{child}` cannot match `{parent}`' -TYPE_ERROR_OPTIONAL_DISMATCH = -'Optional type cannot match `{parent}`' -TYPE_ERROR_NUMBER_LITERAL_TO_INTEGER = -'The number `{child}` cannot be converted to an integer' -TYPE_ERROR_NUMBER_TYPE_TO_INTEGER = -'Cannot convert number type to integer type' -TYPE_ERROR_DISMATCH = -'Type `{child}` cannot match `{parent}`' - -LUADOC_DESC_CLASS = -[=[ -Defines a class/table structure -## Syntax -`---@class [: [, ]...]` -## Usage -``` ----@class Manager: Person, Human -Manager = {} -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#class) -]=] -LUADOC_DESC_TYPE = -[=[ -Specify the type of a certain variable - -Default types: `nil`, `any`, `boolean`, `string`, `number`, `integer`, -`function`, `table`, `thread`, `userdata`, `lightuserdata` - -(Custom types can be provided using `@alias`) - -## Syntax -`---@type [| [type]...` - -## Usage -### General -``` ----@type nil|table|myClass -local Example = nil -``` - -### Arrays -``` ----@type number[] -local phoneNumbers = {} -``` - -### Enums -``` ----@type "red"|"green"|"blue" -local color = "" -``` - -### Tables -``` ----@type table -local settings = { - disableLogging = true, - preventShutdown = false, -} - ----@type { [string]: true } -local x --x[""] is true -``` - -### Functions -``` ----@type fun(mode?: "r"|"w"): string -local myFunction -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#types-and-type) -]=] -LUADOC_DESC_ALIAS = -[=[ -Create your own custom type that can be used with `@param`, `@type`, etc. - -## Syntax -`---@alias [description]`\ -or -``` ----@alias ----| 'value' [# comment] ----| 'value2' [# comment] -... -``` - -## Usage -### Expand to other type -``` ----@alias filepath string Path to a file - ----@param path filepath Path to the file to search in -function find(path, pattern) end -``` - -### Enums -``` ----@alias font-style ----| '"underlined"' # Underline the text ----| '"bold"' # Bolden the text ----| '"italic"' # Make the text italicized - ----@param style font-style Style to apply -function setFontStyle(style) end -``` - -### Literal Enum -``` -local enums = { - READ = 0, - WRITE = 1, - CLOSED = 2 -} - ----@alias FileStates ----| `enums.READ` ----| `enums.WRITE` ----| `enums.CLOSE` -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#alias) -]=] -LUADOC_DESC_PARAM = -[=[ -Declare a function parameter - -## Syntax -`@param [?] [comment]` - -## Usage -### General -``` ----@param url string The url to request ----@param headers? table HTTP headers to send ----@param timeout? number Timeout in seconds -function get(url, headers, timeout) end -``` - -### Variable Arguments -``` ----@param base string The base to concat to ----@param ... string The values to concat -function concat(base, ...) end -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#param) -]=] -LUADOC_DESC_RETURN = -[=[ -Declare a return value - -## Syntax -`@return [name] [description]`\ -or\ -`@return [# description]` - -## Usage -### General -``` ----@return number ----@return number # The green component ----@return number b The blue component -function hexToRGB(hex) end -``` - -### Type & name only -``` ----@return number x, number y -function getCoords() end -``` - -### Type only -``` ----@return string, string -function getFirstLast() end -``` - -### Return variable values -``` ----@return string ... The tags of the item -function getTags(item) end -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#return) -]=] -LUADOC_DESC_FIELD = -[=[ -Declare a field in a class/table. This allows you to provide more in-depth -documentation for a table. As of `v3.6.0`, you can mark a field as `private`, -`protected`, `public`, or `package`. - -## Syntax -`---@field [scope] [description]` - -## Usage -``` ----@class HTTP_RESPONSE ----@field status HTTP_STATUS ----@field headers table The headers of the response - ----@class HTTP_STATUS ----@field code number The status code of the response ----@field message string A message reporting the status - ----@return HTTP_RESPONSE response The response from the server -function get(url) end - ---This response variable has all of the fields defined above -response = get("localhost") - ---Extension provided intellisense for the below assignment -statusCode = response.status.code -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#field) -]=] -LUADOC_DESC_GENERIC = -[=[ -Simulates generics. Generics can allow types to be re-used as they help define -a "generic shape" that can be used with different types. - -## Syntax -`---@generic [:parent_type] [, [:parent_type]]` - -## Usage -### General -``` ----@generic T ----@param value T The value to return ----@return T value The exact same value -function echo(value) - return value -end - --- Type is string -s = echo("e") - --- Type is number -n = echo(10) - --- Type is boolean -b = echo(true) - --- We got all of this info from just using --- @generic rather than manually specifying --- each allowed type -``` - -### Capture name of generic type -``` ----@class Foo -local Foo = {} -function Foo:Bar() end - ----@generic T ----@param name `T` # the name generic type is captured here ----@return T # generic type is returned -function Generic(name) end - -local v = Generic("Foo") -- v is an object of Foo -``` - -### How Lua tables use generics -``` ----@class table: { [K]: V } - --- This is what allows us to create a table --- and intellisense keeps track of any type --- we give for key (K) or value (V) -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#generics-and-generic) -]=] -LUADOC_DESC_VARARG = -[=[ -Primarily for legacy support for EmmyLua annotations. `@vararg` does not -provide typing or allow descriptions. - -**You should instead use `@param` when documenting parameters (variable or not).** - -## Syntax -`@vararg ` - -## Usage -``` ----Concat strings together ----@vararg string -function concat(...) end -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#vararg) -]=] -LUADOC_DESC_OVERLOAD = -[=[ -Allows defining of multiple function signatures. - -## Syntax -`---@overload fun([: ] [, [: ]]...)[: [, ]...]` - -## Usage -``` ----@overload fun(t: table, value: any): number -function table.insert(t, position, value) end -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#overload) -]=] -LUADOC_DESC_DEPRECATED = -[=[ -Marks a function as deprecated. This results in any deprecated function calls -being ~~struck through~~. - -## Syntax -`---@deprecated` - ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#deprecated) -]=] -LUADOC_DESC_META = -[=[ -Indicates that this is a meta file and should be used for definitions and intellisense only. - -There are 3 main distinctions to note with meta files: -1. There won't be any context-based intellisense in a meta file -2. Hovering a `require` filepath in a meta file shows `[meta]` instead of an absolute path -3. The `Find Reference` function will ignore meta files - -## Syntax -`---@meta` - ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#meta) -]=] -LUADOC_DESC_VERSION = -[=[ -Specifies Lua versions that this function is exclusive to. - -Lua versions: `5.1`, `5.2`, `5.3`, `5.4`, `JIT`. - -Requires configuring the `Diagnostics: Needed File Status` setting. - -## Syntax -`---@version [, ]...` - -## Usage -### General -``` ----@version JIT -function onlyWorksInJIT() end -``` -### Specify multiple versions -``` ----@version <5.2,JIT -function oldLuaOnly() end -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#version) -]=] -LUADOC_DESC_SEE = -[=[ -Define something that can be viewed for more information - -## Syntax -`---@see ` - ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#see) -]=] -LUADOC_DESC_DIAGNOSTIC = -[=[ -Enable/disable diagnostics for error/warnings/etc. - -Actions: `disable`, `enable`, `disable-line`, `disable-next-line` - -[Names](https://github.com/LuaLS/lua-language-server/blob/cbb6e6224094c4eb874ea192c5f85a6cba099588/script/proto/define.lua#L54) - -## Syntax -`---@diagnostic [: ]` - -## Usage -### Disable next line -``` ----@diagnostic disable-next-line: undefined-global -``` - -### Manually toggle -``` ----@diagnostic disable: unused-local -local unused = "hello world" ----@diagnostic enable: unused-local -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#diagnostic) -]=] -LUADOC_DESC_MODULE = -[=[ -Provides the semantics of `require`. - -## Syntax -`---@module <'module_name'>` - -## Usage -``` ----@module 'string.utils' -local stringUtils --- This is functionally the same as: -local module = require('string.utils') -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#module) -]=] -LUADOC_DESC_ASYNC = -[=[ -Marks a function as asynchronous. - -## Syntax -`---@async` - ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#async) -]=] -LUADOC_DESC_NODISCARD = -[=[ -Prevents this function's return values from being discarded/ignored. -This will raise the `discard-returns` warning should the return values -be ignored. - -## Syntax -`---@nodiscard` - ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#nodiscard) -]=] -LUADOC_DESC_CAST = -[=[ -Allows type casting (type conversion). - -## Syntax -`@cast <[+|-]type>[, <[+|-]type>]...` - -## Usage -### Overwrite type -``` ----@type integer -local x --> integer - ----@cast x string -print(x) --> string -``` -### Add Type -``` ----@type string -local x --> string - ----@cast x +boolean, +number -print(x) --> string|boolean|number -``` -### Remove Type -``` ----@type string|table -local x --> string|table - ----@cast x -string -print(x) --> table -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#cast) -]=] -LUADOC_DESC_OPERATOR = -[=[ -Provide type declaration for [operator metamethods](http://lua-users.org/wiki/MetatableEvents). - -## Syntax -`@operator [(input_type)]:` - -## Usage -### Vector Add Metamethod -``` ----@class Vector ----@operation add(Vector):Vector - -vA = Vector.new(1, 2, 3) -vB = Vector.new(10, 20, 30) - -vC = vA + vB ---> Vector -``` -### Unary Minus -``` ----@class Passcode ----@operation unm:integer - -pA = Passcode.new(1234) -pB = -pA ---> integer -``` -[View Request](https://github.com/LuaLS/lua-language-server/issues/599) -]=] -LUADOC_DESC_ENUM = -[=[ -Mark a table as an enum. If you want an enum but can't define it as a Lua -table, take a look at the [`@alias`](https://github.com/LuaLS/lua-language-server/wiki/Annotations#alias) -tag. - -## Syntax -`@enum ` - -## Usage -``` ----@enum colors -local colors = { - white = 0, - orange = 2, - yellow = 4, - green = 8, - black = 16, -} - ----@param color colors -local function setColor(color) end - --- Completion and hover is provided for the below param -setColor(colors.green) -``` -]=] -LUADOC_DESC_PACKAGE = -[=[ -Mark a function as private to the file it is defined in. A packaged function -cannot be accessed from another file. - -## Syntax -`@package` - -## Usage -``` ----@class Animal ----@field private eyes integer -local Animal = {} - ----@package ----This cannot be accessed in another file -function Animal:eyesCount() - return self.eyes -end -``` -]=] -LUADOC_DESC_PRIVATE = -[=[ -Mark a function as private to a @class. Private functions can be accessed only -from within their class and are not accessable from child classes. - -## Syntax -`@private` - -## Usage -``` ----@class Animal ----@field private eyes integer -local Animal = {} - ----@private -function Animal:eyesCount() - return self.eyes -end - ----@class Dog:Animal -local myDog = {} - ----NOT PERMITTED! -myDog:eyesCount(); -``` -]=] -LUADOC_DESC_PROTECTED = -[=[ -Mark a function as protected within a @class. Protected functions can be -accessed only from within their class or from child classes. - -## Syntax -`@protected` - -## Usage -``` ----@class Animal ----@field private eyes integer -local Animal = {} - ----@protected -function Animal:eyesCount() - return self.eyes -end - ----@class Dog:Animal -local myDog = {} - ----Permitted because function is protected, not private. -myDog:eyesCount(); -``` -]=] diff --git a/.building/lua-language-server-3.6.18-win32-x64/locale/en-us/setting.lua b/.building/lua-language-server-3.6.18-win32-x64/locale/en-us/setting.lua deleted file mode 100644 index 18840e94f..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/locale/en-us/setting.lua +++ /dev/null @@ -1,430 +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.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['invisible'] = -'Enable diagnostics for accesses to fields which are invisible.' -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['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.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 ...' diff --git a/.building/lua-language-server-3.6.18-win32-x64/locale/pt-br/meta.lua b/.building/lua-language-server-3.6.18-win32-x64/locale/pt-br/meta.lua deleted file mode 100644 index f21dac60e..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/locale/pt-br/meta.lua +++ /dev/null @@ -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 já 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, 1–7, Domingo é 1' -osdate.yday = -'Dia do ano, 1–366' -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`).' diff --git a/.building/lua-language-server-3.6.18-win32-x64/locale/pt-br/script.lua b/.building/lua-language-server-3.6.18-win32-x64/locale/pt-br/script.lua deleted file mode 100644 index d2a7c3145..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/locale/pt-br/script.lua +++ /dev/null @@ -1,1256 +0,0 @@ -DIAG_LINE_ONLY_SPACE = -'Linha com espaços apenas.' -DIAG_LINE_POST_SPACE = -'Linha com espaço extra ao final.' -DIAG_UNUSED_LOCAL = -'Escopo não utilizado `{}`.' -DIAG_UNDEF_GLOBAL = -'Escopo global indefinido `{}`.' -DIAG_UNDEF_FIELD = -'Campo indefinido `{}`.' -DIAG_UNDEF_ENV_CHILD = -'Variável indefinida `{}` (overloaded `_ENV` ).' -DIAG_UNDEF_FENV_CHILD = -'Variável indefinida `{}` (módulo interno).' -DIAG_GLOBAL_IN_NIL_ENV = -'Valor global inválido (`_ENV` é `nil`).' -DIAG_GLOBAL_IN_NIL_FENV = -'Valor global inválido (Ambiente do módulo é `nil`).' -DIAG_UNUSED_LABEL = -'Identificador não utilizado `{}`.' -DIAG_UNUSED_FUNCTION = -'Funções não utilizadas.' -DIAG_UNUSED_VARARG = -'vararg não utilizado.' -DIAG_REDEFINED_LOCAL = -'Valor local redefinido `{}`.' -DIAG_DUPLICATE_INDEX = -'Índice duplicado `{}`.' -DIAG_DUPLICATE_METHOD = -'Método duplicado `{}`.' -DIAG_PREVIOUS_CALL = -'Será interpretado como `{}{}`. Pode ser necessário adicionar uma `,`.' -DIAG_PREFIELD_CALL = -'Será interpretado como `{}{}`. Pode ser necessário adicionar uma `,` ou `;`.' -DIAG_OVER_MAX_ARGS = -'A função aceita apenas os parâmetros {:d}, mas você passou {:d}.' -DIAG_MISS_ARGS = -'A função recebe pelo menos {:d} argumentos, mas há {:d}.' -DIAG_OVER_MAX_VALUES = -'Apenas há {} variáveis, mas você declarou {} valores.' -DIAG_AMBIGUITY_1 = -'Calcule primeiro `{}`. Você pode precisar adicionar colchetes.' -DIAG_LOWERCASE_GLOBAL = -'Variável global com inicial minúscula, você esqueceu o `local` ou digitou errado?' -DIAG_EMPTY_BLOCK = -'Bloco vazio.' -DIAG_DIAGNOSTICS = -'Diagnósticos Lua.' -DIAG_SYNTAX_CHECK = -'Verificação de sintaxe Lua.' -DIAG_NEED_VERSION = -'Suportado em {}, atual é {}.' -DIAG_DEFINED_VERSION = -'Definido em {}, a corrente é {}.' -DIAG_DEFINED_CUSTOM = -'Definido em {}.' -DIAG_DUPLICATE_CLASS = -'Classe duplicada `{}`.' -DIAG_UNDEFINED_CLASS = -'Classe indefinida `{}`.' -DIAG_CYCLIC_EXTENDS = -'Herança cíclica.' -DIAG_INEXISTENT_PARAM = -'Parâmetro inexistente.' -DIAG_DUPLICATE_PARAM = -'Parâmetro duplicado.' -DIAG_NEED_CLASS = -'Classe precisa ser definida primeiro.' -DIAG_DUPLICATE_SET_FIELD= -'Campo duplicado `{}`.' -DIAG_SET_CONST = -'Atribuição à variável constante.' -DIAG_SET_FOR_STATE = -'Atribuição à variável to tipo for-state.' -DIAG_CODE_AFTER_BREAK = -'Não é possível executar o código depois `break`.' -DIAG_UNBALANCED_ASSIGNMENTS = -'O valor é atribuído como `nil` porque o número de valores não é suficiente. Em Lua, `x, y = 1` é equivalente a `x, y = 1, nil` .' -DIAG_REQUIRE_LIKE = -'Você pode tratar `{}` como `require` por configuração.' -DIAG_COSE_NON_OBJECT = -'Não é possível fechar um valor desse tipo. (A menos que se defina o meta método `__close`)' -DIAG_COUNT_DOWN_LOOP = -'Você quer dizer `{}` ?' -DIAG_UNKNOWN = -'Não pode inferir tipo.' -DIAG_DEPRECATED = -'Descontinuada.' -DIAG_DIFFERENT_REQUIRES = -'O mesmo arquivo é necessário com nomes diferentes.' -DIAG_REDUNDANT_RETURN = -'Retorno redundante.' -DIAG_AWAIT_IN_SYNC = -'Funções assíncronas apenas podem ser chamada em funções assíncronas.' -DIAG_NOT_YIELDABLE = -'O {}-ésimo parâmetro desta função não foi marcada como produzível, mas uma função assíncrona foi passada. (Use `---@param name async fun()` para marcar como produzível)' -DIAG_DISCARD_RETURNS = -'Os valores retornados desta função não podem ser descartáveis.' -DIAG_NEED_CHECK_NIL = -'Necessário checar o nil.' -DIAG_CIRCLE_DOC_CLASS = -'Classes com herança cíclica.' -DIAG_DOC_FIELD_NO_CLASS = -'O campo deve ser definido após a classe.' -DIAG_DUPLICATE_DOC_ALIAS = -- TODO: need translate! -'Duplicate defined alias `{}`.' -DIAG_DUPLICATE_DOC_FIELD = -'Campos definidos duplicados `{}`.' -DIAG_DUPLICATE_DOC_PARAM = -'Parâmetros duplicados `{}`.' -DIAG_UNDEFINED_DOC_CLASS = -'Classe indefinida `{}`.' -DIAG_UNDEFINED_DOC_NAME = -'Tipo ou alias indefinido `{}`.' -DIAG_UNDEFINED_DOC_PARAM = -'Parâmetro indefinido `{}`.' -DIAG_UNKNOWN_DIAG_CODE = -'Código de diagnóstico desconhecido `{}`.' -DIAG_CAST_LOCAL_TYPE = -- TODO: need translate! -'This variable is defined as type `{def}`. Cannot convert its type to `{ref}`.' -DIAG_CAST_FIELD_TYPE = -- TODO: need translate! -'This field is defined as type `{def}`. Cannot convert its type to `{ref}`.' -DIAG_ASSIGN_TYPE_MISMATCH = -- TODO: need translate! -'Cannot assign `{ref}` to `{def}`.' -DIAG_PARAM_TYPE_MISMATCH = -- TODO: need translate! -'Cannot assign `{ref}` to parameter `{def}`.' -DIAG_UNKNOWN_CAST_VARIABLE = -- TODO: need translate! -'Unknown type conversion variable `{}`.' -DIAG_CAST_TYPE_MISMATCH = -- TODO: need translate! -'Cannot convert `{ref}` to `{def}`。' -DIAG_MISSING_RETURN_VALUE = -- TODO: need translate! -'At least {min} return values are required, but here only {rmax} values are returned.' -DIAG_MISSING_RETURN_VALUE_RANGE = -- TODO: need translate! -'At least {min} return values are required, but here only {rmin} to {rmax} values are returned.' -DIAG_REDUNDANT_RETURN_VALUE = -- TODO: need translate! -'At most {max} values returned, but the {rmax}th value was returned here.' -DIAG_REDUNDANT_RETURN_VALUE_RANGE = -- TODO: need translate! -'At most {max} values returned, but {rmin}th to {rmax}th values were returned here.' -DIAG_MISSING_RETURN = -- TODO: need translate! -'Return value is required here.' -DIAG_RETURN_TYPE_MISMATCH = -- TODO: need translate! -'The type of the {index} return value is `{def}`, but the actual return is `{ref}`.\n{err}' -DIAG_UNKNOWN_OPERATOR = -- TODO: need translate! -'Unknown operator `{}`.' -DIAG_UNREACHABLE_CODE = -- TODO: need translate! -'Unreachable code.' -DIAG_INVISIBLE_PRIVATE = -- TODO: need translate! -'Field `{field}` is private, it can only be accessed in class `{class}`.' -DIAG_INVISIBLE_PROTECTED = -- TODO: need translate! -'Field `{field}` is protected, it can only be accessed in class `{class}` and its subclasses.' -DIAG_INVISIBLE_PACKAGE = -- TODO: need translate! -'Field `{field}` can only be accessed in same file `{uri}`.' - -MWS_NOT_SUPPORT = -'{} não é suportado múltiplos espaços de trabalho por enquanto, posso precisar reiniciar para estabelecer um novo espaço de trabalho ...' -MWS_RESTART = -'Reiniciar' -MWS_NOT_COMPLETE = -'O espaço de trabalho ainda não está completo. Você pode tentar novamente mais tarde ...' -MWS_COMPLETE = -'O espaço de trabalho está completo agora. Você pode tentar novamente ...' -MWS_MAX_PRELOAD = -'Arquivos pré-carregados atingiram o limite máximo ({}), você precisa abrir manualmente os arquivos que precisam ser carregados.' -MWS_UCONFIG_FAILED = -'Armazenamento da configuração do usuário falhou.' -MWS_UCONFIG_UPDATED = -'Configuração do usuário atualizada.' -MWS_WCONFIG_UPDATED = -'Configuração do espaço de trabalho atualizado.' - -WORKSPACE_SKIP_LARGE_FILE = -'Arquivo muito grande: {} ignorada. O limite de tamanho atualmente definido é: {} KB, e o tamanho do arquivo é: {} KB.' -WORKSPACE_LOADING = -'Carregando espaço de trabalho.' -WORKSPACE_DIAGNOSTIC = -'Diagnóstico de espaço de trabalho.' -WORKSPACE_SKIP_HUGE_FILE = -'Por motivos de desempenho, a análise deste arquivo foi interrompida: {}' -WORKSPACE_NOT_ALLOWED = -'Seu espaço de trabalho foi definido para `{}`. Servidor da linguagem Lua recusou o carregamneto neste diretório. Por favor, cheque sua configuração. [aprenda mais aqui](https://github.com/LuaLS/lua-language-server/wiki/FAQ#why-is-the-server-scanning-the-wrong-folder)' -WORKSPACE_SCAN_TOO_MUCH = -- TODO: need translate! -'Mais do que {} arquivos foram escaneados. O diretório atual escaneado é `{}`. Por favor, confirmar se a configuração está correta' - -PARSER_CRASH = -'Parser quebrou! Últimas palavras: {}' -PARSER_UNKNOWN = -'Erro de sintaxe desconhecido ...' -PARSER_MISS_NAME = -' esperado.' -PARSER_UNKNOWN_SYMBOL = -'Símbolo inesperado `{symbol}`.' -PARSER_MISS_SYMBOL = -'Símbolo não encontrado `{symbol}`.' -PARSER_MISS_ESC_X = -'Deve ser 2 dígitos hexadecimais.' -PARSER_UTF8_SMALL = -'Pelo menos 1 dígito hexadecimal.' -PARSER_UTF8_MAX = -'Deve estar entre {min} e {max}.' -PARSER_ERR_ESC = -'Sequência de saída inválida.' -PARSER_MUST_X16 = -'Deve ser dígitos hexadecimais.' -PARSER_MISS_EXPONENT = -'Dígitos perdidos para o expoente.' -PARSER_MISS_EXP = -' esperada.' -PARSER_MISS_FIELD = -' esperado.' -PARSER_MISS_METHOD = -' esperado.' -PARSER_ARGS_AFTER_DOTS = -'`...` deve ser o último argumento.' -PARSER_KEYWORD = -' não pode ser usado como nome.' -PARSER_EXP_IN_ACTION = -'Inesperada .' -PARSER_BREAK_OUTSIDE = -' não está dentro de um loop.' -PARSER_MALFORMED_NUMBER = -'Número malformado.' -PARSER_ACTION_AFTER_RETURN = -' esperado após `return`.' -PARSER_ACTION_AFTER_BREAK = -' esperado após `break`.' -PARSER_NO_VISIBLE_LABEL = -'Nenhum identificador visível `{label}` .' -PARSER_REDEFINE_LABEL = -'Identificador `{label}` já foi definido.' -PARSER_UNSUPPORT_SYMBOL = -'{version} não suporta esta gramática.' -PARSER_UNEXPECT_DOTS = -'Não pode usar `...` fora de uma função vararg.' -PARSER_UNEXPECT_SYMBOL = -'Símbolo inesperado `{symbol}` .' -PARSER_UNKNOWN_TAG = -'Atributo desconhecido.' -PARSER_MULTI_TAG = -'Não suporta múltiplos atributos.' -PARSER_UNEXPECT_LFUNC_NAME = -'A função local só pode usar identificadores como nome.' -PARSER_UNEXPECT_EFUNC_NAME = -'Função como expressão não pode ser nomeada.' -PARSER_ERR_LCOMMENT_END = -'Anotações em múltiplas linhas devem ser fechadas por `{symbol}` .' -PARSER_ERR_C_LONG_COMMENT = -'Lua deve usar `--[[ ]]` para anotações em múltiplas linhas.' -PARSER_ERR_LSTRING_END = -'String longa deve ser fechada por `{symbol}` .' -PARSER_ERR_ASSIGN_AS_EQ = -'Deveria usar `=` para atribuição.' -PARSER_ERR_EQ_AS_ASSIGN = -'Deveria usar `==` para comparação de igualdade.' -PARSER_ERR_UEQ = -'Deveria usar `~=` para comparação de desigualdade.' -PARSER_ERR_THEN_AS_DO = -'Deveria usar `then` .' -PARSER_ERR_DO_AS_THEN = -'Deveria usar `do` .' -PARSER_MISS_END = -'Falta o `end` correspondente.' -PARSER_ERR_COMMENT_PREFIX = -'Lua usa `--` para anotações/comentários.' -PARSER_MISS_SEP_IN_TABLE = -'Falta o símbolo `,` ou `;` .' -PARSER_SET_CONST = -'Atribuição à variável constante.' -PARSER_UNICODE_NAME = -'Contém caracteres Unicode.' -PARSER_ERR_NONSTANDARD_SYMBOL = -'Deveria usar `{symbol}`.' -PARSER_MISS_SPACE_BETWEEN = -'Devem ser deixados espaços entre símbolos.' -PARSER_INDEX_IN_FUNC_NAME = -'A forma `[name]` não pode ser usada em nome de uma função nomeada.' -PARSER_UNKNOWN_ATTRIBUTE = -'Atributo local deve ser `const` ou `close`' -PARSER_AMBIGUOUS_SYNTAX = -- TODO: need translate! -'In Lua 5.1, the left brackets called by the function must be in the same line as the function.' -PARSER_NEED_PAREN = -- TODO: need translate! -'需要添加一对括号。' -PARSER_NESTING_LONG_MARK = -- TODO: need translate! -'Nesting of `[[...]]` is not allowed in Lua 5.1 .' -PARSER_LOCAL_LIMIT = -- TODO: need translate! -'Only 200 active local variables and upvalues can be existed at the same time.' -PARSER_LUADOC_MISS_CLASS_NAME = -'Esperado .' -PARSER_LUADOC_MISS_EXTENDS_SYMBOL = -'Esperado `:`.' -PARSER_LUADOC_MISS_CLASS_EXTENDS_NAME = -'Esperado .' -PARSER_LUADOC_MISS_SYMBOL = -'Esperado `{symbol}`.' -PARSER_LUADOC_MISS_ARG_NAME = -'Esperado .' -PARSER_LUADOC_MISS_TYPE_NAME = -'Esperado .' -PARSER_LUADOC_MISS_ALIAS_NAME = -'Esperado .' -PARSER_LUADOC_MISS_ALIAS_EXTENDS = -'Esperado .' -PARSER_LUADOC_MISS_PARAM_NAME = -'Esperado .' -PARSER_LUADOC_MISS_PARAM_EXTENDS = -'Esperado .' -PARSER_LUADOC_MISS_FIELD_NAME = -'Esperado .' -PARSER_LUADOC_MISS_FIELD_EXTENDS = -'Esperado .' -PARSER_LUADOC_MISS_GENERIC_NAME = -'Esperado .' -PARSER_LUADOC_MISS_GENERIC_EXTENDS_NAME = -'Esperado .' -PARSER_LUADOC_MISS_VARARG_TYPE = -'Esperado .' -PARSER_LUADOC_MISS_FUN_AFTER_OVERLOAD = -'Esperado `fun`.' -PARSER_LUADOC_MISS_CATE_NAME = -'Esperado .' -PARSER_LUADOC_MISS_DIAG_MODE = -'Esperado .' -PARSER_LUADOC_ERROR_DIAG_MODE = -' incorreto.' -PARSER_LUADOC_MISS_LOCAL_NAME = -' esperado.' - -SYMBOL_ANONYMOUS = -'' - -HOVER_VIEW_DOCUMENTS = -'Visualizar documentos' -HOVER_DOCUMENT_LUA51 = -'http://www.lua.org/manual/5.1/manual.html#{}' -HOVER_DOCUMENT_LUA52 = -'http://www.lua.org/manual/5.2/manual.html#{}' -HOVER_DOCUMENT_LUA53 = -'http://www.lua.org/manual/5.3/manual.html#{}' -HOVER_DOCUMENT_LUA54 = -'http://www.lua.org/manual/5.4/manual.html#{}' -HOVER_DOCUMENT_LUAJIT = -'http://www.lua.org/manual/5.1/manual.html#{}' -HOVER_NATIVE_DOCUMENT_LUA51 = -'command:extension.lua.doc?["en-us/51/manual.html/{}"]' -HOVER_NATIVE_DOCUMENT_LUA52 = -'command:extension.lua.doc?["en-us/52/manual.html/{}"]' -HOVER_NATIVE_DOCUMENT_LUA53 = -'command:extension.lua.doc?["en-us/53/manual.html/{}"]' -HOVER_NATIVE_DOCUMENT_LUA54 = -'command:extension.lua.doc?["en-us/54/manual.html/{}"]' -HOVER_NATIVE_DOCUMENT_LUAJIT = -'command:extension.lua.doc?["en-us/51/manual.html/{}"]' -HOVER_MULTI_PROTOTYPE = -'({} protótipos)' -HOVER_STRING_BYTES = -'{} bytes' -HOVER_STRING_CHARACTERS = -'{} bytes, {} caracteres' -HOVER_MULTI_DEF_PROTO = -'({} definições., {} protótipos)' -HOVER_MULTI_PROTO_NOT_FUNC = -'({} definição não funcional)' -HOVER_USE_LUA_PATH = -'(Caminho de busca: `{}`)' -HOVER_EXTENDS = -'Expande para {}' -HOVER_TABLE_TIME_UP = -'Inferência de tipo parcial foi desativada por motivos de desempenho.' -HOVER_WS_LOADING = -'Carregando espaço de trabalho: {} / {}' -HOVER_AWAIT_TOOLTIP = -'Chamando a função assíncrona, a thread atual deve ser produzível' - -ACTION_DISABLE_DIAG = -'Desativar diagnósticos no espaço de trabalho ({}).' -ACTION_MARK_GLOBAL = -'Marque `{}` como definição global.' -ACTION_REMOVE_SPACE = -'Limpe todos os espaços desnecessários.' -ACTION_ADD_SEMICOLON = -'Adicione `;` .' -ACTION_ADD_BRACKETS = -'Adicione colchetes.' -ACTION_RUNTIME_VERSION = -'Altere a versão de tempo de execução para {}.' -ACTION_OPEN_LIBRARY = -'Carregue variáveis globais de {}.' -ACTION_ADD_DO_END = -'Adicione `do ... end`.' -ACTION_FIX_LCOMMENT_END = -'Modifique para o símbolo de fechamento de anotação/comentário de múltiplas linhas correto.' -ACTION_ADD_LCOMMENT_END = -'Feche as anotações/comentário de múltiplas linhas.' -ACTION_FIX_C_LONG_COMMENT = -'Modifique para o formato de anotações/comentários em múltiplas linhas.' -ACTION_FIX_LSTRING_END = -'Modifique para o símbolo de fechamento de string correta.' -ACTION_ADD_LSTRING_END = -'Feche a string longa.' -ACTION_FIX_ASSIGN_AS_EQ = -'Modifique para `=` .' -ACTION_FIX_EQ_AS_ASSIGN = -'Modifique para `==` .' -ACTION_FIX_UEQ = -'Modifique para `~=` .' -ACTION_FIX_THEN_AS_DO = -'Modifique para `then` .' -ACTION_FIX_DO_AS_THEN = -'Modifique para `do` .' -ACTION_ADD_END = -'Adicione `end` (Adiciona marcação de fim com base na identação).' -ACTION_FIX_COMMENT_PREFIX = -'Modifique para `--` .' -ACTION_FIX_NONSTANDARD_SYMBOL = -'Modifique para `{symbol}` .' -ACTION_RUNTIME_UNICODE_NAME = -'Permite caracteres Unicode.' -ACTION_SWAP_PARAMS = -'Mude para o parâmetro {index} de `{node}`.' -ACTION_FIX_INSERT_SPACE = -'Insira espaço.' -ACTION_JSON_TO_LUA = -'Converte de JSON para Lua.' -ACTION_DISABLE_DIAG_LINE= -'Desativa diagnósticos nesta linha ({}).' -ACTION_DISABLE_DIAG_FILE= -'Desativa diagnósticos nesta linha ({}).' -ACTION_MARK_ASYNC = -'Marque a função atual como assíncrona' -ACTION_ADD_DICT = -'Adicione \'{}\' ao seu espaço de trabalho no ' -ACTION_FIX_ADD_PAREN = -- TODO: need translate! -'添加括号。' - -COMMAND_DISABLE_DIAG = -'Desativar diagnósticos.' -COMMAND_MARK_GLOBAL = -'Marca como variável global.' -COMMAND_REMOVE_SPACE = -'Limpa todos os espaços desnecessários.' -COMMAND_ADD_BRACKETS = -'Adiciona colchetes.' -COMMAND_RUNTIME_VERSION = -'Altera a versão de tempo de execução.' -COMMAND_OPEN_LIBRARY = -'Carrega variáveis globais de bibliotecas de terceiros.' -COMMAND_UNICODE_NAME = -'Permite caracteres Unicode.' -COMMAND_JSON_TO_LUA = -'Converte de JSON para Lua.' -COMMAND_JSON_TO_LUA_FAILED = -'Converção de JSON para Lua falhou: {}.' -COMMAND_ADD_DICT = -'Adicione uma palavra ao dicionário' -COMMAND_REFERENCE_COUNT = -- TODO: need translate! -'{} references' - -COMPLETION_IMPORT_FROM = -'Importa de {}.' -COMPLETION_DISABLE_AUTO_REQUIRE = -'Desativa auto require.' -COMPLETION_ASK_AUTO_REQUIRE = -'Adicione o código na parte superior do arquivo como auto require?' - -DEBUG_MEMORY_LEAK = -"{} Sinto muito pelo sério vazamento de memória. O serviço de idioma será reiniciado em breve." -DEBUG_RESTART_NOW = -'Reinicie agora' - -WINDOW_COMPILING = -'Compilando' -WINDOW_DIAGNOSING = -'Realizando diagnóstico' -WINDOW_INITIALIZING = -'Inicializando...' -WINDOW_PROCESSING_HOVER = -'Processando hover...' -WINDOW_PROCESSING_DEFINITION = -'Processando definições...' -WINDOW_PROCESSING_REFERENCE = -'Processando referências...' -WINDOW_PROCESSING_RENAME = -'Processando renomeações...' -WINDOW_PROCESSING_COMPLETION = -'Processando finalizações...' -WINDOW_PROCESSING_SIGNATURE = -'Processando ajuda de assinatura...' -WINDOW_PROCESSING_SYMBOL = -'Processando símbolos do arquivo...' -WINDOW_PROCESSING_WS_SYMBOL = -'Processando símbolos do espaço de trabalho...' -WINDOW_PROCESSING_SEMANTIC_FULL = -'Processando tokens semânticas completos...' -WINDOW_PROCESSING_SEMANTIC_RANGE = -'Processando tokens semânticas incrementais...' -WINDOW_PROCESSING_HINT = -'Processando dicas de lina...' -WINDOW_PROCESSING_BUILD_META = -- TODO: need translate! -'Processing build meta...' -WINDOW_INCREASE_UPPER_LIMIT = -'Aumente o limite superior' -WINDOW_CLOSE = -'Fechar' -WINDOW_SETTING_WS_DIAGNOSTIC = -'Você pode atrasar ou desativar os diagnósticos do espaço de trabalho nas configurações' -WINDOW_DONT_SHOW_AGAIN = -'Não mostre novamente' -WINDOW_DELAY_WS_DIAGNOSTIC = -'Diagnóstico de tempo ocioso (atraso de {} segundos)' -WINDOW_DISABLE_DIAGNOSTIC = -'Desativa diagnósticos do espaço de trabalho' -WINDOW_LUA_STATUS_WORKSPACE = -'Área de trabalho : {}' -WINDOW_LUA_STATUS_CACHED_FILES = -'Arquivos em cache: {ast}/{max}' -WINDOW_LUA_STATUS_MEMORY_COUNT = -'Uso de memória : {mem:.f}M' -WINDOW_LUA_STATUS_TIP = -[[ - -Este ícone é um gato, -não é um cachorro nem uma raposa! - ↓↓↓ -]] -WINDOW_LUA_STATUS_DIAGNOSIS_TITLE= -'Execute seu diagnóstico do espaço de trabalho' -WINDOW_LUA_STATUS_DIAGNOSIS_MSG = -'Você quer executar um diagnóstico do espaço de trabalho?' -WINDOW_APPLY_SETTING = -'Aplicar configuração' -WINDOW_CHECK_SEMANTIC = -'Se você estiver usando o tema de cores do market, talvez seja necessário modificar `editor.semanticHighlighting.enabled` para `true` para fazer com tokens semânticas sejam habilitados.' -WINDOW_TELEMETRY_HINT = -'Por favor, permita o envio de dados de uso e relatórios de erro anônimos para nos ajudar a melhorar ainda mais essa extensão. Leia nossa política de privacidade [aqui](https://github.com/LuaLS/lua-language-server/wiki/Home#privacy) .' -WINDOW_TELEMETRY_ENABLE = -'Permitir' -WINDOW_TELEMETRY_DISABLE = -'Desabilitar' -WINDOW_CLIENT_NOT_SUPPORT_CONFIG = -'Seu cliente não suporta configurações de modificação do lado do servidor, modifique manualmente as seguintes configurações:' -WINDOW_LCONFIG_NOT_SUPPORT_CONFIG= -'A modificação automática de configurações locais não é suportada atualmente, modifique manualmente as seguintes configurações:' -WINDOW_MANUAL_CONFIG_ADD = -'`{key}`: adiciona o elemento `{value:q}` ;' -WINDOW_MANUAL_CONFIG_SET = -'`{key}`: defini como `{value:q}` ;' -WINDOW_MANUAL_CONFIG_PROP = -'`{key}`: define a propriedade `{prop}` para `{value:q}`;' -WINDOW_APPLY_WHIT_SETTING = -'Aplicar e modificar configurações' -WINDOW_APPLY_WHITOUT_SETTING = -'Aplicar mas não modificar configurações' -WINDOW_ASK_APPLY_LIBRARY = -'Você precisa configurar seu ambiente de trabalho como `{}`?' -WINDOW_SEARCHING_IN_FILES = -- TODO: need translate! -'Procurando nos arquivos...' -WINDOW_CONFIG_LUA_DEPRECATED = -- TODO: need translate! -'`config.lua` is deprecated, please use `config.json` instead.' -WINDOW_CONVERT_CONFIG_LUA = -- TODO: need translate! -'Convert to `config.json`' -WINDOW_MODIFY_REQUIRE_PATH = -- TODO: need translate! -'Do you want to modify the require path?' -WINDOW_MODIFY_REQUIRE_OK = -- TODO: need translate! -'Modify' - -CONFIG_LOAD_FAILED = -'Não é possível ler o arquivo de configurações: {}' -CONFIG_LOAD_ERROR = -'Configurando o erro de carregamento do arquivo: {}' -CONFIG_TYPE_ERROR = -'O arquivo de configuração deve estar no formato LUA ou JSON: {}' -CONFIG_MODIFY_FAIL_SYNTAX_ERROR = -- TODO: need translate! -'Failed to modify settings, there are syntax errors in the settings file: {}' -CONFIG_MODIFY_FAIL_NO_WORKSPACE = -- TODO: need translate! -[[ -Failed to modify settings: -* The current mode is single-file mode, server cannot create `.luarc.json` without workspace. -* The language client dose not support modifying settings from the server side. - -Please modify following settings manually: -{} -]] -CONFIG_MODIFY_FAIL = -- TODO: need translate! -[[ -Failed to modify settings - -Please modify following settings manually: -{} -]] - -PLUGIN_RUNTIME_ERROR = -[[ -Ocorreu um erro no plugin, envie o erro ao autor do plugin. -Por favor, verifique os detalhes na saída ou log. -Caminho do plugin: {} -]] -PLUGIN_TRUST_LOAD = -[[ -As configurações atuais tentam carregar o plugin neste local: {} - -Note que plugins mal-intencionados podem prejudicar seu computador -]] -PLUGIN_TRUST_YES = -[[ -Confie e carregue este plugin -]] -PLUGIN_TRUST_NO = -[[ -Não carregue este plugin -]] - -CLI_CHECK_ERROR_TYPE = -'O argumento do CHECK deve ser uma string, mas é {}' -CLI_CHECK_ERROR_URI = -'O argumento do CHECK deve ser uma uri válida, mas é {}' -CLI_CHECK_ERROR_LEVEL = -'Checklevel deve ser um de: {}' -CLI_CHECK_INITING = -'Inicializando ...' -CLI_CHECK_SUCCESS = -'Diagnóstico completo, nenhum problema encontrado' -CLI_CHECK_RESULTS = -'Diagnóstico completo, {} problemas encontrados, veja {}' -CLI_DOC_INITING = -- TODO: need translate! -'Loading documents ...' -CLI_DOC_DONE = -- TODO: need translate! -[[ -Document exporting completed! -Raw data: {} -Markdown(example): {} -]] - -TYPE_ERROR_ENUM_GLOBAL_DISMATCH = -- TODO: need translate! -'Type `{child}` cannot match enumeration type of `{parent}`' -TYPE_ERROR_ENUM_GENERIC_UNSUPPORTED = -- TODO: need translate! -'Cannot use generic `{child}` in enumeration' -TYPE_ERROR_ENUM_LITERAL_DISMATCH = -- TODO: need translate! -'Literal `{child}` cannot match the enumeration value of `{parent}`' -TYPE_ERROR_ENUM_OBJECT_DISMATCH = -- TODO: need translate! -'The object `{child}` cannot match the enumeration value of `{parent}`. They must be the same object' -TYPE_ERROR_ENUM_NO_OBJECT = -- TODO: need translate! -'The passed in enumeration value `{child}` is not recognized' -TYPE_ERROR_INTEGER_DISMATCH = -- TODO: need translate! -'Literal `{child}` cannot match integer `{parent}`' -TYPE_ERROR_STRING_DISMATCH = -- TODO: need translate! -'Literal `{child}` cannot match string `{parent}`' -TYPE_ERROR_BOOLEAN_DISMATCH = -- TODO: need translate! -'Literal `{child}` cannot match boolean `{parent}`' -TYPE_ERROR_TABLE_NO_FIELD = -- TODO: need translate! -'Field `{key}` does not exist in the table' -TYPE_ERROR_TABLE_FIELD_DISMATCH = -- TODO: need translate! -'The type of field `{key}` is `{child}`, which cannot match `{parent}`' -TYPE_ERROR_CHILD_ALL_DISMATCH = -- TODO: need translate! -'All subtypes in `{child}` cannot match `{parent}`' -TYPE_ERROR_PARENT_ALL_DISMATCH = -- TODO: need translate! -'`{child}` cannot match any subtypes in `{parent}`' -TYPE_ERROR_UNION_DISMATCH = -- TODO: need translate! -'`{child}` cannot match `{parent}`' -TYPE_ERROR_OPTIONAL_DISMATCH = -- TODO: need translate! -'Optional type cannot match `{parent}`' -TYPE_ERROR_NUMBER_LITERAL_TO_INTEGER = -- TODO: need translate! -'The number `{child}` cannot be converted to an integer' -TYPE_ERROR_NUMBER_TYPE_TO_INTEGER = -- TODO: need translate! -'Cannot convert number type to integer type' -TYPE_ERROR_DISMATCH = -- TODO: need translate! -'Type `{child}` cannot match `{parent}`' - -LUADOC_DESC_CLASS = -- TODO: need translate! -[=[ -Defines a class/table structure -## Syntax -`---@class [: [, ]...]` -## Usage -``` ----@class Manager: Person, Human -Manager = {} -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#class) -]=] -LUADOC_DESC_TYPE = -- TODO: need translate! -[=[ -Specify the type of a certain variable - -Default types: `nil`, `any`, `boolean`, `string`, `number`, `integer`, -`function`, `table`, `thread`, `userdata`, `lightuserdata` - -(Custom types can be provided using `@alias`) - -## Syntax -`---@type [| [type]...` - -## Usage -### General -``` ----@type nil|table|myClass -local Example = nil -``` - -### Arrays -``` ----@type number[] -local phoneNumbers = {} -``` - -### Enums -``` ----@type "red"|"green"|"blue" -local color = "" -``` - -### Tables -``` ----@type table -local settings = { - disableLogging = true, - preventShutdown = false, -} - ----@type { [string]: true } -local x --x[""] is true -``` - -### Functions -``` ----@type fun(mode?: "r"|"w"): string -local myFunction -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#types-and-type) -]=] -LUADOC_DESC_ALIAS = -- TODO: need translate! -[=[ -Create your own custom type that can be used with `@param`, `@type`, etc. - -## Syntax -`---@alias [description]`\ -or -``` ----@alias ----| 'value' [# comment] ----| 'value2' [# comment] -... -``` - -## Usage -### Expand to other type -``` ----@alias filepath string Path to a file - ----@param path filepath Path to the file to search in -function find(path, pattern) end -``` - -### Enums -``` ----@alias font-style ----| '"underlined"' # Underline the text ----| '"bold"' # Bolden the text ----| '"italic"' # Make the text italicized - ----@param style font-style Style to apply -function setFontStyle(style) end -``` - -### Literal Enum -``` -local enums = { - READ = 0, - WRITE = 1, - CLOSED = 2 -} - ----@alias FileStates ----| `enums.READ` ----| `enums.WRITE` ----| `enums.CLOSE` -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#alias) -]=] -LUADOC_DESC_PARAM = -- TODO: need translate! -[=[ -Declare a function parameter - -## Syntax -`@param [?] [comment]` - -## Usage -### General -``` ----@param url string The url to request ----@param headers? table HTTP headers to send ----@param timeout? number Timeout in seconds -function get(url, headers, timeout) end -``` - -### Variable Arguments -``` ----@param base string The base to concat to ----@param ... string The values to concat -function concat(base, ...) end -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#param) -]=] -LUADOC_DESC_RETURN = -- TODO: need translate! -[=[ -Declare a return value - -## Syntax -`@return [name] [description]`\ -or\ -`@return [# description]` - -## Usage -### General -``` ----@return number ----@return number # The green component ----@return number b The blue component -function hexToRGB(hex) end -``` - -### Type & name only -``` ----@return number x, number y -function getCoords() end -``` - -### Type only -``` ----@return string, string -function getFirstLast() end -``` - -### Return variable values -``` ----@return string ... The tags of the item -function getTags(item) end -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#return) -]=] -LUADOC_DESC_FIELD = -- TODO: need translate! -[=[ -Declare a field in a class/table. This allows you to provide more in-depth -documentation for a table. As of `v3.6.0`, you can mark a field as `private`, -`protected`, `public`, or `package`. - -## Syntax -`---@field [description]` - -## Usage -``` ----@class HTTP_RESPONSE ----@field status HTTP_STATUS ----@field headers table The headers of the response - ----@class HTTP_STATUS ----@field code number The status code of the response ----@field message string A message reporting the status - ----@return HTTP_RESPONSE response The response from the server -function get(url) end - ---This response variable has all of the fields defined above -response = get("localhost") - ---Extension provided intellisense for the below assignment -statusCode = response.status.code -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#field) -]=] -LUADOC_DESC_GENERIC = -- TODO: need translate! -[=[ -Simulates generics. Generics can allow types to be re-used as they help define -a "generic shape" that can be used with different types. - -## Syntax -`---@generic [:parent_type] [, [:parent_type]]` - -## Usage -### General -``` ----@generic T ----@param value T The value to return ----@return T value The exact same value -function echo(value) - return value -end - --- Type is string -s = echo("e") - --- Type is number -n = echo(10) - --- Type is boolean -b = echo(true) - --- We got all of this info from just using --- @generic rather than manually specifying --- each allowed type -``` - -### Capture name of generic type -``` ----@class Foo -local Foo = {} -function Foo:Bar() end - ----@generic T ----@param name `T` # the name generic type is captured here ----@return T # generic type is returned -function Generic(name) end - -local v = Generic("Foo") -- v is an object of Foo -``` - -### How Lua tables use generics -``` ----@class table: { [K]: V } - --- This is what allows us to create a table --- and intellisense keeps track of any type --- we give for key (K) or value (V) -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#generics-and-generic) -]=] -LUADOC_DESC_VARARG = -- TODO: need translate! -[=[ -Primarily for legacy support for EmmyLua annotations. `@vararg` does not -provide typing or allow descriptions. - -**You should instead use `@param` when documenting parameters (variable or not).** - -## Syntax -`@vararg ` - -## Usage -``` ----Concat strings together ----@vararg string -function concat(...) end -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#vararg) -]=] -LUADOC_DESC_OVERLOAD = -- TODO: need translate! -[=[ -Allows defining of multiple function signatures. - -## Syntax -`---@overload fun([: ] [, [: ]]...)[: [, ]...]` - -## Usage -``` ----@overload fun(t: table, value: any): number -function table.insert(t, position, value) end -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#overload) -]=] -LUADOC_DESC_DEPRECATED = -- TODO: need translate! -[=[ -Marks a function as deprecated. This results in any deprecated function calls -being ~~struck through~~. - -## Syntax -`---@deprecated` - ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#deprecated) -]=] -LUADOC_DESC_META = -- TODO: need translate! -[=[ -Indicates that this is a meta file and should be used for definitions and intellisense only. - -There are 3 main distinctions to note with meta files: -1. There won't be any context-based intellisense in a meta file -2. Hovering a `require` filepath in a meta file shows `[meta]` instead of an absolute path -3. The `Find Reference` function will ignore meta files - -## Syntax -`---@meta` - ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#meta) -]=] -LUADOC_DESC_VERSION = -- TODO: need translate! -[=[ -Specifies Lua versions that this function is exclusive to. - -Lua versions: `5.1`, `5.2`, `5.3`, `5.4`, `JIT`. - -Requires configuring the `Diagnostics: Needed File Status` setting. - -## Syntax -`---@version [, ]...` - -## Usage -### General -``` ----@version JIT -function onlyWorksInJIT() end -``` -### Specify multiple versions -``` ----@version <5.2,JIT -function oldLuaOnly() end -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#version) -]=] -LUADOC_DESC_SEE = -- TODO: need translate! -[=[ -Define something that can be viewed for more information - -## Syntax -`---@see ` - ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#see) -]=] -LUADOC_DESC_DIAGNOSTIC = -- TODO: need translate! -[=[ -Enable/disable diagnostics for error/warnings/etc. - -Actions: `disable`, `enable`, `disable-line`, `disable-next-line` - -[Names](https://github.com/LuaLS/lua-language-server/blob/cbb6e6224094c4eb874ea192c5f85a6cba099588/script/proto/define.lua#L54) - -## Syntax -`---@diagnostic [: ]` - -## Usage -### Disable next line -``` ----@diagnostic disable-next-line: undefined-global -``` - -### Manually toggle -``` ----@diagnostic disable: unused-local -local unused = "hello world" ----@diagnostic enable: unused-local -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#diagnostic) -]=] -LUADOC_DESC_MODULE = -- TODO: need translate! -[=[ -Provides the semantics of `require`. - -## Syntax -`---@module <'module_name'>` - -## Usage -``` ----@module 'string.utils' -local stringUtils --- This is functionally the same as: -local module = require('string.utils') -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#module) -]=] -LUADOC_DESC_ASYNC = -- TODO: need translate! -[=[ -Marks a function as asynchronous. - -## Syntax -`---@async` - ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#async) -]=] -LUADOC_DESC_NODISCARD = -- TODO: need translate! -[=[ -Prevents this function's return values from being discarded/ignored. -This will raise the `discard-returns` warning should the return values -be ignored. - -## Syntax -`---@nodiscard` - ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#nodiscard) -]=] -LUADOC_DESC_CAST = -- TODO: need translate! -[=[ -Allows type casting (type conversion). - -## Syntax -`@cast <[+|-]type>[, <[+|-]type>]...` - -## Usage -### Overwrite type -``` ----@type integer -local x --> integer - ----@cast x string -print(x) --> string -``` -### Add Type -``` ----@type string -local x --> string - ----@cast x +boolean, +number -print(x) --> string|boolean|number -``` -### Remove Type -``` ----@type string|table -local x --> string|table - ----@cast x -string -print(x) --> table -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#cast) -]=] -LUADOC_DESC_OPERATOR = -- TODO: need translate! -[=[ -Provide type declaration for [operator metamethods](http://lua-users.org/wiki/MetatableEvents). - -## Syntax -`@operator [(input_type)]:` - -## Usage -### Vector Add Metamethod -``` ----@class Vector ----@operation add(Vector):Vector - -vA = Vector.new(1, 2, 3) -vB = Vector.new(10, 20, 30) - -vC = vA + vB ---> Vector -``` -### Unary Minus -``` ----@class Passcode ----@operation unm:integer - -pA = Passcode.new(1234) -pB = -pA ---> integer -``` -[View Request](https://github.com/LuaLS/lua-language-server/issues/599) -]=] -LUADOC_DESC_ENUM = -- TODO: need translate! -[=[ -Mark a table as an enum. If you want an enum but can't define it as a Lua -table, take a look at the [`@alias`](https://github.com/LuaLS/lua-language-server/wiki/Annotations#alias) -tag. - -## Syntax -`@enum ` - -## Usage -``` ----@enum colors -local colors = { - white = 0, - orange = 2, - yellow = 4, - green = 8, - black = 16, -} - ----@param color colors -local function setColor(color) end - --- Completion and hover is provided for the below param -setColor(colors.green) -``` -]=] -LUADOC_DESC_PACKAGE = -- TODO: need translate! -[=[ -Mark a function as private to the file it is defined in. A packaged function -cannot be accessed from another file. - -## Syntax -`@package` - -## Usage -``` ----@class Animal ----@field private eyes integer -local Animal = {} - ----@package ----This cannot be accessed in another file -function Animal:eyesCount() - return self.eyes -end -``` -]=] -LUADOC_DESC_PRIVATE = -- TODO: need translate! -[=[ -Mark a function as private to a @class. Private functions can be accessed only -from within their class and are not accessable from child classes. - -## Syntax -`@private` - -## Usage -``` ----@class Animal ----@field private eyes integer -local Animal = {} - ----@private -function Animal:eyesCount() - return self.eyes -end - ----@class Dog:Animal -local myDog = {} - ----NOT PERMITTED! -myDog:eyesCount(); -``` -]=] -LUADOC_DESC_PROTECTED = -- TODO: need translate! -[=[ -Mark a function as protected within a @class. Protected functions can be -accessed only from within their class or from child classes. - -## Syntax -`@protected` - -## Usage -``` ----@class Animal ----@field private eyes integer -local Animal = {} - ----@protected -function Animal:eyesCount() - return self.eyes -end - ----@class Dog:Animal -local myDog = {} - ----Permitted because function is protected, not private. -myDog:eyesCount(); -``` -]=] diff --git a/.building/lua-language-server-3.6.18-win32-x64/locale/pt-br/setting.lua b/.building/lua-language-server-3.6.18-win32-x64/locale/pt-br/setting.lua deleted file mode 100644 index 759048725..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/locale/pt-br/setting.lua +++ /dev/null @@ -1,430 +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.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['invisible'] = -- TODO: need translate! -'Enable diagnostics for accesses to fields which are invisible.' -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['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.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 ...' diff --git a/.building/lua-language-server-3.6.18-win32-x64/locale/zh-cn/meta.lua b/.building/lua-language-server-3.6.18-win32-x64/locale/zh-cn/meta.lua deleted file mode 100644 index c4b5fbb65..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/locale/zh-cn/meta.lua +++ /dev/null @@ -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` 处开始统计)。' diff --git a/.building/lua-language-server-3.6.18-win32-x64/locale/zh-cn/script.lua b/.building/lua-language-server-3.6.18-win32-x64/locale/zh-cn/script.lua deleted file mode 100644 index 531b54ae5..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/locale/zh-cn/script.lua +++ /dev/null @@ -1,1256 +0,0 @@ -DIAG_LINE_ONLY_SPACE = -'只有空格的空行。' -DIAG_LINE_POST_SPACE = -'后置空格。' -DIAG_UNUSED_LOCAL = -'未使用的局部变量 `{}`。' -DIAG_UNDEF_GLOBAL = -'未定义的全局变量 `{}`。' -DIAG_UNDEF_FIELD = -'未定义的属性/字段 `{}`。' -DIAG_UNDEF_ENV_CHILD = -'未定义的变量 `{}`(重载了 `_ENV` )。' -DIAG_UNDEF_FENV_CHILD = -'未定义的变量 `{}`(处于模块中)。' -DIAG_GLOBAL_IN_NIL_ENV = -'不能使用全局变量(`_ENV`被置为了`nil`)。' -DIAG_GLOBAL_IN_NIL_FENV = -'不能使用全局变量(模块被置为了`nil`)。' -DIAG_UNUSED_LABEL = -'未使用的标签 `{}`。' -DIAG_UNUSED_FUNCTION = -'未使用的函数。' -DIAG_UNUSED_VARARG = -'未使用的不定参数。' -DIAG_REDEFINED_LOCAL = -'重定义局部变量 `{}`。' -DIAG_DUPLICATE_INDEX = -'重复的索引 `{}`。' -DIAG_DUPLICATE_METHOD = -'重复的方法 `{}`。' -DIAG_PREVIOUS_CALL = -'会被解释为 `{}{}`。你可能需要加一个 `;`。' -DIAG_PREFIELD_CALL = -'会被解释为 `{}{}`。你可能需要加一个`,`或`;`。' -DIAG_OVER_MAX_ARGS = -'函数最多接收 {:d} 个参数,但获得了 {:d} 个。' -DIAG_MISS_ARGS = -'函数最少接收 {:d} 个参数,但获得了 {:d} 个。' -DIAG_OVER_MAX_VALUES = -'只有 {} 个变量,但你设置了 {} 个值。' -DIAG_AMBIGUITY_1 = -'会优先运算 `{}`,你可能需要加个括号。' -DIAG_LOWERCASE_GLOBAL = -'首字母小写的全局变量,你是否漏了 `local` 或是有拼写错误?' -DIAG_EMPTY_BLOCK = -'空代码块' -DIAG_DIAGNOSTICS = -'Lua 诊断' -DIAG_SYNTAX_CHECK = -'Lua 语法检查' -DIAG_NEED_VERSION = -'在 {} 中是合法的,当前为 {}' -DIAG_DEFINED_VERSION = -'在 {} 中有定义,当前为 {}' -DIAG_DEFINED_CUSTOM = -'在 {} 中有定义' -DIAG_DUPLICATE_CLASS = -'重复定义的 Class `{}`。' -DIAG_UNDEFINED_CLASS = -'未定义的 Class `{}`。' -DIAG_CYCLIC_EXTENDS = -'循环继承。' -DIAG_INEXISTENT_PARAM = -'不存在的参数。' -DIAG_DUPLICATE_PARAM = -'重复的参数。' -DIAG_NEED_CLASS = -'需要先定义 Class 。' -DIAG_DUPLICATE_SET_FIELD= -'重复定义的字段 `{}`。' -DIAG_SET_CONST = -'不能对常量赋值。' -DIAG_SET_FOR_STATE = -'修改了循环变量。' -DIAG_CODE_AFTER_BREAK = -'无法执行到 `break` 后的代码。' -DIAG_UNBALANCED_ASSIGNMENTS = -'由于值的数量不够而被赋值为了 `nil` 。在Lua中, `x, y = 1` 等价于 `x, y = 1, nil` 。' -DIAG_REQUIRE_LIKE = -'你可以在设置中将 `{}` 视为 `require`。' -DIAG_COSE_NON_OBJECT = -'无法 close 此类型的值。(除非给此类型设置 `__close` 元方法)' -DIAG_COUNT_DOWN_LOOP = -'你的意思是 `{}` 吗?' -DIAG_UNKNOWN = -'无法推测出类型。' -DIAG_DEPRECATED = -'已废弃。' -DIAG_DIFFERENT_REQUIRES = -'使用了不同的名字 require 了同一个文件。' -DIAG_REDUNDANT_RETURN = -'冗余返回。' -DIAG_AWAIT_IN_SYNC = -'只能在标记为异步的函数中调用异步函数。' -DIAG_NOT_YIELDABLE = -'此函数的第 {} 个参数没有被标记为可让出,但是传入了异步函数。(使用 `---@param name async fun()` 来标记为可让出)' -DIAG_DISCARD_RETURNS = -'不能丢弃此函数的返回值。' -DIAG_NEED_CHECK_NIL = -'需要判空。' -DIAG_CIRCLE_DOC_CLASS = -'循环继承的类。' -DIAG_DOC_FIELD_NO_CLASS = -'字段必须定义在类之后。' -DIAG_DUPLICATE_DOC_ALIAS = -'重复定义的别名 `{}`。' -DIAG_DUPLICATE_DOC_FIELD = -'重复定义的字段 `{}`。' -DIAG_DUPLICATE_DOC_PARAM = -'重复指向的参数 `{}`。' -DIAG_UNDEFINED_DOC_CLASS = -'未定义的类 `{}`。' -DIAG_UNDEFINED_DOC_NAME = -'未定义的类型或别名 `{}`。' -DIAG_UNDEFINED_DOC_PARAM = -'指向了未定义的参数 `{}`。' -DIAG_UNKNOWN_DIAG_CODE = -'未知的诊断代号 `{}`。' -DIAG_CAST_LOCAL_TYPE = -'已显式定义变量的类型为 `{def}` ,不能再将其类型转换为 `{ref}`。' -DIAG_CAST_FIELD_TYPE = -'已显式定义字段的类型为 `{def}` ,不能再将其类型转换为 `{ref}`。' -DIAG_ASSIGN_TYPE_MISMATCH = -'不能将 `{ref}` 赋值给 `{def}`。' -DIAG_PARAM_TYPE_MISMATCH = -'不能将 `{ref}` 赋给参数 `{def}`。' -DIAG_UNKNOWN_CAST_VARIABLE = -'未知的类型转换变量 `{}`。' -DIAG_CAST_TYPE_MISMATCH = -'不能将 `{def}` 转换为 `{ref}`。' -DIAG_MISSING_RETURN_VALUE = -'至少需要 {min} 个返回值,但此处只返回 {rmax} 个值。' -DIAG_MISSING_RETURN_VALUE_RANGE = -'至少需要 {min} 个返回值,但此处只返回 {rmin} 到 {rmax} 个值。' -DIAG_REDUNDANT_RETURN_VALUE = -'最多只有 {max} 个返回值,但此处返回了第 {rmax} 个值。' -DIAG_REDUNDANT_RETURN_VALUE_RANGE = -'最多只有 {max} 个返回值,但此处返回了第 {rmin} 到第 {rmax} 个值。' -DIAG_MISSING_RETURN = -'此处需要返回值。' -DIAG_RETURN_TYPE_MISMATCH = -'第 {index} 个返回值的类型为 `{def}` ,但实际返回的是 `{ref}`。' -DIAG_UNKNOWN_OPERATOR = -'未知的运算符 `{}`。' -DIAG_UNREACHABLE_CODE = -'不可达的代码。' -DIAG_INVISIBLE_PRIVATE = -'字段 `{field}` 是私有的,只能在 `{class}` 类中才能访问。' -DIAG_INVISIBLE_PROTECTED = -'字段 `{field}` 受到保护,只能在 `{class}` 类极其子类中才能访问。' -DIAG_INVISIBLE_PACKAGE = -'字段 `{field}` 只能在相同的文件 `{uri}` 中才能访问。' - -MWS_NOT_SUPPORT = -'{} 目前还不支持多工作目录,我可能需要重启才能支持新的工作目录...' -MWS_RESTART = -'重启' -MWS_NOT_COMPLETE = -'工作目录还没有准备好,你可以稍后再试一下...' -MWS_COMPLETE = -'工作目录准备好了,你可以再试一下了...' -MWS_MAX_PRELOAD = -'预加载文件数已达上限({}),你需要手动打开需要加载的文件。' -MWS_UCONFIG_FAILED = -'用户配置保存失败。' -MWS_UCONFIG_UPDATED = -'用户配置已更新。' -MWS_WCONFIG_UPDATED = -'工作区配置已更新。' - -WORKSPACE_SKIP_LARGE_FILE = -'已跳过过大的文件:{}。当前设置的大小限制为:{} KB,该文件大小为:{} KB' -WORKSPACE_LOADING = -'正在加载工作目录' -WORKSPACE_DIAGNOSTIC = -'正在对工作目录进行诊断' -WORKSPACE_SKIP_HUGE_FILE = -'出于性能考虑,已停止对此文件解析:{}' -WORKSPACE_NOT_ALLOWED = -'你的工作目录被设置为了 `{}`,Lua语言服务拒绝加载此目录,请检查你的配置。[了解更多](https://github.com/LuaLS/lua-language-server/wiki/FAQ#why-is-the-server-scanning-the-wrong-folder)' -WORKSPACE_SCAN_TOO_MUCH = -'已扫描了超过 {} 个文件,当前扫描的目录为 `{}`,请确认配置是否正确。' - -PARSER_CRASH = -'语法解析崩溃了!遗言:{}' -PARSER_UNKNOWN = -'未知语法错误...' -PARSER_MISS_NAME = -'缺少名称。' -PARSER_UNKNOWN_SYMBOL = -'未知符号`{symbol}`。' -PARSER_MISS_SYMBOL = -'缺少符号`{symbol}`。' -PARSER_MISS_ESC_X = -'必须是2个16进制字符。' -PARSER_UTF8_SMALL = -'至少有1个字符。' -PARSER_UTF8_MAX = -'必须在 {min} 与 {max} 之间。' -PARSER_ERR_ESC = -'错误的转义符。' -PARSER_MUST_X16 = -'必须是16进制字符。' -PARSER_MISS_EXPONENT = -'缺少指数部分。' -PARSER_MISS_EXP = -'缺少表达式。' -PARSER_MISS_FIELD = -'缺少字段/属性名。' -PARSER_MISS_METHOD = -'缺少方法名。' -PARSER_ARGS_AFTER_DOTS = -'`...`必须是最后一个参数。' -PARSER_KEYWORD = -'关键字无法作为名称。' -PARSER_EXP_IN_ACTION = -'该表达式不能作为语句。' -PARSER_BREAK_OUTSIDE = -'`break`必须在循环内部。' -PARSER_MALFORMED_NUMBER = -'无法构成有效数字。' -PARSER_ACTION_AFTER_RETURN = -'`return`之后不能再执行代码。' -PARSER_ACTION_AFTER_BREAK = -'`break`之后不能再执行代码。' -PARSER_NO_VISIBLE_LABEL = -'标签`{label}`不可见。' -PARSER_REDEFINE_LABEL = -'标签`{label}`重复定义。' -PARSER_UNSUPPORT_SYMBOL = -'{version} 不支持该符号。' -PARSER_UNEXPECT_DOTS = -'`...`只能在不定参函数中使用。' -PARSER_UNEXPECT_SYMBOL = -'未知的符号 `{symbol}` 。' -PARSER_UNKNOWN_TAG = -'不支持的属性。' -PARSER_MULTI_TAG = -'只能设置一个属性。' -PARSER_UNEXPECT_LFUNC_NAME = -'局部函数只能使用标识符作为名称。' -PARSER_UNEXPECT_EFUNC_NAME = -'函数作为表达式时不能命名。' -PARSER_ERR_LCOMMENT_END = -'应使用`{symbol}`来关闭多行注释。' -PARSER_ERR_C_LONG_COMMENT = -'Lua应使用`--[[ ]]`来进行多行注释。' -PARSER_ERR_LSTRING_END = -'应使用`{symbol}`来关闭长字符串。' -PARSER_ERR_ASSIGN_AS_EQ = -'应使用`=`来进行赋值操作。' -PARSER_ERR_EQ_AS_ASSIGN = -'应使用`==`来进行等于判断。' -PARSER_ERR_UEQ = -'应使用`~=`来进行不等于判断。' -PARSER_ERR_THEN_AS_DO = -'应使用`then`。' -PARSER_ERR_DO_AS_THEN = -'应使用`do`。' -PARSER_MISS_END = -'缺少对应的`end`。' -PARSER_ERR_COMMENT_PREFIX = -'Lua应使用`--`来进行注释。' -PARSER_MISS_SEP_IN_TABLE = -'需要用`,`或`;`进行分割。' -PARSER_SET_CONST = -'不能对常量赋值。' -PARSER_UNICODE_NAME = -'包含了 Unicode 字符。' -PARSER_ERR_NONSTANDARD_SYMBOL = -'Lua中应使用符号 `{symbol}`。' -PARSER_MISS_SPACE_BETWEEN = -'符号之间必须保留空格' -PARSER_INDEX_IN_FUNC_NAME = -'命名函数的名称中不能使用 `[name]` 形式。' -PARSER_UNKNOWN_ATTRIBUTE = -'局部变量属性应该是 `const` 或 `close`' -PARSER_AMBIGUOUS_SYNTAX = -'在 Lua 5.1 中,函数调用的左括号必须与函数在同一行。' -PARSER_NEED_PAREN = -'需要添加一对括号。' -PARSER_NESTING_LONG_MARK = -'Lua 5.1 中不允许使用嵌套的 `[[...]]` 。' -PARSER_LOCAL_LIMIT = -'只能同时存在200个活跃的局部变量与上值。' -PARSER_LUADOC_MISS_CLASS_NAME = -'缺少类名称。' -PARSER_LUADOC_MISS_EXTENDS_SYMBOL = -'缺少符号 `:`。' -PARSER_LUADOC_MISS_CLASS_EXTENDS_NAME = -'缺少要继承的类名称。' -PARSER_LUADOC_MISS_SYMBOL = -'缺少符号 `{symbol}`。' -PARSER_LUADOC_MISS_ARG_NAME = -'缺少参数名称。' -PARSER_LUADOC_MISS_TYPE_NAME = -'缺少类型名。' -PARSER_LUADOC_MISS_ALIAS_NAME = -'缺少别名。' -PARSER_LUADOC_MISS_ALIAS_EXTENDS = -'缺少别名定义。' -PARSER_LUADOC_MISS_PARAM_NAME = -'缺少要指向的参数名称。' -PARSER_LUADOC_MISS_PARAM_EXTENDS = -'缺少参数的类型定义。' -PARSER_LUADOC_MISS_FIELD_NAME = -'缺少字段名称。' -PARSER_LUADOC_MISS_FIELD_EXTENDS = -'缺少字段的类型定义。' -PARSER_LUADOC_MISS_GENERIC_NAME = -'缺少泛型名称。' -PARSER_LUADOC_MISS_GENERIC_EXTENDS_NAME = -'缺少泛型要继承的类名称。' -PARSER_LUADOC_MISS_VARARG_TYPE = -'缺少不定参的类型定义。' -PARSER_LUADOC_MISS_FUN_AFTER_OVERLOAD = -'缺少关键字 `fun`。' -PARSER_LUADOC_MISS_CATE_NAME = -'缺少文档类型名称。' -PARSER_LUADOC_MISS_DIAG_MODE = -'缺少诊断模式。' -PARSER_LUADOC_ERROR_DIAG_MODE = -'诊断模式不正确。' -PARSER_LUADOC_MISS_LOCAL_NAME = -'缺少变量名。' - -SYMBOL_ANONYMOUS = -'<匿名函数>' - -HOVER_VIEW_DOCUMENTS = -'查看文档' -HOVER_DOCUMENT_LUA51 = -'http://www.lua.org/manual/5.1/manual.html#{}' -HOVER_DOCUMENT_LUA52 = -'http://www.lua.org/manual/5.2/manual.html#{}' -HOVER_DOCUMENT_LUA53 = -'http://cloudwu.github.io/lua53doc/manual.html#{}' -HOVER_DOCUMENT_LUA54 = -'http://www.lua.org/manual/5.4/manual.html#{}' -HOVER_DOCUMENT_LUAJIT = -'http://www.lua.org/manual/5.1/manual.html#{}' -HOVER_NATIVE_DOCUMENT_LUA51 = -'command:extension.lua.doc?["en-us/51/manual.html/{}"]' -HOVER_NATIVE_DOCUMENT_LUA52 = -'command:extension.lua.doc?["en-us/52/manual.html/{}"]' -HOVER_NATIVE_DOCUMENT_LUA53 = -'command:extension.lua.doc?["zh-cn/53/manual.html/{}"]' -HOVER_NATIVE_DOCUMENT_LUA54 = -'command:extension.lua.doc?["en-us/54/manual.html/{}"]' -HOVER_NATIVE_DOCUMENT_LUAJIT = -'command:extension.lua.doc?["en-us/51/manual.html/{}"]' -HOVER_MULTI_PROTOTYPE = -'({} 个原型)' -HOVER_STRING_BYTES = -'{} 个字节' -HOVER_STRING_CHARACTERS = -'{} 个字节,{} 个字符' -HOVER_MULTI_DEF_PROTO = -'({} 个定义,{} 个原型)' -HOVER_MULTI_PROTO_NOT_FUNC = -'({} 个非函数定义)' -HOVER_USE_LUA_PATH = -'(搜索路径: `{}`)' -HOVER_EXTENDS = -'展开为 {}' -HOVER_TABLE_TIME_UP = -'出于性能考虑,已禁用了部分类型推断。' -HOVER_WS_LOADING = -'正在加载工作目录:{} / {}' -HOVER_AWAIT_TOOLTIP = -'正在调用异步函数,可能会让出当前协程' - -ACTION_DISABLE_DIAG = -'在工作区禁用诊断 ({})。' -ACTION_MARK_GLOBAL = -'标记 `{}` 为已定义的全局变量。' -ACTION_REMOVE_SPACE = -'清除所有后置空格。' -ACTION_ADD_SEMICOLON = -'添加 `;` 。' -ACTION_ADD_BRACKETS = -'添加括号。' -ACTION_RUNTIME_VERSION = -'修改运行版本为 {} 。' -ACTION_OPEN_LIBRARY = -'加载 {} 中的全局变量。' -ACTION_ADD_DO_END = -'添加 `do ... end` 。' -ACTION_FIX_LCOMMENT_END = -'改用正确的多行注释关闭符号。' -ACTION_ADD_LCOMMENT_END = -'关闭多行注释。' -ACTION_FIX_C_LONG_COMMENT = -'修改为 Lua 的多行注释格式。' -ACTION_FIX_LSTRING_END = -'改用正确的长字符串关闭符号。' -ACTION_ADD_LSTRING_END = -'关闭长字符串。' -ACTION_FIX_ASSIGN_AS_EQ = -'改为 `=` 。' -ACTION_FIX_EQ_AS_ASSIGN = -'改为 `==` 。' -ACTION_FIX_UEQ = -'改为 `~=` 。' -ACTION_FIX_THEN_AS_DO = -'改为 `then` 。' -ACTION_FIX_DO_AS_THEN = -'改为 `do` 。' -ACTION_ADD_END = -'添加 `end` (根据缩进推测添加位置)。' -ACTION_FIX_COMMENT_PREFIX = -'改为 `--` 。' -ACTION_FIX_NONSTANDARD_SYMBOL = -'改为 `{symbol}`' -ACTION_RUNTIME_UNICODE_NAME = -'允许使用 Unicode 字符。' -ACTION_SWAP_PARAMS = -'将其改为 `{node}` 的第 {index} 个参数' -ACTION_FIX_INSERT_SPACE = -'插入空格' -ACTION_JSON_TO_LUA = -'把 JSON 转成 Lua' -ACTION_DISABLE_DIAG_LINE= -'在此行禁用诊断 ({})。' -ACTION_DISABLE_DIAG_FILE= -'在此文件禁用诊断 ({})。' -ACTION_MARK_ASYNC = -'将当前函数标记为异步。' -ACTION_ADD_DICT = -'将 \'{}\' 添加到工作区的词典中。' -ACTION_FIX_ADD_PAREN = -'添加括号。' - -COMMAND_DISABLE_DIAG = -'禁用诊断' -COMMAND_MARK_GLOBAL = -'标记全局变量' -COMMAND_REMOVE_SPACE = -'清除所有后置空格' -COMMAND_ADD_BRACKETS = -'添加括号' -COMMAND_RUNTIME_VERSION = -'修改运行版本' -COMMAND_OPEN_LIBRARY = -'加载第三方库中的全局变量' -COMMAND_UNICODE_NAME = -'允许使用 Unicode 字符' -COMMAND_JSON_TO_LUA = -'JSON 转 Lua' -COMMAND_JSON_TO_LUA_FAILED = -'JSON 转 Lua 失败:{}' -COMMAND_ADD_DICT = -- TODO: need translate! -'Add Word to dictionary' -COMMAND_REFERENCE_COUNT = -'{} 个引用' - -COMPLETION_IMPORT_FROM = -'从 {} 中导入' -COMPLETION_DISABLE_AUTO_REQUIRE = -'禁用自动require' -COMPLETION_ASK_AUTO_REQUIRE = -'在文件顶部添加代码 require 此文件?' - -DEBUG_MEMORY_LEAK = -'{} 很抱歉发生了严重的内存泄漏,语言服务即将重启。' -DEBUG_RESTART_NOW = -'立即重启' - -WINDOW_COMPILING = -'正在编译' -WINDOW_DIAGNOSING = -'正在诊断' -WINDOW_INITIALIZING = -'正在初始化...' -WINDOW_PROCESSING_HOVER = -'正在处理悬浮提示...' -WINDOW_PROCESSING_DEFINITION = -'正在处理转到定义...' -WINDOW_PROCESSING_REFERENCE = -'正在处理转到引用...' -WINDOW_PROCESSING_RENAME = -'正在处理重命名...' -WINDOW_PROCESSING_COMPLETION = -'正在处理自动完成...' -WINDOW_PROCESSING_SIGNATURE = -'正在处理参数提示...' -WINDOW_PROCESSING_SYMBOL = -'正在处理文件符号...' -WINDOW_PROCESSING_WS_SYMBOL = -'正在处理工作区符号...' -WINDOW_PROCESSING_SEMANTIC_FULL = -'正在处理全量语义着色...' -WINDOW_PROCESSING_SEMANTIC_RANGE = -'正在处理差量语义着色...' -WINDOW_PROCESSING_HINT = -'正在处理内联提示...' -WINDOW_PROCESSING_BUILD_META = -'正在处理编译器元数据...' -WINDOW_INCREASE_UPPER_LIMIT = -'增加上限' -WINDOW_CLOSE = -'关闭' -WINDOW_SETTING_WS_DIAGNOSTIC = -'你可以在设置中延迟或禁用工作目录诊断' -WINDOW_DONT_SHOW_AGAIN = -'不再提示' -WINDOW_DELAY_WS_DIAGNOSTIC = -'空闲时诊断(延迟{}秒)' -WINDOW_DISABLE_DIAGNOSTIC = -'禁用工作区诊断' -WINDOW_LUA_STATUS_WORKSPACE = -'工作区:{}' -WINDOW_LUA_STATUS_CACHED_FILES = -'已缓存文件:{ast}/{max}' -WINDOW_LUA_STATUS_MEMORY_COUNT = -'内存占用:{mem:.f}M' -WINDOW_LUA_STATUS_TIP = -[[ - -这个图标是猫, -不是狗也不是狐狸! - ↓↓↓ -]] -WINDOW_LUA_STATUS_DIAGNOSIS_TITLE= -'进行工作区诊断' -WINDOW_LUA_STATUS_DIAGNOSIS_MSG = -'是否进行工作区诊断?' -WINDOW_APPLY_SETTING = -'应用设置' -WINDOW_CHECK_SEMANTIC = -'如果你正在使用市场中的颜色主题,你可能需要同时修改 `editor.semanticHighlighting.enabled` 选项为 `true` 才会使语义着色生效。' -WINDOW_TELEMETRY_HINT = -'请允许发送匿名的使用数据与错误报告,帮助我们进一步完善此插件。在[此处](https://github.com/LuaLS/lua-language-server/wiki/Home#privacy)阅读我们的隐私声明。' -WINDOW_TELEMETRY_ENABLE = -'允许' -WINDOW_TELEMETRY_DISABLE = -'禁止' -WINDOW_CLIENT_NOT_SUPPORT_CONFIG = -'你的客户端不支持从服务侧修改设置,请手动修改如下设置:' -WINDOW_LCONFIG_NOT_SUPPORT_CONFIG= -'暂不支持自动修改本地设置,请手动修改如下设置:' -WINDOW_MANUAL_CONFIG_ADD = -'为 `{key}` 添加元素 `{value:q}`;' -WINDOW_MANUAL_CONFIG_SET = -'将 `{key}` 的值设置为 `{value:q}`;' -WINDOW_MANUAL_CONFIG_PROP = -'将 `{key}` 的属性 `{prop}` 设置为 `{value:q}`;' -WINDOW_APPLY_WHIT_SETTING = -'应用并修改设置' -WINDOW_APPLY_WHITOUT_SETTING = -'应用但不修改设置' -WINDOW_ASK_APPLY_LIBRARY = -'是否需要将你的工作环境配置为 `{}` ?' -WINDOW_SEARCHING_IN_FILES = -'正在文件中搜索...' -WINDOW_CONFIG_LUA_DEPRECATED = -'`config.lua` 已废弃,请改用 `config.json` 。' -WINDOW_CONVERT_CONFIG_LUA = -'转换为 `config.json`' -WINDOW_MODIFY_REQUIRE_PATH = -'你想要修改 `require` 的路径吗?' -WINDOW_MODIFY_REQUIRE_OK = -'修改' - -CONFIG_LOAD_FAILED = -'无法读取设置文件:{}' -CONFIG_LOAD_ERROR = -'设置文件加载错误:{}' -CONFIG_TYPE_ERROR = -'设置文件必须是lua或json格式:{}' -CONFIG_MODIFY_FAIL_SYNTAX_ERROR = -'修改设置失败,设置文件中有语法错误:{}' -CONFIG_MODIFY_FAIL_NO_WORKSPACE = -[[ -修改设置失败: -* 当前模式为单文件模式,服务器只能在工作区中创建 `.luarc.json` 文件。 -* 语言客户端不支持从服务器侧修改设置。 - -请手动修改以下设置: -{} -]] -CONFIG_MODIFY_FAIL = -[[ -修改设置失败 - -请手动修改以下设置: -{} -]] - -PLUGIN_RUNTIME_ERROR = -[[ -插件发生错误,请汇报给插件作者。 -请在输出或日志中查看详细信息。 -插件路径:{} -]] -PLUGIN_TRUST_LOAD = -[[ -当前设置试图加载位于此位置的插件:{} - -注意,恶意的插件可能会危害您的电脑 -]] -PLUGIN_TRUST_YES = -[[ -信任并加载插件 -]] -PLUGIN_TRUST_NO = -[[ -不要加载此插件 -]] - -CLI_CHECK_ERROR_TYPE = -'check 必须是一个字符串,但是是一个 {}' -CLI_CHECK_ERROR_URI = -'check 必须是一个有效的 URI,但是是 {}' -CLI_CHECK_ERROR_LEVEL = -'checklevel 必须是这些值之一:{}' -CLI_CHECK_INITING = -'正在初始化...' -CLI_CHECK_SUCCESS = -'诊断完成,没有发现问题' -CLI_CHECK_RESULTS = -'诊断完成,共有 {} 个问题,请查看 {}' -CLI_DOC_INITING = -'加载文档 ...' -CLI_DOC_DONE = -[[ -文档导出完成! -原始数据: {} -Markdown(演示用): {} -]] - -TYPE_ERROR_ENUM_GLOBAL_DISMATCH = -'类型 `{child}` 无法匹配 `{parent}` 的枚举类型' -TYPE_ERROR_ENUM_GENERIC_UNSUPPORTED = -'无法在枚举中使用泛型 `{child}`' -TYPE_ERROR_ENUM_LITERAL_DISMATCH = -'字面量 `{child}` 无法匹配 `{parent}` 的枚举值' -TYPE_ERROR_ENUM_OBJECT_DISMATCH = -'对象 `{child}` 无法匹配 `{parent}` 的枚举值,它们必须是同一个对象' -TYPE_ERROR_ENUM_NO_OBJECT = -'无法识别传入的枚举值 `{child}`' -TYPE_ERROR_INTEGER_DISMATCH = -'字面量 `{child}` 无法匹配整数 `{parent}`' -TYPE_ERROR_STRING_DISMATCH = -'字面量 `{child}` 无法匹配字符串 `{parent}`' -TYPE_ERROR_BOOLEAN_DISMATCH = -'字面量 `{child}` 无法匹配布尔值 `{parent}`' -TYPE_ERROR_TABLE_NO_FIELD = -'表中不存在字段 `{key}`' -TYPE_ERROR_TABLE_FIELD_DISMATCH = -'字段 `{key}` 的类型为 `{child}`,无法匹配 `{parent}`' -TYPE_ERROR_CHILD_ALL_DISMATCH = -'`{child}` 中的所有子类型均无法匹配 `{parent}`' -TYPE_ERROR_PARENT_ALL_DISMATCH = -'`{child}` 无法匹配 `{parent}` 中的任何子类' -TYPE_ERROR_UNION_DISMATCH = -'`{child}` 无法匹配 `{parent}`' -TYPE_ERROR_OPTIONAL_DISMATCH = -'可选类型无法匹配 `{parent}`' -TYPE_ERROR_NUMBER_LITERAL_TO_INTEGER = -'无法将数字 `{child}` 转换为整数' -TYPE_ERROR_NUMBER_TYPE_TO_INTEGER = -'无法将数字类型转换为整数类型' -TYPE_ERROR_DISMATCH = -'类型 `{child}` 无法匹配 `{parent}`' - -LUADOC_DESC_CLASS = -- TODO: need translate! -[=[ -Defines a class/table structure -## Syntax -`---@class [: [, ]...]` -## Usage -``` ----@class Manager: Person, Human -Manager = {} -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#class) -]=] -LUADOC_DESC_TYPE = -- TODO: need translate! -[=[ -Specify the type of a certain variable - -Default types: `nil`, `any`, `boolean`, `string`, `number`, `integer`, -`function`, `table`, `thread`, `userdata`, `lightuserdata` - -(Custom types can be provided using `@alias`) - -## Syntax -`---@type [| [type]...` - -## Usage -### General -``` ----@type nil|table|myClass -local Example = nil -``` - -### Arrays -``` ----@type number[] -local phoneNumbers = {} -``` - -### Enums -``` ----@type "red"|"green"|"blue" -local color = "" -``` - -### Tables -``` ----@type table -local settings = { - disableLogging = true, - preventShutdown = false, -} - ----@type { [string]: true } -local x --x[""] is true -``` - -### Functions -``` ----@type fun(mode?: "r"|"w"): string -local myFunction -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#types-and-type) -]=] -LUADOC_DESC_ALIAS = -- TODO: need translate! -[=[ -Create your own custom type that can be used with `@param`, `@type`, etc. - -## Syntax -`---@alias [description]`\ -or -``` ----@alias ----| 'value' [# comment] ----| 'value2' [# comment] -... -``` - -## Usage -### Expand to other type -``` ----@alias filepath string Path to a file - ----@param path filepath Path to the file to search in -function find(path, pattern) end -``` - -### Enums -``` ----@alias font-style ----| '"underlined"' # Underline the text ----| '"bold"' # Bolden the text ----| '"italic"' # Make the text italicized - ----@param style font-style Style to apply -function setFontStyle(style) end -``` - -### Literal Enum -``` -local enums = { - READ = 0, - WRITE = 1, - CLOSED = 2 -} - ----@alias FileStates ----| `enums.READ` ----| `enums.WRITE` ----| `enums.CLOSE` -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#alias) -]=] -LUADOC_DESC_PARAM = -- TODO: need translate! -[=[ -Declare a function parameter - -## Syntax -`@param [?] [comment]` - -## Usage -### General -``` ----@param url string The url to request ----@param headers? table HTTP headers to send ----@param timeout? number Timeout in seconds -function get(url, headers, timeout) end -``` - -### Variable Arguments -``` ----@param base string The base to concat to ----@param ... string The values to concat -function concat(base, ...) end -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#param) -]=] -LUADOC_DESC_RETURN = -- TODO: need translate! -[=[ -Declare a return value - -## Syntax -`@return [name] [description]`\ -or\ -`@return [# description]` - -## Usage -### General -``` ----@return number ----@return number # The green component ----@return number b The blue component -function hexToRGB(hex) end -``` - -### Type & name only -``` ----@return number x, number y -function getCoords() end -``` - -### Type only -``` ----@return string, string -function getFirstLast() end -``` - -### Return variable values -``` ----@return string ... The tags of the item -function getTags(item) end -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#return) -]=] -LUADOC_DESC_FIELD = -- TODO: need translate! -[=[ -Declare a field in a class/table. This allows you to provide more in-depth -documentation for a table. As of `v3.6.0`, you can mark a field as `private`, -`protected`, `public`, or `package`. - -## Syntax -`---@field [description]` - -## Usage -``` ----@class HTTP_RESPONSE ----@field status HTTP_STATUS ----@field headers table The headers of the response - ----@class HTTP_STATUS ----@field code number The status code of the response ----@field message string A message reporting the status - ----@return HTTP_RESPONSE response The response from the server -function get(url) end - ---This response variable has all of the fields defined above -response = get("localhost") - ---Extension provided intellisense for the below assignment -statusCode = response.status.code -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#field) -]=] -LUADOC_DESC_GENERIC = -- TODO: need translate! -[=[ -Simulates generics. Generics can allow types to be re-used as they help define -a "generic shape" that can be used with different types. - -## Syntax -`---@generic [:parent_type] [, [:parent_type]]` - -## Usage -### General -``` ----@generic T ----@param value T The value to return ----@return T value The exact same value -function echo(value) - return value -end - --- Type is string -s = echo("e") - --- Type is number -n = echo(10) - --- Type is boolean -b = echo(true) - --- We got all of this info from just using --- @generic rather than manually specifying --- each allowed type -``` - -### Capture name of generic type -``` ----@class Foo -local Foo = {} -function Foo:Bar() end - ----@generic T ----@param name `T` # the name generic type is captured here ----@return T # generic type is returned -function Generic(name) end - -local v = Generic("Foo") -- v is an object of Foo -``` - -### How Lua tables use generics -``` ----@class table: { [K]: V } - --- This is what allows us to create a table --- and intellisense keeps track of any type --- we give for key (K) or value (V) -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#generics-and-generic) -]=] -LUADOC_DESC_VARARG = -- TODO: need translate! -[=[ -Primarily for legacy support for EmmyLua annotations. `@vararg` does not -provide typing or allow descriptions. - -**You should instead use `@param` when documenting parameters (variable or not).** - -## Syntax -`@vararg ` - -## Usage -``` ----Concat strings together ----@vararg string -function concat(...) end -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#vararg) -]=] -LUADOC_DESC_OVERLOAD = -- TODO: need translate! -[=[ -Allows defining of multiple function signatures. - -## Syntax -`---@overload fun([: ] [, [: ]]...)[: [, ]...]` - -## Usage -``` ----@overload fun(t: table, value: any): number -function table.insert(t, position, value) end -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#overload) -]=] -LUADOC_DESC_DEPRECATED = -- TODO: need translate! -[=[ -Marks a function as deprecated. This results in any deprecated function calls -being ~~struck through~~. - -## Syntax -`---@deprecated` - ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#deprecated) -]=] -LUADOC_DESC_META = -- TODO: need translate! -[=[ -Indicates that this is a meta file and should be used for definitions and intellisense only. - -There are 3 main distinctions to note with meta files: -1. There won't be any context-based intellisense in a meta file -2. Hovering a `require` filepath in a meta file shows `[meta]` instead of an absolute path -3. The `Find Reference` function will ignore meta files - -## Syntax -`---@meta` - ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#meta) -]=] -LUADOC_DESC_VERSION = -- TODO: need translate! -[=[ -Specifies Lua versions that this function is exclusive to. - -Lua versions: `5.1`, `5.2`, `5.3`, `5.4`, `JIT`. - -Requires configuring the `Diagnostics: Needed File Status` setting. - -## Syntax -`---@version [, ]...` - -## Usage -### General -``` ----@version JIT -function onlyWorksInJIT() end -``` -### Specify multiple versions -``` ----@version <5.2,JIT -function oldLuaOnly() end -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#version) -]=] -LUADOC_DESC_SEE = -- TODO: need translate! -[=[ -Define something that can be viewed for more information - -## Syntax -`---@see ` - ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#see) -]=] -LUADOC_DESC_DIAGNOSTIC = -- TODO: need translate! -[=[ -Enable/disable diagnostics for error/warnings/etc. - -Actions: `disable`, `enable`, `disable-line`, `disable-next-line` - -[Names](https://github.com/LuaLS/lua-language-server/blob/cbb6e6224094c4eb874ea192c5f85a6cba099588/script/proto/define.lua#L54) - -## Syntax -`---@diagnostic [: ]` - -## Usage -### Disable next line -``` ----@diagnostic disable-next-line: undefined-global -``` - -### Manually toggle -``` ----@diagnostic disable: unused-local -local unused = "hello world" ----@diagnostic enable: unused-local -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#diagnostic) -]=] -LUADOC_DESC_MODULE = -- TODO: need translate! -[=[ -Provides the semantics of `require`. - -## Syntax -`---@module <'module_name'>` - -## Usage -``` ----@module 'string.utils' -local stringUtils --- This is functionally the same as: -local module = require('string.utils') -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#module) -]=] -LUADOC_DESC_ASYNC = -- TODO: need translate! -[=[ -Marks a function as asynchronous. - -## Syntax -`---@async` - ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#async) -]=] -LUADOC_DESC_NODISCARD = -- TODO: need translate! -[=[ -Prevents this function's return values from being discarded/ignored. -This will raise the `discard-returns` warning should the return values -be ignored. - -## Syntax -`---@nodiscard` - ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#nodiscard) -]=] -LUADOC_DESC_CAST = -- TODO: need translate! -[=[ -Allows type casting (type conversion). - -## Syntax -`@cast <[+|-]type>[, <[+|-]type>]...` - -## Usage -### Overwrite type -``` ----@type integer -local x --> integer - ----@cast x string -print(x) --> string -``` -### Add Type -``` ----@type string -local x --> string - ----@cast x +boolean, +number -print(x) --> string|boolean|number -``` -### Remove Type -``` ----@type string|table -local x --> string|table - ----@cast x -string -print(x) --> table -``` ---- -[View Wiki](https://github.com/LuaLS/lua-language-server/wiki/Annotations#cast) -]=] -LUADOC_DESC_OPERATOR = -- TODO: need translate! -[=[ -Provide type declaration for [operator metamethods](http://lua-users.org/wiki/MetatableEvents). - -## Syntax -`@operator [(input_type)]:` - -## Usage -### Vector Add Metamethod -``` ----@class Vector ----@operation add(Vector):Vector - -vA = Vector.new(1, 2, 3) -vB = Vector.new(10, 20, 30) - -vC = vA + vB ---> Vector -``` -### Unary Minus -``` ----@class Passcode ----@operation unm:integer - -pA = Passcode.new(1234) -pB = -pA ---> integer -``` -[View Request](https://github.com/LuaLS/lua-language-server/issues/599) -]=] -LUADOC_DESC_ENUM = -- TODO: need translate! -[=[ -Mark a table as an enum. If you want an enum but can't define it as a Lua -table, take a look at the [`@alias`](https://github.com/LuaLS/lua-language-server/wiki/Annotations#alias) -tag. - -## Syntax -`@enum ` - -## Usage -``` ----@enum colors -local colors = { - white = 0, - orange = 2, - yellow = 4, - green = 8, - black = 16, -} - ----@param color colors -local function setColor(color) end - --- Completion and hover is provided for the below param -setColor(colors.green) -``` -]=] -LUADOC_DESC_PACKAGE = -- TODO: need translate! -[=[ -Mark a function as private to the file it is defined in. A packaged function -cannot be accessed from another file. - -## Syntax -`@package` - -## Usage -``` ----@class Animal ----@field private eyes integer -local Animal = {} - ----@package ----This cannot be accessed in another file -function Animal:eyesCount() - return self.eyes -end -``` -]=] -LUADOC_DESC_PRIVATE = -- TODO: need translate! -[=[ -Mark a function as private to a @class. Private functions can be accessed only -from within their class and are not accessable from child classes. - -## Syntax -`@private` - -## Usage -``` ----@class Animal ----@field private eyes integer -local Animal = {} - ----@private -function Animal:eyesCount() - return self.eyes -end - ----@class Dog:Animal -local myDog = {} - ----NOT PERMITTED! -myDog:eyesCount(); -``` -]=] -LUADOC_DESC_PROTECTED = -- TODO: need translate! -[=[ -Mark a function as protected within a @class. Protected functions can be -accessed only from within their class or from child classes. - -## Syntax -`@protected` - -## Usage -``` ----@class Animal ----@field private eyes integer -local Animal = {} - ----@protected -function Animal:eyesCount() - return self.eyes -end - ----@class Dog:Animal -local myDog = {} - ----Permitted because function is protected, not private. -myDog:eyesCount(); -``` -]=] diff --git a/.building/lua-language-server-3.6.18-win32-x64/locale/zh-cn/setting.lua b/.building/lua-language-server-3.6.18-win32-x64/locale/zh-cn/setting.lua deleted file mode 100644 index d488ac3f1..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/locale/zh-cn/setting.lua +++ /dev/null @@ -1,429 +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.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['invisible'] = -- TODO: need translate! -'Enable diagnostics for accesses to fields which are invisible.' -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['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.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: 打开插件管理器...' diff --git a/.building/lua-language-server-3.6.18-win32-x64/locale/zh-tw/meta.lua b/.building/lua-language-server-3.6.18-win32-x64/locale/zh-tw/meta.lua deleted file mode 100644 index 23af021af..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/locale/zh-tw/meta.lua +++ /dev/null @@ -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` 處開始統計)。' diff --git a/.building/lua-language-server-3.6.18-win32-x64/locale/zh-tw/script.lua b/.building/lua-language-server-3.6.18-win32-x64/locale/zh-tw/script.lua deleted file mode 100644 index d6e93a436..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/locale/zh-tw/script.lua +++ /dev/null @@ -1,1250 +0,0 @@ -DIAG_LINE_ONLY_SPACE = -'只有空格的空行。' -DIAG_LINE_POST_SPACE = -'後置空格。' -DIAG_UNUSED_LOCAL = -'未使用的區域變數 `{}`。' -DIAG_UNDEF_GLOBAL = -'未定義的全域變數 `{}`。' -DIAG_UNDEF_FIELD = -'未定義的屬性/欄位 `{}`。' -DIAG_UNDEF_ENV_CHILD = -'未定義的變數 `{}`(多載了 `_ENV` )。' -DIAG_UNDEF_FENV_CHILD = -'未定義的變數 `{}`(處於模組中)。' -DIAG_GLOBAL_IN_NIL_ENV = -'不能使用全域變數( `_ENV` 被設為了 `nil` )。' -DIAG_GLOBAL_IN_NIL_FENV = -'不能使用全域變數(模組被設為了 `nil` )。' -DIAG_UNUSED_LABEL = -'未使用的標籤 `{}`。' -DIAG_UNUSED_FUNCTION = -'未使用的函式。' -DIAG_UNUSED_VARARG = -'未使用的不定引數。' -DIAG_REDEFINED_LOCAL = -'重複定義區域變數 `{}`。' -DIAG_DUPLICATE_INDEX = -'重複的索引 `{}`。' -DIAG_DUPLICATE_METHOD = -'重複的方法 `{}`。' -DIAG_PREVIOUS_CALL = -'會被直譯為 `{}{}` 。你可能需要加一個 `;`。' -DIAG_PREFIELD_CALL = -'會被直譯為 `{}{}` 。你可能需要加一個 `,` 或 `;` 。' -DIAG_OVER_MAX_ARGS = -'函式最多接收 {:d} 個引數,但獲得了 {:d} 個。' -DIAG_MISS_ARGS = -'函式最少接收 {:d} 個引數,但獲得了 {:d} 個。' -DIAG_OVER_MAX_VALUES = -'只有 {} 個變數,但你設定了 {} 個值。' -DIAG_AMBIGUITY_1 = -'會優先運算 `{}` ,你可能需要加個括號。' -DIAG_LOWERCASE_GLOBAL = -'首字母小寫的全域變數,你是否漏了 `local` 或是有拼寫錯誤?' -DIAG_EMPTY_BLOCK = -'空程式碼區塊' -DIAG_DIAGNOSTICS = -'Lua 診斷' -DIAG_SYNTAX_CHECK = -'Lua 語法檢查' -DIAG_NEED_VERSION = -'在 {} 中是合法的,目前為 {}' -DIAG_DEFINED_VERSION = -'在 {} 中有定義,目前為 {}' -DIAG_DEFINED_CUSTOM = -'在 {} 中有定義' -DIAG_DUPLICATE_CLASS = -'重複定義的 Class `{}`。' -DIAG_UNDEFINED_CLASS = -'未定義的 Class `{}`。' -DIAG_CYCLIC_EXTENDS = -'循環繼承。' -DIAG_INEXISTENT_PARAM = -'不存在的參數。' -DIAG_DUPLICATE_PARAM = -'重複的參數。' -DIAG_NEED_CLASS = -'需要先定義 Class 。' -DIAG_DUPLICATE_SET_FIELD= -'重複定義的欄位 `{}`。' -DIAG_SET_CONST = -'不能對常數賦值。' -DIAG_SET_FOR_STATE = -'修改了循環變數。' -DIAG_CODE_AFTER_BREAK = -'無法執行到 `break` 後的程式碼。' -DIAG_UNBALANCED_ASSIGNMENTS = -'由於值的數量不夠而被賦值為了 `nil` 。在Lua中, `x, y = 1` 等價於 `x, y = 1, nil` 。' -DIAG_REQUIRE_LIKE = -'你可以在設定中將 `{}` 視為 `require`。' -DIAG_COSE_NON_OBJECT = -'無法 close 此類型的值。(除非給此類型設定 `__close` 元方法)' -DIAG_COUNT_DOWN_LOOP = -'你的意思是 `{}` 嗎?' -DIAG_UNKNOWN = -'無法推測出類型。' -DIAG_DEPRECATED = -'已棄用。' -DIAG_DIFFERENT_REQUIRES = -'使用了不同的名字 `require` 了同一個檔案。' -DIAG_REDUNDANT_RETURN = -'冗餘回傳。' -DIAG_AWAIT_IN_SYNC = -'只能在標記為非同步的函式中呼叫非同步函式。' -DIAG_NOT_YIELDABLE = -'此函式的第 {} 個參數沒有被標記為可讓出,但是傳入了非同步函式。(使用 `---@param name async fun()` 來標記為可讓出)' -DIAG_DISCARD_RETURNS = -'不能丟棄此函式的回傳值。' -DIAG_NEED_CHECK_NIL = -'需要判空' -DIAG_CIRCLE_DOC_CLASS = -'循環繼承的類別。' -DIAG_DOC_FIELD_NO_CLASS = -'欄位必須定義在類別之後。' -DIAG_DUPLICATE_DOC_ALIAS = -'重複定義的別名 `{}`.' -DIAG_DUPLICATE_DOC_FIELD = -'重複定義的欄位 `{}`。' -DIAG_DUPLICATE_DOC_PARAM = -'重複指向的參數 `{}`。' -DIAG_UNDEFINED_DOC_CLASS = -'未定義的類別 `{}`。' -DIAG_UNDEFINED_DOC_NAME = -'未定義的類型或別名 `{}`。' -DIAG_UNDEFINED_DOC_PARAM = -'指向了未定義的參數 `{}`。' -DIAG_UNKNOWN_DIAG_CODE = -'未知的診斷代碼 `{}`。' -DIAG_CAST_LOCAL_TYPE = -'已顯式定義變數的類型為 `{def}`,不能再將其類型轉換為 `{ref}`。' -DIAG_CAST_FIELD_TYPE = -'已顯式定義欄位的類型為 `{def}`,不能再將其類型轉換為 `{ref}`。' -DIAG_ASSIGN_TYPE_MISMATCH = -'不能將 `{ref}` 賦值給 `{def}`。' -DIAG_PARAM_TYPE_MISMATCH = -'不能將 `{ref}` 賦值給參數 `{def}`.' -DIAG_UNKNOWN_CAST_VARIABLE = -'未知的類型轉換變數 `{}`.' -DIAG_CAST_TYPE_MISMATCH = -'不能將 `{ref}` 轉換為 `{def}`。' -DIAG_MISSING_RETURN_VALUE = -'至少需要 {min} 個回傳值,但此處只回傳 {rmax} 個值。' -DIAG_MISSING_RETURN_VALUE_RANGE = -'至少需要 {min} 個回傳值,但此處只回傳 {rmin} 到 {rmax} 個值。' -DIAG_REDUNDANT_RETURN_VALUE = -'最多只有 {max} 個回傳值,但此處回傳了第 {rmax} 個值。' -DIAG_REDUNDANT_RETURN_VALUE_RANGE = -'最多只有 {max} 個回傳值,但此處回傳了第 {rmin} 到第 {rmax} 個值。' -DIAG_MISSING_RETURN = -'此處需要回傳值。' -DIAG_RETURN_TYPE_MISMATCH = -'第 {index} 個回傳值的類型為 `{def}` ,但實際回傳的是 `{ref}`。\n{err}' -DIAG_UNKNOWN_OPERATOR = -- TODO: need translate! -'Unknown operator `{}`.' -DIAG_UNREACHABLE_CODE = -- TODO: need translate! -'Unreachable code.' -DIAG_INVISIBLE_PRIVATE = -- TODO: need translate! -'Field `{field}` is private, it can only be accessed in class `{class}`.' -DIAG_INVISIBLE_PROTECTED = -- TODO: need translate! -'Field `{field}` is protected, it can only be accessed in class `{class}` and its subclasses.' -DIAG_INVISIBLE_PACKAGE = -- TODO: need translate! -'Field `{field}` can only be accessed in same file `{uri}`.' - -MWS_NOT_SUPPORT = -'{} 目前還不支援多工作目錄,我可能需要重新啟動才能支援新的工作目錄...' -MWS_RESTART = -'重新啟動' -MWS_NOT_COMPLETE = -'工作目錄還沒有準備好,你可以稍後再試一下...' -MWS_COMPLETE = -'工作目錄準備好了,你可以再試一下了...' -MWS_MAX_PRELOAD = -'預載入檔案數已達上限({}),你需要手動打開需要載入的檔案。' -MWS_UCONFIG_FAILED = -'使用者設定檔儲存失敗。' -MWS_UCONFIG_UPDATED = -'使用者設定檔已更新。' -MWS_WCONFIG_UPDATED = -'工作區設定檔已更新。' - -WORKSPACE_SKIP_LARGE_FILE = -'已跳過過大的檔案:{}。目前設定的大小限制為:{} KB,該檔案大小為:{} KB' -WORKSPACE_LOADING = -'正在載入工作目錄' -WORKSPACE_DIAGNOSTIC = -'正在對工作目錄進行診斷' -WORKSPACE_SKIP_HUGE_FILE = -'出於效能考慮,已停止對此檔案解析:{}' -WORKSPACE_NOT_ALLOWED = -'你的工作目錄被設定為了 `{}` ,Lua語言伺服拒絕載入此目錄,請檢查你的設定檔。[了解更多](https://github.com/LuaLS/lua-language-server/wiki/FAQ#why-is-the-server-scanning-the-wrong-folder)' -WORKSPACE_SCAN_TOO_MUCH = -'已掃描了超過 {} 個檔案,目前掃描的目錄為 `{}`,請確認設定檔是否正確。' - -PARSER_CRASH = -'語法解析崩潰了!遺言:{}' -PARSER_UNKNOWN = -'未知語法錯誤...' -PARSER_MISS_NAME = -'缺少名稱。' -PARSER_UNKNOWN_SYMBOL = -'未知符號`{symbol}`。' -PARSER_MISS_SYMBOL = -'缺少符號`{symbol}`。' -PARSER_MISS_ESC_X = -'必須是2個16進制字元。' -PARSER_UTF8_SMALL = -'至少有1個字元。' -PARSER_UTF8_MAX = -'必須在 {min} 與 {max} 之間。' -PARSER_ERR_ESC = -'錯誤的跳脫字元。' -PARSER_MUST_X16 = -'必須是16進制字元。' -PARSER_MISS_EXPONENT = -'缺少指數部分。' -PARSER_MISS_EXP = -'缺少表達式。' -PARSER_MISS_FIELD = -'缺少欄位/屬性名。' -PARSER_MISS_METHOD = -'缺少方法名。' -PARSER_ARGS_AFTER_DOTS = -'`...`必須是最後一個引數。' -PARSER_KEYWORD = -'關鍵字無法作為名稱。' -PARSER_EXP_IN_ACTION = -'該表達式不能作為敘述。' -PARSER_BREAK_OUTSIDE = -'`break`必須在循環內部。' -PARSER_MALFORMED_NUMBER = -'無法構成有效數字。' -PARSER_ACTION_AFTER_RETURN = -'`return`之後不能再執行程式碼。' -PARSER_ACTION_AFTER_BREAK = -'`break`之後不能再執行程式碼。' -PARSER_NO_VISIBLE_LABEL = -'標籤`{label}`不可見。' -PARSER_REDEFINE_LABEL = -'標籤`{label}`重定義。' -PARSER_UNSUPPORT_SYMBOL = -'{version} 不支援該符號。' -PARSER_UNEXPECT_DOTS = -'`...`只能在不定參函式中使用。' -PARSER_UNEXPECT_SYMBOL = -'未知的符號 `{symbol}` 。' -PARSER_UNKNOWN_TAG = -'不支援的屬性。' -PARSER_MULTI_TAG = -'只能設定一個屬性。' -PARSER_UNEXPECT_LFUNC_NAME = -'區域函式只能使用識別字作為名稱。' -PARSER_UNEXPECT_EFUNC_NAME = -'函式作為表達式時不能命名。' -PARSER_ERR_LCOMMENT_END = -'應使用 `{symbol}` 來關閉多行註解。' -PARSER_ERR_C_LONG_COMMENT = -'Lua應使用 `--[[ ]]` 來進行多行註解。' -PARSER_ERR_LSTRING_END = -'應使用 `{symbol}` 來關閉長字串。' -PARSER_ERR_ASSIGN_AS_EQ = -'應使用 `=` 來進行賦值操作。' -PARSER_ERR_EQ_AS_ASSIGN = -'應使用 `==` 來進行等於判斷。' -PARSER_ERR_UEQ = -'應使用 `~=` 來進行不等於判斷。' -PARSER_ERR_THEN_AS_DO = -'應使用 `then` 。' -PARSER_ERR_DO_AS_THEN = -'應使用 `do` 。' -PARSER_MISS_END = -'缺少對應的 `end` 。' -PARSER_ERR_COMMENT_PREFIX = -'Lua應使用 `--` 來進行註解。' -PARSER_MISS_SEP_IN_TABLE = -'需要用 `,` 或 `;` 進行分割。' -PARSER_SET_CONST = -'不能對常數賦值。' -PARSER_UNICODE_NAME = -'包含了 Unicode 字元。' -PARSER_ERR_NONSTANDARD_SYMBOL = -'Lua中應使用符號 `{symbol}` 。' -PARSER_MISS_SPACE_BETWEEN = -'符號之間必須保留空格。' -PARSER_INDEX_IN_FUNC_NAME = -'命名函式的名稱中不能使用 `[name]` 形式。' -PARSER_UNKNOWN_ATTRIBUTE = -'區域變數屬性應該是 `const` 或 `close` 。' -PARSER_AMBIGUOUS_SYNTAX = -- TODO: need translate! -'在 Lua 5.1 中,函数调用的左括号必须与函数在同一行。' -PARSER_NEED_PAREN = -- TODO: need translate! -'需要添加一对括号。' -PARSER_NESTING_LONG_MARK = -- TODO: need translate! -'Nesting of `[[...]]` is not allowed in Lua 5.1 .' -PARSER_LOCAL_LIMIT = -- TODO: need translate! -'Only 200 active local variables and upvalues can be existed at the same time.' -PARSER_LUADOC_MISS_CLASS_NAME = -'缺少類別名稱。' -PARSER_LUADOC_MISS_EXTENDS_SYMBOL = -'缺少符號 `:` 。' -PARSER_LUADOC_MISS_CLASS_EXTENDS_NAME = -'缺少要繼承的類別名稱。' -PARSER_LUADOC_MISS_SYMBOL = -'缺少符號 `{symbol}`。' -PARSER_LUADOC_MISS_ARG_NAME = -'缺少參數名稱。' -PARSER_LUADOC_MISS_TYPE_NAME = -'缺少類型名。' -PARSER_LUADOC_MISS_ALIAS_NAME = -'缺少別名。' -PARSER_LUADOC_MISS_ALIAS_EXTENDS = -'缺少別名定義。' -PARSER_LUADOC_MISS_PARAM_NAME = -'缺少要指向的參數名稱。' -PARSER_LUADOC_MISS_PARAM_EXTENDS = -'缺少參數的類型定義。' -PARSER_LUADOC_MISS_FIELD_NAME = -'缺少欄位名稱。' -PARSER_LUADOC_MISS_FIELD_EXTENDS = -'缺少欄位的類型定義。' -PARSER_LUADOC_MISS_GENERIC_NAME = -'缺少泛型名稱。' -PARSER_LUADOC_MISS_GENERIC_EXTENDS_NAME = -'缺少泛型要繼承的類別名稱。' -PARSER_LUADOC_MISS_VARARG_TYPE = -'缺少可變引數的類型定義。' -PARSER_LUADOC_MISS_FUN_AFTER_OVERLOAD = -'缺少關鍵字 `fun` 。' -PARSER_LUADOC_MISS_CATE_NAME = -'缺少文件類型名稱。' -PARSER_LUADOC_MISS_DIAG_MODE = -'缺少診斷模式。' -PARSER_LUADOC_ERROR_DIAG_MODE = -'診斷模式不正確。' -PARSER_LUADOC_MISS_LOCAL_NAME = -'缺少變數名。' - -SYMBOL_ANONYMOUS = -'<匿名函式>' - -HOVER_VIEW_DOCUMENTS = -'檢視文件' -HOVER_DOCUMENT_LUA51 = -'https://www.lua.org/manual/5.1/manual.html#{}' -HOVER_DOCUMENT_LUA52 = -'https://www.lua.org/manual/5.2/manual.html#{}' -HOVER_DOCUMENT_LUA53 = -'http://cloudwu.github.io/lua53doc/manual.html#{}' -HOVER_DOCUMENT_LUA54 = -'https://www.lua.org/manual/5.4/manual.html#{}' -HOVER_DOCUMENT_LUAJIT = -'https://www.lua.org/manual/5.1/manual.html#{}' -HOVER_NATIVE_DOCUMENT_LUA51 = -'command:extension.lua.doc?["en-us/51/manual.html/{}"]' -HOVER_NATIVE_DOCUMENT_LUA52 = -'command:extension.lua.doc?["en-us/52/manual.html/{}"]' -HOVER_NATIVE_DOCUMENT_LUA53 = -'command:extension.lua.doc?["zh-cn/53/manual.html/{}"]' -HOVER_NATIVE_DOCUMENT_LUA54 = -'command:extension.lua.doc?["en-us/54/manual.html/{}"]' -HOVER_NATIVE_DOCUMENT_LUAJIT = -'command:extension.lua.doc?["en-us/51/manual.html/{}"]' -HOVER_MULTI_PROTOTYPE = -'({} 個原型)' -HOVER_STRING_BYTES = -'{} 個位元組' -HOVER_STRING_CHARACTERS = -'{} 個位元組,{} 個字元' -HOVER_MULTI_DEF_PROTO = -'({} 個定義,{} 個原型)' -HOVER_MULTI_PROTO_NOT_FUNC = -'({} 個非函式定義)' -HOVER_USE_LUA_PATH = -'(搜尋路徑: `{}` )' -HOVER_EXTENDS = -'展開為 {}' -HOVER_TABLE_TIME_UP = -'出於效能考慮,已停用了部分類型推斷。' -HOVER_WS_LOADING = -'正在載入工作目錄:{} / {}' -HOVER_AWAIT_TOOLTIP = -'正在呼叫非同步函式,可能會讓出目前共常式' - -ACTION_DISABLE_DIAG = -'在工作區停用診斷 ({})。' -ACTION_MARK_GLOBAL = -'標記 `{}` 為已定義的全域變數。' -ACTION_REMOVE_SPACE = -'清除所有後置空格。' -ACTION_ADD_SEMICOLON = -'添加 `;` 。' -ACTION_ADD_BRACKETS = -'添加括號。' -ACTION_RUNTIME_VERSION = -'修改執行版本為 {} 。' -ACTION_OPEN_LIBRARY = -'載入 {} 中的全域變數。' -ACTION_ADD_DO_END = -'添加 `do ... end` 。' -ACTION_FIX_LCOMMENT_END = -'改用正確的多行註解關閉符號。' -ACTION_ADD_LCOMMENT_END = -'關閉多行註解。' -ACTION_FIX_C_LONG_COMMENT = -'修改為 Lua 的多行註解格式。' -ACTION_FIX_LSTRING_END = -'改用正確的長字串關閉符號。' -ACTION_ADD_LSTRING_END = -'關閉長字串。' -ACTION_FIX_ASSIGN_AS_EQ = -'改為 `=` 。' -ACTION_FIX_EQ_AS_ASSIGN = -'改為 `==` 。' -ACTION_FIX_UEQ = -'改為 `~=` 。' -ACTION_FIX_THEN_AS_DO = -'改為 `then` 。' -ACTION_FIX_DO_AS_THEN = -'改為 `do` 。' -ACTION_ADD_END = -'添加 `end` (根據縮排推測添加位置)。' -ACTION_FIX_COMMENT_PREFIX = -'改為 `--` 。' -ACTION_FIX_NONSTANDARD_SYMBOL = -'改為 `{symbol}`。' -ACTION_RUNTIME_UNICODE_NAME = -'允許使用 Unicode 字元。' -ACTION_SWAP_PARAMS = -'將其改為 `{node}` 的第 {index} 個參數' -ACTION_FIX_INSERT_SPACE = -'插入空格' -ACTION_JSON_TO_LUA = -'把 JSON 轉成 Lua' -ACTION_DISABLE_DIAG_LINE= -'在此行停用診斷 ({})。' -ACTION_DISABLE_DIAG_FILE= -'在此檔案停用診斷 ({})。' -ACTION_MARK_ASYNC = -'將目前函式標記為非同步。' -ACTION_ADD_DICT = -'添加 \'{}\' 到工作區字典' -ACTION_FIX_ADD_PAREN = -- TODO: need translate! -'添加括号。' - -COMMAND_DISABLE_DIAG = -'停用診斷' -COMMAND_MARK_GLOBAL = -'標記全域變數' -COMMAND_REMOVE_SPACE = -'清除所有後置空格' -COMMAND_ADD_BRACKETS = -'添加括號' -COMMAND_RUNTIME_VERSION = -'修改執行版本' -COMMAND_OPEN_LIBRARY = -'載入第三方庫中的全域變數' -COMMAND_UNICODE_NAME = -'允許使用 Unicode 字元' -COMMAND_JSON_TO_LUA = -'JSON 轉 Lua' -COMMAND_JSON_TO_LUA_FAILED = -'JSON 轉 Lua 失敗:{}' -COMMAND_ADD_DICT = -'添加單字到字典裡' -COMMAND_REFERENCE_COUNT = -- TODO: need translate! -'{} references' - -COMPLETION_IMPORT_FROM = -'從 {} 中匯入' -COMPLETION_DISABLE_AUTO_REQUIRE = -'停用自動require' -COMPLETION_ASK_AUTO_REQUIRE = -'在檔案頂部添加程式碼 require 此檔案?' - -DEBUG_MEMORY_LEAK = -'{} 很抱歉發生了嚴重的記憶體漏失,語言伺服即將重新啟動。' -DEBUG_RESTART_NOW = -'立即重新啟動' - -WINDOW_COMPILING = -'正在編譯' -WINDOW_DIAGNOSING = -'正在診斷' -WINDOW_INITIALIZING = -'正在初始化...' -WINDOW_PROCESSING_HOVER = -'正在處理懸浮提示...' -WINDOW_PROCESSING_DEFINITION = -'正在處理轉到定義...' -WINDOW_PROCESSING_REFERENCE = -'正在處理轉到引用...' -WINDOW_PROCESSING_RENAME = -'正在處理重新命名...' -WINDOW_PROCESSING_COMPLETION = -'正在處理自動完成...' -WINDOW_PROCESSING_SIGNATURE = -'正在處理參數提示...' -WINDOW_PROCESSING_SYMBOL = -'正在處理檔案符號...' -WINDOW_PROCESSING_WS_SYMBOL = -'正在處理工作區符號...' -WINDOW_PROCESSING_SEMANTIC_FULL = -'正在處理全量語義著色...' -WINDOW_PROCESSING_SEMANTIC_RANGE = -'正在處理差量語義著色...' -WINDOW_PROCESSING_HINT = -'正在處理內嵌提示...' -WINDOW_PROCESSING_BUILD_META = -- TODO: need translate! -'Processing build meta...' -WINDOW_INCREASE_UPPER_LIMIT = -'增加上限' -WINDOW_CLOSE = -'關閉' -WINDOW_SETTING_WS_DIAGNOSTIC = -'你可以在設定中延遲或停用工作目錄診斷' -WINDOW_DONT_SHOW_AGAIN = -'不再提示' -WINDOW_DELAY_WS_DIAGNOSTIC = -'空閒時診斷(延遲{}秒)' -WINDOW_DISABLE_DIAGNOSTIC = -'停用工作區診斷' -WINDOW_LUA_STATUS_WORKSPACE = -'工作區:{}' -WINDOW_LUA_STATUS_CACHED_FILES = -'已快取檔案:{ast}/{max}' -WINDOW_LUA_STATUS_MEMORY_COUNT = -'記憶體佔用:{mem:.f}M' -WINDOW_LUA_STATUS_TIP = -[[ - -這個圖標是貓, -不是狗也不是狐狸! - ↓↓↓ -]] -WINDOW_LUA_STATUS_DIAGNOSIS_TITLE= -'進行工作區診斷' -WINDOW_LUA_STATUS_DIAGNOSIS_MSG = -'是否進行工作區診斷?' -WINDOW_APPLY_SETTING = -'套用設定' -WINDOW_CHECK_SEMANTIC = -'如果你正在使用市場中的顏色主題,你可能需要同時修改 `editor.semanticHighlighting.enabled` 選項為 `true` 才會使語義著色生效。' -WINDOW_TELEMETRY_HINT = -'請允許發送匿名的使用資料與錯誤報告,幫助我們進一步完善此延伸模組。在[此處](https://github.com/LuaLS/lua-language-server/wiki/Home#privacy)閱讀我們的隱私聲明。' -WINDOW_TELEMETRY_ENABLE = -'允許' -WINDOW_TELEMETRY_DISABLE = -'禁止' -WINDOW_CLIENT_NOT_SUPPORT_CONFIG = -'你的用戶端不支援從伺服端修改設定,請手動修改以下設定:' -WINDOW_LCONFIG_NOT_SUPPORT_CONFIG= -'暫時不支援自動修改本地設定,請手動修改以下設定:' -WINDOW_MANUAL_CONFIG_ADD = -'為 `{key}` 添加值 `{value:q}`;' -WINDOW_MANUAL_CONFIG_SET = -'將 `{key}` 的值設定為 `{value:q}`;' -WINDOW_MANUAL_CONFIG_PROP = -'將 `{key}` 的屬性 `{prop}` 設定為 `{value:q}`;' -WINDOW_APPLY_WHIT_SETTING = -'套用並修改設定' -WINDOW_APPLY_WHITOUT_SETTING = -'套用但不修改設定' -WINDOW_ASK_APPLY_LIBRARY = -'是否需要將你的工作環境配置為 `{}` ?' -WINDOW_SEARCHING_IN_FILES = -'正在檔案中搜尋...' -WINDOW_CONFIG_LUA_DEPRECATED = -- TODO: need translate! -'`config.lua` is deprecated, please use `config.json` instead.' -WINDOW_CONVERT_CONFIG_LUA = -- TODO: need translate! -'Convert to `config.json`' -WINDOW_MODIFY_REQUIRE_PATH = -- TODO: need translate! -'Do you want to modify the require path?' -WINDOW_MODIFY_REQUIRE_OK = -- TODO: need translate! -'Modify' - -CONFIG_LOAD_FAILED = -'無法讀取設定檔案:{}' -CONFIG_LOAD_ERROR = -'設定檔案載入錯誤:{}' -CONFIG_TYPE_ERROR = -'設定檔案必須是lua或json格式:{}' -CONFIG_MODIFY_FAIL_SYNTAX_ERROR = -- TODO: need translate! -'Failed to modify settings, there are syntax errors in the settings file: {}' -CONFIG_MODIFY_FAIL_NO_WORKSPACE = -- TODO: need translate! -[[ -Failed to modify settings: -* The current mode is single-file mode, server cannot create `.luarc.json` without workspace. -* The language client dose not support modifying settings from the server side. - -Please modify following settings manually: -{} -]] -CONFIG_MODIFY_FAIL = -- TODO: need translate! -[[ -Failed to modify settings - -Please modify following settings manually: -{} -]] - -PLUGIN_RUNTIME_ERROR = -[[ -延伸模組發生錯誤,請彙報給延伸模組作者。 -請在輸出或日誌中查看詳細資訊。 -延伸模組路徑:{} -]] -PLUGIN_TRUST_LOAD = -[[ -目前設定試圖載入位於此位置的延伸模組:{} - -注意,惡意的延伸模組可能會危害您的電腦 -]] -PLUGIN_TRUST_YES = -[[ -信任並載入延伸模組 -]] -PLUGIN_TRUST_NO = -[[ -不要載入此延伸模組 -]] - -CLI_CHECK_ERROR_TYPE = -'check 必須是一個字串,但是是一個 {}' -CLI_CHECK_ERROR_URI = -'check 必須是一個有效的 URI,但是是 {}' -CLI_CHECK_ERROR_LEVEL = -'checklevel 必須是這些值之一:{}' -CLI_CHECK_INITING = -'正在初始化...' -CLI_CHECK_SUCCESS = -'診斷完成,沒有發現問題' -CLI_CHECK_RESULTS = -'診斷完成,共有 {} 個問題,請查看 {}' -CLI_DOC_INITING = -- TODO: need translate! -'Loading documents ...' -CLI_DOC_DONE = -- TODO: need translate! -[[ -Document exporting completed! -Raw data: {} -Markdown(example): {} -]] - -TYPE_ERROR_ENUM_GLOBAL_DISMATCH = -- TODO: need translate! -'Type `{child}` cannot match enumeration type of `{parent}`' -TYPE_ERROR_ENUM_GENERIC_UNSUPPORTED = -- TODO: need translate! -'Cannot use generic `{child}` in enumeration' -TYPE_ERROR_ENUM_LITERAL_DISMATCH = -- TODO: need translate! -'Literal `{child}` cannot match the enumeration value of `{parent}`' -TYPE_ERROR_ENUM_OBJECT_DISMATCH = -- TODO: need translate! -'The object `{child}` cannot match the enumeration value of `{parent}`. They must be the same object' -TYPE_ERROR_ENUM_NO_OBJECT = -- TODO: need translate! -'The passed in enumeration value `{child}` is not recognized' -TYPE_ERROR_INTEGER_DISMATCH = -- TODO: need translate! -'Literal `{child}` cannot match integer `{parent}`' -TYPE_ERROR_STRING_DISMATCH = -- TODO: need translate! -'Literal `{child}` cannot match string `{parent}`' -TYPE_ERROR_BOOLEAN_DISMATCH = -- TODO: need translate! -'Literal `{child}` cannot match boolean `{parent}`' -TYPE_ERROR_TABLE_NO_FIELD = -- TODO: need translate! -'Field `{key}` does not exist in the table' -TYPE_ERROR_TABLE_FIELD_DISMATCH = -- TODO: need translate! -'The type of field `{key}` is `{child}`, which cannot match `{parent}`' -TYPE_ERROR_CHILD_ALL_DISMATCH = -- TODO: need translate! -'All subtypes in `{child}` cannot match `{parent}`' -TYPE_ERROR_PARENT_ALL_DISMATCH = -- TODO: need translate! -'`{child}` cannot match any subtypes in `{parent}`' -TYPE_ERROR_UNION_DISMATCH = -- TODO: need translate! -'`{child}` cannot match `{parent}`' -TYPE_ERROR_OPTIONAL_DISMATCH = -- TODO: need translate! -'Optional type cannot match `{parent}`' -TYPE_ERROR_NUMBER_LITERAL_TO_INTEGER = -- TODO: need translate! -'The number `{child}` cannot be converted to an integer' -TYPE_ERROR_NUMBER_TYPE_TO_INTEGER = -- TODO: need translate! -'Cannot convert number type to integer type' -TYPE_ERROR_DISMATCH = -- TODO: need translate! -'Type `{child}` cannot match `{parent}`' - -LUADOC_DESC_CLASS = -[=[ -定義一個類別/表結構 -## 語法 -`---@class [: [, ]...]` -## 用法 -``` ----@class Manager: Person, Human -Manager = {} -``` ---- -[檢視文件](https://github.com/LuaLS/lua-language-server/wiki/Annotations#class) -]=] -LUADOC_DESC_TYPE = -[=[ -指定一個變數的類型 - -預設類型: `nil` 、 `any` 、 `boolean` 、 `string` 、 `number` 、 `integer`、 -`function` 、 `table` 、 `thread` 、 `userdata` 、 `lightuserdata` - -(可以使用 `@alias` 提供自訂類型) - -## 語法 -`---@type [| [type]...` - -## 用法 -### 一般 -``` ----@type nil|table|myClass -local Example = nil -``` - -### 陣列 -``` ----@type number[] -local phoneNumbers = {} -``` - -### 列舉 -``` ----@type "red"|"green"|"blue" -local color = "" -``` - -### 表 -``` ----@type table -local settings = { - disableLogging = true, - preventShutdown = false, -} - ----@type { [string]: true } -local x --x[""] is true -``` - -### 函式 -``` ----@type fun(mode?: "r"|"w"): string -local myFunction -``` ---- -[檢視文件](https://github.com/LuaLS/lua-language-server/wiki/Annotations#types-and-type) -]=] -LUADOC_DESC_ALIAS = -[=[ -新增你的自訂類型,可以與 `@param`、`@type` 等一起使用。 - -## 語法 -`---@alias [description]`\ -或 -``` ----@alias ----| 'value' [# comment] ----| 'value2' [# comment] -... -``` - -## 用法 -### Expand to other type -``` ----@alias filepath string Path to a file - ----@param path filepath Path to the file to search in -function find(path, pattern) end -``` - -### 列舉 -``` ----@alias font-style ----| '"underlined"' # Underline the text ----| '"bold"' # Bolden the text ----| '"italic"' # Make the text italicized - ----@param style font-style Style to apply -function setFontStyle(style) end -``` - -### Literal Enum -``` -local enums = { - READ = 0, - WRITE = 1, - CLOSED = 2 -} - ----@alias FileStates ----| `enums.READ` ----| `enums.WRITE` ----| `enums.CLOSE` -``` ---- -[檢視文件](https://github.com/LuaLS/lua-language-server/wiki/Annotations#alias) -]=] -LUADOC_DESC_PARAM = -[=[ -宣告一個函式參數 - -## 語法 -`@param [?] [comment]` - -## 用法 -### 一般 -``` ----@param url string The url to request ----@param headers? table HTTP headers to send ----@param timeout? number Timeout in seconds -function get(url, headers, timeout) end -``` - -### 可變引數 -``` ----@param base string The base to concat to ----@param ... string The values to concat -function concat(base, ...) end -``` ---- -[檢視文件](https://github.com/LuaLS/lua-language-server/wiki/Annotations#param) -]=] -LUADOC_DESC_RETURN = -[=[ -宣告一個回傳值 - -## 語法 -`@return [name] [description]`\ -或\ -`@return [# description]` - -## 用法 -### 一般 -``` ----@return number ----@return number # The green component ----@return number b The blue component -function hexToRGB(hex) end -``` - -### 僅限類型和名稱 -``` ----@return number x, number y -function getCoords() end -``` - -### 僅限類型 -``` ----@return string, string -function getFirstLast() end -``` - -### 回傳變數值 -``` ----@return string ... The tags of the item -function getTags(item) end -``` ---- -[檢視文件](https://github.com/LuaLS/lua-language-server/wiki/Annotations#return) -]=] -LUADOC_DESC_FIELD = -[=[ -在類別/表中宣告一個欄位。 這使你可以為表提供更深入詳細的文件。 - -## 語法 -`---@field [description]` - -## 用法 -``` ----@class HTTP_RESPONSE ----@field status HTTP_STATUS ----@field headers table The headers of the response - ----@class HTTP_STATUS ----@field code number The status code of the response ----@field message string A message reporting the status - ----@return HTTP_RESPONSE response The response from the server -function get(url) end - ---This response variable has all of the fields defined above -response = get("localhost") - ---Extension provided intellisense for the below assignment -statusCode = response.status.code -``` ---- -[檢視文件](https://github.com/LuaLS/lua-language-server/wiki/Annotations#field) -]=] -LUADOC_DESC_GENERIC = -[=[ -模擬泛型。 泛型可以允許類型被重用,因為它們有助於定義可用於不同類型的"通用形狀"。 - -## 語法 -`---@generic [:parent_type] [, [:parent_type]]` - -## 用法 -### 一般 -``` ----@generic T ----@param value T The value to return ----@return T value The exact same value -function echo(value) - return value -end - --- Type is string -s = echo("e") - --- Type is number -n = echo(10) - --- Type is boolean -b = echo(true) - --- We got all of this info from just using --- @generic rather than manually specifying --- each allowed type -``` - -### 捕獲泛型類型的名稱 -``` ----@class Foo -local Foo = {} -function Foo:Bar() end - ----@generic T ----@param name `T` # the name generic type is captured here ----@return T # generic type is returned -function Generic(name) end - -local v = Generic("Foo") -- v is an object of Foo -``` - -### Lua 表如何使用泛型 -``` ----@class table: { [K]: V } - --- This is what allows us to create a table --- and intellisense keeps track of any type --- we give for key (K) or value (V) -``` ---- -[檢視文件](https://github.com/LuaLS/lua-language-server/wiki/Annotations#generics-and-generic) -]=] -LUADOC_DESC_VARARG = -[=[ -主要用於對 EmmyLua 註解的向下支援。 `@vararg` 不提供輸入或允許描述。 - -**在記錄參數(變數或非變數)時,您應該改用 `@param`。** - -## 語法 -`@vararg ` - -## 用法 -``` ----Concat strings together ----@vararg string -function concat(...) end -``` ---- -[檢視文件](https://github.com/LuaLS/lua-language-server/wiki/Annotations#vararg) -]=] -LUADOC_DESC_OVERLOAD = -[=[ -允許定義多個函數簽章。 - -## 語法 -`---@overload fun([: ] [, [: ]]...)[: [, ]...]` - -## 用法 -``` ----@overload fun(t: table, value: any): number -function table.insert(t, position, value) end -``` ---- -[檢視文件](https://github.com/LuaLS/lua-language-server/wiki/Annotations#overload) -]=] -LUADOC_DESC_DEPRECATED = -[=[ -將函式標記為已棄用。 這會導致任何不推薦使用的函式呼叫被 ~~擊穿~~。 - -## 語法 -`---@deprecated` - ---- -[檢視文件](https://github.com/LuaLS/lua-language-server/wiki/Annotations#deprecated) -]=] -LUADOC_DESC_META = -[=[ -表示這是一個中繼檔案,應僅用於定義和智慧感知。 - -中繼檔案有 3 個主要區別需要注意: -1. 中繼檔案中不會有任何基於上下文的智慧感知 -2. 將 `require` 檔案路徑懸停在中繼檔案中會顯示 `[meta]` 而不是絕對路徑 -3. `Find Reference` 功能會忽略中繼檔案 - -## 語法 -`---@meta` - ---- -[檢視文件](https://github.com/LuaLS/lua-language-server/wiki/Annotations#meta) -]=] -LUADOC_DESC_VERSION = -[=[ -指定此函式獨有的 Lua 版本。 - -Lua 版本:`5.1` 、 `5.2` 、 `5.3` 、 `5.4` 、 `JIT`。 - -需要 `Diagnostics: Needed File Status` 設定。 - -## 語法 -`---@version [, ]...` - -## 用法 -### 一般 -``` ----@version JIT -function onlyWorksInJIT() end -``` -### 指定多個版本 -``` ----@version <5.2,JIT -function oldLuaOnly() end -``` ---- -[檢視文件](https://github.com/LuaLS/lua-language-server/wiki/Annotations#version) -]=] -LUADOC_DESC_SEE = -[=[ -定義可以檢視以獲取更多資訊的內容 - -## Syntax -`---@see ` - ---- -[檢視文件](https://github.com/LuaLS/lua-language-server/wiki/Annotations#see) -]=] -LUADOC_DESC_DIAGNOSTIC = -[=[ -啟用/停用診斷錯誤與警告等。 - -操作:`disable` 、 `enable` 、 `disable-line` 、 `disable-next-line` - -[名稱](https://github.com/LuaLS/lua-language-server/blob/cbb6e6224094c4eb874ea192c5f85a6cba099588/script/proto/define.lua#L54) - -## 語法 -`---@diagnostic [: ]` - -## 用法 -### 停用下一行 -``` ----@diagnostic disable-next-line: undefined-global -``` - -### 手動切換 -``` ----@diagnostic disable: unused-local -local unused = "hello world" ----@diagnostic enable: unused-local -``` ---- -[檢視文件](https://github.com/LuaLS/lua-language-server/wiki/Annotations#diagnostic) -]=] -LUADOC_DESC_MODULE = -[=[ -提供 `require` 的語義。 - -## 語法 -`---@module <'module_name'>` - -## 用法 -``` ----@module 'string.utils' -local stringUtils --- This is functionally the same as: -local module = require('string.utils') -``` ---- -[檢視文件](https://github.com/LuaLS/lua-language-server/wiki/Annotations#module) -]=] -LUADOC_DESC_ASYNC = -[=[ -將函式標記為非同步。 - -## 語法 -`---@async` - ---- -[檢視文件](https://github.com/LuaLS/lua-language-server/wiki/Annotations#async) -]=] -LUADOC_DESC_NODISCARD = -[=[ -防止此函式的回傳值被丟棄/忽略。 -如果忽略回傳值,這將引發 `discard-returns` 警告。 - -## 語法 -`---@nodiscard` - ---- -[檢視文件](https://github.com/LuaLS/lua-language-server/wiki/Annotations#nodiscard) -]=] -LUADOC_DESC_CAST = -[=[ -允許轉型(類型轉換)。 - -## 語法 -`@cast <[+|-]type>[, <[+|-]type>]...` - -## 用法 -### 覆蓋類型 -``` ----@type integer -local x --> integer - ----@cast x string -print(x) --> string -``` -### 增加類型 -``` ----@type string -local x --> string - ----@cast x +boolean, +number -print(x) --> string|boolean|number -``` -### 移除類型 -``` ----@type string|table -local x --> string|table - ----@cast x -string -print(x) --> table -``` ---- -[檢視文件](https://github.com/LuaLS/lua-language-server/wiki/Annotations#cast) -]=] -LUADOC_DESC_OPERATOR = -- TODO: need translate! -[=[ -Provide type declaration for [operator metamethods](http://lua-users.org/wiki/MetatableEvents). - -## Syntax -`@operator [(input_type)]:` - -## Usage -### Vector Add Metamethod -``` ----@class Vector ----@operation add(Vector):Vector - -vA = Vector.new(1, 2, 3) -vB = Vector.new(10, 20, 30) - -vC = vA + vB ---> Vector -``` -### Unary Minus -``` ----@class Passcode ----@operation unm:integer - -pA = Passcode.new(1234) -pB = -pA ---> integer -``` -[View Request](https://github.com/LuaLS/lua-language-server/issues/599) -]=] -LUADOC_DESC_ENUM = -- TODO: need translate! -[=[ -Mark a table as an enum. If you want an enum but can't define it as a Lua -table, take a look at the [`@alias`](https://github.com/LuaLS/lua-language-server/wiki/Annotations#alias) -tag. - -## Syntax -`@enum ` - -## Usage -``` ----@enum colors -local colors = { - white = 0, - orange = 2, - yellow = 4, - green = 8, - black = 16, -} - ----@param color colors -local function setColor(color) end - --- Completion and hover is provided for the below param -setColor(colors.green) -``` -]=] -LUADOC_DESC_PACKAGE = -- TODO: need translate! -[=[ -Mark a function as private to the file it is defined in. A packaged function -cannot be accessed from another file. - -## Syntax -`@package` - -## Usage -``` ----@class Animal ----@field private eyes integer -local Animal = {} - ----@package ----This cannot be accessed in another file -function Animal:eyesCount() - return self.eyes -end -``` -]=] -LUADOC_DESC_PRIVATE = -- TODO: need translate! -[=[ -Mark a function as private to a @class. Private functions can be accessed only -from within their class and are not accessable from child classes. - -## Syntax -`@private` - -## Usage -``` ----@class Animal ----@field private eyes integer -local Animal = {} - ----@private -function Animal:eyesCount() - return self.eyes -end - ----@class Dog:Animal -local myDog = {} - ----NOT PERMITTED! -myDog:eyesCount(); -``` -]=] -LUADOC_DESC_PROTECTED = -- TODO: need translate! -[=[ -Mark a function as protected within a @class. Protected functions can be -accessed only from within their class or from child classes. - -## Syntax -`@protected` - -## Usage -``` ----@class Animal ----@field private eyes integer -local Animal = {} - ----@protected -function Animal:eyesCount() - return self.eyes -end - ----@class Dog:Animal -local myDog = {} - ----Permitted because function is protected, not private. -myDog:eyesCount(); -``` -]=] diff --git a/.building/lua-language-server-3.6.18-win32-x64/locale/zh-tw/setting.lua b/.building/lua-language-server-3.6.18-win32-x64/locale/zh-tw/setting.lua deleted file mode 100644 index 8c74668da..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/locale/zh-tw/setting.lua +++ /dev/null @@ -1,429 +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.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['invisible'] = -- TODO: need translate! -'Enable diagnostics for accesses to fields which are invisible.' -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['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.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 ...' diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/basic.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/basic.lua deleted file mode 100644 index 0e61845ff..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/basic.lua +++ /dev/null @@ -1,398 +0,0 @@ ----@meta _ - ---- ----独立版Lua的启动参数。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-arg"]) ---- ----@type string[] -arg = {} - ---- ----如果其参数 `v` 的值为假(`nil` 或 `false`), 它就调用 [error](command:extension.lua.doc?["en-us/54/manual.html/pdf-error"]); 否则,返回所有的参数。 在错误情况时, `message` 指那个错误对象; 如果不提供这个参数,参数默认为 `"assertion failed!"` 。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-assert"]) ---- ----@generic T ----@param v? T ----@param message? any ----@return T ----@return any ... -function assert(v, message, ...) end - ----@alias gcoptions ----|>"collect" # 做一次完整的垃圾收集循环。 ----| "stop" # 停止垃圾收集器的运行。 ----| "restart" # 重启垃圾收集器的自动运行。 ----| "count" # 以 K 字节数为单位返回 Lua 使用的总内存数。 ----| "step" # 单步运行垃圾收集器。 步长“大小”由 `arg` 控制。 ----| "isrunning" # 返回表示收集器是否在工作的布尔值。 ----| "incremental" # 改变收集器模式为增量模式。 ----| "generational" # 改变收集器模式为分代模式。 - ---- ----这个函数是垃圾收集器的通用接口。 通过参数 opt 它提供了一组不同的功能。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-collectgarbage"]) ---- ----@param opt? gcoptions ----@return any -function collectgarbage(opt, ...) end - ---- ----打开该名字的文件,并执行文件中的 Lua 代码块。 不带参数调用时, `dofile` 执行标准输入的内容(`stdin`)。 返回该代码块的所有返回值。 对于有错误的情况,`dofile` 将错误反馈给调用者 (即,`dofile` 没有运行在保护模式下)。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-dofile"]) ---- ----@param filename? string ----@return any ... -function dofile(filename) end - ---- ----中止上一次保护函数调用, 将错误对象 `message` 返回。 函数 `error` 永远不会返回。 ---- ----当 `message` 是一个字符串时,通常 `error` 会把一些有关出错位置的信息附加在消息的前头。 level 参数指明了怎样获得出错位置。 ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-error"]) ---- ----@param message any ----@param level? integer -function error(message, level) end - ---- ----一个全局变量(非函数), 内部储存有全局环境(参见 [§2.2](command:extension.lua.doc?["en-us/54/manual.html/2.2"]))。 Lua 自己不使用这个变量; 改变这个变量的值不会对任何环境造成影响,反之亦然。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-_G"]) ---- ----@class _G -_G = {} - ----@version 5.1 ---- ----返回给定函数的环境。`f` 可以是一个Lua函数,也可是一个表示调用栈层级的数字。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-getfenv"]) ---- ----@param f? integer|async fun(...):... ----@return table ----@nodiscard -function getfenv(f) end - ---- ----如果 `object` 不包含元表,返回 `nil` 。 否则,如果在该对象的元表中有 `"__metatable"` 域时返回其关联值, 没有时返回该对象的元表。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-getmetatable"]) ---- ----@param object any ----@return table metatable ----@nodiscard -function getmetatable(object) end - ---- ----返回三个值(迭代函数、表 `t` 以及 `0` ), 如此,以下代码 ----```lua ---- for i,v in ipairs(t) do body end ----``` ----将迭代键值对 `(1,t[1]) ,(2,t[2]), ...` ,直到第一个空值。 ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-ipairs"]) ---- ----@generic T: table, V ----@param t T ----@return fun(table: V[], i?: integer):integer, V ----@return T ----@return integer i -function ipairs(t) end - ----@alias loadmode ----| "b" # 只能是二进制代码块。 ----| "t" # 只能是文本代码块。 ----|>"bt" # 可以是二进制也可以是文本。 - ---- ----加载一个代码块。 ---- ----如果 `chunk` 是一个字符串,代码块指这个字符串。 如果 `chunk` 是一个函数, `load` 不断地调用它获取代码块的片断。 每次对 `chunk` 的调用都必须返回一个字符串紧紧连接在上次调用的返回串之后。 当返回空串、`nil`、或是不返回值时,都表示代码块结束。 ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-load"]) ---- ----@param chunk string|function ----@param chunkname? string ----@param mode? loadmode ----@param env? table ----@return function? ----@return string? error_message ----@nodiscard -function load(chunk, chunkname, mode, env) end - ---- ----从文件 `filename` 或标准输入(如果文件名未提供)中获取代码块。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-loadfile"]) ---- ----@param filename? string ----@param mode? loadmode ----@param env? table ----@return function? ----@return string? error_message ----@nodiscard -function loadfile(filename, mode, env) end - ----@version 5.1 ---- ----使用给定字符串加载代码块。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-loadstring"]) ---- ----@param text string ----@param chunkname? string ----@return function? ----@return string? error_message ----@nodiscard -function loadstring(text, chunkname) end - ----@version 5.1 ----@param proxy boolean|table|userdata ----@return userdata ----@nodiscard -function newproxy(proxy) end - ----@version 5.1 ---- ----创建一个模块。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-module"]) ---- ----@param name string -function module(name, ...) end - ---- ----运行程序来遍历表中的所有域。 第一个参数是要遍历的表,第二个参数是表中的某个键。 `next` 返回该键的下一个键及其关联的值。 如果用 `nil` 作为第二个参数调用 `next` 将返回初始键及其关联值。 当以最后一个键去调用,或是以 `nil` 调用一张空表时, `next` 返回 `nil`。 如果不提供第二个参数,将认为它就是 `nil`。 特别指出,你可以用 `next(t)` 来判断一张表是否是空的。 ---- ----索引在遍历过程中的次序无定义, 即使是数字索引也是这样。 (如果想按数字次序遍历表,可以使用数字形式的 `for` 。) ---- ----当在遍历过程中你给表中并不存在的域赋值, `next` 的行为是未定义的。 然而你可以去修改那些已存在的域。 特别指出,你可以清除一些已存在的域。 ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-next"]) ---- ----@generic K, V ----@param table table ----@param index? K ----@return K? ----@return V? ----@nodiscard -function next(table, index) end - ---- ----如果 `t` 有元方法 `__pairs`, 以 `t` 为参数调用它,并返回其返回的前三个值。 ---- ----否则,返回三个值:`next` 函数, 表 `t`,以及 `nil`。 因此以下代码 ----```lua ---- for k,v in pairs(t) do body end ----``` ----能迭代表 `t` 中的所有键值对。 ---- ----参见函数 [next](command:extension.lua.doc?["en-us/54/manual.html/pdf-next"]) 中关于迭代过程中修改表的风险。 ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-pairs"]) ---- ----@generic T: table, K, V ----@param t T ----@return fun(table: table, index?: K):K, V ----@return T -function pairs(t) end - ---- ----传入参数,以 *保护模式* 调用函数 `f` 。 这意味着 `f` 中的任何错误不会抛出; 取而代之的是,`pcall` 会将错误捕获到,并返回一个状态码。 第一个返回值是状态码(一个布尔量), 当没有错误时,其为真。 此时,`pcall` 同样会在状态码后返回所有调用的结果。 在有错误时,`pcall` 返回 `false` 加错误消息。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-pcall"]) ---- ----@param f async fun(...):... ----@param arg1? any ----@return boolean success ----@return any result ----@return any ... -function pcall(f, arg1, ...) end - ---- ----接收任意数量的参数,并将它们的值打印到 `stdout`。 它用 `tostring` 函数将每个参数都转换为字符串。 `print` 不用于做格式化输出。仅作为看一下某个值的快捷方式。 多用于调试。 完整的对输出的控制,请使用 [string.format](command:extension.lua.doc?["en-us/54/manual.html/pdf-string.format"]) 以及 [io.write](command:extension.lua.doc?["en-us/54/manual.html/pdf-io.write"])。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-print"]) ---- -function print(...) end - ---- ----在不触发任何元方法的情况下 检查 `v1` 是否和 `v2` 相等。 返回一个布尔量。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-rawequal"]) ---- ----@param v1 any ----@param v2 any ----@return boolean ----@nodiscard -function rawequal(v1, v2) end - ---- ----在不触发任何元方法的情况下 获取 `table[index]` 的值。 `table` 必须是一张表; `index` 可以是任何值。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-rawget"]) ---- ----@param table table ----@param index any ----@return any ----@nodiscard -function rawget(table, index) end - ---- ----在不触发任何元方法的情况下 返回对象 `v` 的长度。 `v` 可以是表或字符串。 它返回一个整数。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-rawlen"]) ---- ----@param v table|string ----@return integer len ----@nodiscard -function rawlen(v) end - ---- ----在不触发任何元方法的情况下 将 `table[index]` 设为 `value。` `table` 必须是一张表, `index` 可以是 `nil` 与 `NaN` 之外的任何值。 `value` 可以是任何 Lua 值。 ----这个函数返回 `table`。 ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-rawset"]) ---- ----@param table table ----@param index any ----@param value any ----@return table -function rawset(table, index, value) end - ---- ----如果 `index` 是个数字, 那么返回参数中第 `index` 个之后的部分; 负的数字会从后向前索引(`-1` 指最后一个参数)。 否则,`index` 必须是字符串 `"#"`, 此时 `select` 返回参数的个数。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-select"]) ---- ----@param index integer|"#" ----@return any ----@nodiscard -function select(index, ...) end - ----@version 5.1 ---- ----设置给定函数的环境。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-setfenv"]) ---- ----@param f async fun(...):...|integer ----@param table table ----@return function -function setfenv(f, table) end - ---- ----给指定表设置元表。 (你不能在 Lua 中改变其它类型值的元表,那些只能在 C 里做。) 如果 `metatable` 是 `nil`, 将指定表的元表移除。 如果原来那张元表有 `"__metatable"` 域,抛出一个错误。 ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-setmetatable"]) ---- ----@param table table ----@param metatable? table ----@return table -function setmetatable(table, metatable) end - ---- ----如果调用的时候没有 `base`, `tonumber` 尝试把参数转换为一个数字。 如果参数已经是一个数字,或是一个可以转换为数字的字符串, `tonumber` 就返回这个数字; 否则返回 `nil`。 ---- ----字符串的转换结果可能是整数也可能是浮点数, 这取决于 Lua 的转换文法(参见 [§3.1](command:extension.lua.doc?["en-us/54/manual.html/3.1"]))。 (字符串可以有前置和后置的空格,可以带符号。) ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-tonumber"]) ---- ----@overload fun(e: string, base: integer):integer ----@param e any ----@return number? ----@nodiscard -function tonumber(e) end - ---- ----可以接收任何类型,它将其转换为人可阅读的字符串形式。 浮点数总被转换为浮点数的表现形式(小数点形式或是指数形式)。 (如果想完全控制数字如何被转换,可以使用 [string.format](command:extension.lua.doc?["en-us/54/manual.html/pdf-string.format"])。) ----如果 `v` 有 `"__tostring"` 域的元表, `tostring` 会以 `v` 为参数调用它。 并用它的结果作为返回值。 ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-tostring"]) ---- ----@param v any ----@return string ----@nodiscard -function tostring(v) end - ----@alias type ----| "nil" ----| "number" ----| "string" ----| "boolean" ----| "table" ----| "function" ----| "thread" ----| "userdata" - ---- ----将参数的类型编码为一个字符串返回。 函数可能的返回值有 `"nil"` (一个字符串,而不是 `nil` 值), `"number"`, `"string"`, `"boolean"`, `"table"`, `"function"`, `"thread"`, `"userdata"`。 ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-type"]) ---- ----@param v any ----@return type type ----@nodiscard -function type(v) end - ---- ----一个包含有当前解释器版本号的全局变量(并非函数)。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-_VERSION"]) ---- -_VERSION = "Lua 5.4" - ----@version >5.4 ---- ----使用所有参数组成的字符串消息来发送警告。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-warn"]) ---- ----@param message string -function warn(message, ...) end - ---- ----传入参数,以 *保护模式* 调用函数 `f` 。这个函数和 `pcall` 类似。 不过它可以额外设置一个消息处理器 `msgh`。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-xpcall"]) ---- ----@param f async fun(...):... ----@param msgh function ----@param arg1? any ----@return boolean success ----@return any result ----@return any ... -function xpcall(f, msgh, arg1, ...) end - ----@version 5.1 ---- ----返回给定 `list` 中的所有元素。 改函数等价于 ----```lua ----return list[i], list[i+1], ···, list[j] ----``` ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-unpack"]) ---- ----@generic T ----@param list T[] ----@param i? integer ----@param j? integer ----@return T ... ----@nodiscard -function unpack(list, i, j) end diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/bit.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/bit.lua deleted file mode 100644 index a6987e344..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/bit.lua +++ /dev/null @@ -1,79 +0,0 @@ ----@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 diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/bit32.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/bit32.lua deleted file mode 100644 index 745456ef3..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/bit32.lua +++ /dev/null @@ -1,156 +0,0 @@ ----@meta bit32 - ----@version 5.2 ---- ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-bit32"]) ---- ----@class bit32lib -bit32 = {} - ---- ----返回 `x` 向右位移 `disp` 位的结果。`disp` 为负时向左位移。这是算数位移操作,左侧的空位使用 `x` 的高位填充,右侧空位使用 `0` 填充。 ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-bit32.arshift"]) ---- ----@param x integer ----@param disp integer ----@return integer ----@nodiscard -function bit32.arshift(x, disp) end - ---- ----返回参数按位与的结果。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-bit32.band"]) ---- ----@return integer ----@nodiscard -function bit32.band(...) end - ---- ----返回 `x` 按位取反的结果。 ---- ----```lua ----assert(bit32.bnot(x) == ----(-1 - x) % 2^32) ----``` ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-bit32.bnot"]) ---- ----@param x integer ----@return integer ----@nodiscard -function bit32.bnot(x) end - ---- ----返回参数按位或的结果。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-bit32.bor"]) ---- ----@return integer ----@nodiscard -function bit32.bor(...) end - ---- ----参数按位与的结果不为0时,返回 `true` 。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-bit32.btest"]) ---- ----@return boolean ----@nodiscard -function bit32.btest(...) end - ---- ----返回参数按位异或的结果。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-bit32.bxor"]) ---- ----@return integer ----@nodiscard -function bit32.bxor(...) end - ---- ----返回 `n` 中第 `field` 到第 `field + width - 1` 位组成的结果。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-bit32.extract"]) ---- ----@param n integer ----@param field integer ----@param width? integer ----@return integer ----@nodiscard -function bit32.extract(n, field, width) end - ---- ----返回 `v` 的第 `field` 到第 `field + width - 1` 位替换 `n` 的对应位后的结果。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-bit32.replace"]) ---- ----@param n integer ----@param v integer ----@param field integer ----@param width? integer ----@nodiscard -function bit32.replace(n, v, field, width) end - ---- ----返回 `x` 向左旋转 `disp` 位的结果。`disp` 为负时向右旋转。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-bit32.lrotate"]) ---- ----@param x integer ----@param distp integer ----@return integer ----@nodiscard -function bit32.lrotate(x, distp) end - ---- ----返回 `x` 向左位移 `disp` 位的结果。`disp` 为负时向右位移。空位总是使用 `0` 填充。 ---- ----```lua ----assert(bit32.lshift(b, disp) == ----(b * 2^disp) % 2^32) ----``` ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-bit32.lshift"]) ---- ----@param x integer ----@param distp integer ----@return integer ----@nodiscard -function bit32.lshift(x, distp) end - ---- ----返回 `x` 向右旋转 `disp` 位的结果。`disp` 为负时向左旋转。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-bit32.rrotate"]) ---- ----@param x integer ----@param distp integer ----@return integer ----@nodiscard -function bit32.rrotate(x, distp) end - ---- ----返回 `x` 向右位移 `disp` 位的结果。`disp` 为负时向左位移。空位总是使用 `0` 填充。 ---- ----```lua ----assert(bit32.lshift(b, disp) == ----(b * 2^disp) % 2^32) ----``` ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-bit32.rshift"]) ---- ----@param x integer ----@param distp integer ----@return integer ----@nodiscard -function bit32.rshift(x, distp) end - -return bit32 diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/builtin.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/builtin.lua deleted file mode 100644 index 466a0966e..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/builtin.lua +++ /dev/null @@ -1,16 +0,0 @@ ----@meta _ - ----@class unknown ----@class any ----@class nil ----@class boolean ----@class true: boolean ----@class false: boolean ----@class number ----@class integer: number ----@class thread ----@class table: { [K]: V } ----@class string: stringlib ----@class userdata ----@class lightuserdata ----@class function diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/coroutine.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/coroutine.lua deleted file mode 100644 index 5fd2194b8..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/coroutine.lua +++ /dev/null @@ -1,96 +0,0 @@ ----@meta coroutine - ---- ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-coroutine"]) ---- ----@class coroutinelib -coroutine = {} - ---- ----创建一个主体函数为 `f` 的新协程。 f 必须是一个 Lua 的函数。 返回这个新协程,它是一个类型为 `"thread"` 的对象。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-coroutine.create"]) ---- ----@param f async fun(...):... ----@return thread ----@nodiscard -function coroutine.create(f) end - ---- ----如果协程 `co` 可以让出,则返回真。`co` 默认为正在运行的协程。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-coroutine.isyieldable"]) ---- ----@param co? thread ----@return boolean ----@nodiscard -function coroutine.isyieldable(co) end - ----@version >5.4 ---- ----关闭协程 `co`,并关闭它所有等待 *to-be-closed* 的变量,并将协程状态设为 `dead` 。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-coroutine.close"]) ---- ----@param co thread ----@return boolean noerror ----@return any errorobject -function coroutine.close(co) end - ---- ----开始或继续协程 `co` 的运行。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-coroutine.resume"]) ---- ----@param co thread ----@param val1? any ----@return boolean success ----@return any ... -function coroutine.resume(co, val1, ...) end - ---- ----返回当前正在运行的协程加一个布尔量。 如果当前运行的协程是主线程,其为真。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-coroutine.running"]) ---- ----@return thread running ----@return boolean ismain ----@nodiscard -function coroutine.running() end - ---- ----以字符串形式返回协程 `co` 的状态。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-coroutine.status"]) ---- ----@param co thread ----@return ----| '"running"' # 正在运行。 ----| '"suspended"' # 挂起或是还没有开始运行。 ----| '"normal"' # 是活动的,但并不在运行。 ----| '"dead"' # 运行完主体函数或因错误停止。 ----@nodiscard -function coroutine.status(co) end - ---- ----创建一个主体函数为 `f` 的新协程。 f 必须是一个 Lua 的函数。 返回一个函数, 每次调用该函数都会延续该协程。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-coroutine.wrap"]) ---- ----@param f async fun(...):... ----@return fun(...):... ----@nodiscard -function coroutine.wrap(f) end - ---- ----挂起正在调用的协程的执行。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-coroutine.yield"]) ---- ----@async ----@return any ... -function coroutine.yield(...) end - -return coroutine diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/debug.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/debug.lua deleted file mode 100644 index 40c800951..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/debug.lua +++ /dev/null @@ -1,268 +0,0 @@ ----@meta debug - ---- ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-debug"]) ---- ----@class debuglib -debug = {} - ----@class debuginfo ----@field name string ----@field namewhat string ----@field source string ----@field short_src string ----@field linedefined integer ----@field lastlinedefined integer ----@field what string ----@field currentline integer ----@field istailcall boolean ----@field nups integer ----@field nparams integer ----@field isvararg boolean ----@field func function ----@field ftransfer integer ----@field ntransfer integer ----@field activelines table - ---- ----进入一个用户交互模式,运行用户输入的每个字符串。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-debug.debug"]) ---- -function debug.debug() end - ----@version 5.1 ---- ----返回对象 `o` 的环境。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-debug.getfenv"]) ---- ----@param o any ----@return table ----@nodiscard -function debug.getfenv(o) end - ---- ----返回三个表示线程钩子设置的值: 当前钩子函数,当前钩子掩码,当前钩子计数 。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-debug.gethook"]) ---- ----@param co? thread ----@return function hook ----@return string mask ----@return integer count ----@nodiscard -function debug.gethook(co) end - ----@alias infowhat string ----|+"n" # `name` 和 `namewhat` ----|+"S" # `source`,`short_src`,`linedefined`,`lalinedefined`,和 `what` ----|+"l" # `currentline` ----|+"t" # `istailcall` ----|+"u" # `nups`、`nparams` 和 `isvararg` ----|+"f" # `func` ----|+"r" # `ftransfer` 和 `ntransfer` ----|+"L" # `activelines` - ---- ----返回关于一个函数信息的表。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-debug.getinfo"]) ---- ----@overload fun(f: integer|function, what?: infowhat):debuginfo ----@param thread thread ----@param f integer|async fun(...):... ----@param what? infowhat ----@return debuginfo ----@nodiscard -function debug.getinfo(thread, f, what) end - ---- ----返回在栈的 `f` 层处函数的索引为 `index` 的局部变量的名字和值。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-debug.getlocal"]) ---- ----@overload fun(f: integer|async fun(...):..., index: integer):string, any ----@param thread thread ----@param f integer|async fun(...):... ----@param index integer ----@return string name ----@return any value ----@nodiscard -function debug.getlocal(thread, f, index) end - ---- ----返回给定 `value` 的元表。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-debug.getmetatable"]) ---- ----@param object any ----@return table metatable ----@nodiscard -function debug.getmetatable(object) end - ---- ----返回注册表。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-debug.getregistry"]) ---- ----@return table ----@nodiscard -function debug.getregistry() end - ---- ----返回函数 `f` 的第 `up` 个上值的名字和值。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-debug.getupvalue"]) ---- ----@param f async fun(...):... ----@param up integer ----@return string name ----@return any value ----@nodiscard -function debug.getupvalue(f, up) end - ---- ----返回关联在 `u` 上的第 `n` 个 `Lua` 值,以及一个布尔,`false`表示值不存在。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-debug.getuservalue"]) ---- ----@param u userdata ----@param n? integer ----@return any ----@return boolean ----@nodiscard -function debug.getuservalue(u, n) end - ---- ----### **已在 `Lua 5.4.2` 中废弃** ---- ----设置新的C栈限制。该限制控制Lua中嵌套调用的深度,以避免堆栈溢出。 ---- ----如果设置成功,该函数返回之前的限制;否则返回`false`。 ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-debug.setcstacklimit"]) ---- ----@deprecated ----@param limit integer ----@return integer|boolean -function debug.setcstacklimit(limit) end - ---- ----将 `table` 设置为 `object` 的环境。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-debug.setfenv"]) ---- ----@version 5.1 ----@generic T ----@param object T ----@param env table ----@return T object -function debug.setfenv(object, env) end - ----@alias hookmask string ----|+"c" # 每当 Lua 调用一个函数时,调用钩子。 ----|+"r" # 每当 Lua 从一个函数内返回时,调用钩子。 ----|+"l" # 每当 Lua 进入新的一行时,调用钩子。 - ---- ----将一个函数作为钩子函数设入。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-debug.sethook"]) ---- ----@overload fun(hook: (async fun(...):...), mask: hookmask, count?: integer) ----@overload fun(thread: thread):... ----@overload fun(...):... ----@param thread thread ----@param hook async fun(...):... ----@param mask hookmask ----@param count? integer -function debug.sethook(thread, hook, mask, count) end - ---- ----将 `value` 赋给 栈上第 `level` 层函数的第 `local` 个局部变量。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-debug.setlocal"]) ---- ----@overload fun(level: integer, index: integer, value: any):string ----@param thread thread ----@param level integer ----@param index integer ----@param value any ----@return string name -function debug.setlocal(thread, level, index, value) end - ---- ----将 `value` 的元表设为 `table` (可以是 `nil`)。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-debug.setmetatable"]) ---- ----@generic T ----@param value T ----@param meta? table ----@return T value -function debug.setmetatable(value, meta) end - ---- ----将 `value` 设为函数 `f` 的第 `up` 个上值。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-debug.setupvalue"]) ---- ----@param f async fun(...):... ----@param up integer ----@param value any ----@return string name -function debug.setupvalue(f, up, value) end - ---- ----将 `value` 设为 `udata` 的第 `n` 个关联值。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-debug.setuservalue"]) ---- ----@param udata userdata ----@param value any ----@param n? integer ----@return userdata udata -function debug.setuservalue(udata, value, n) end - ---- ----返回调用栈的栈回溯信息。 字符串可选项 `message` 被添加在栈回溯信息的开头。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-debug.traceback"]) ---- ----@overload fun(message?: any, level?: integer): string ----@param thread thread ----@param message? any ----@param level? integer ----@return string message ----@nodiscard -function debug.traceback(thread, message, level) end - ----@version >5.2, JIT ---- ----返回指定函数第 `n` 个上值的唯一标识符(一个轻量用户数据)。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-debug.upvalueid"]) ---- ----@param f async fun(...):... ----@param n integer ----@return lightuserdata id ----@nodiscard -function debug.upvalueid(f, n) end - ----@version >5.2, JIT ---- ----让 Lua 闭包 `f1` 的第 `n1` 个上值 引用 `Lua` 闭包 `f2` 的第 `n2` 个上值。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-debug.upvaluejoin"]) ---- ----@param f1 async fun(...):... ----@param n1 integer ----@param f2 async fun(...):... ----@param n2 integer -function debug.upvaluejoin(f1, n1, f2, n2) end - -return debug diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/ffi.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/ffi.lua deleted file mode 100644 index 9fd3aeedb..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/ffi.lua +++ /dev/null @@ -1,121 +0,0 @@ ----@meta ffi - ----@class ffi.namespace*: table ----@field [string] function - ----@class ffi.ctype*: userdata ----@overload fun(init?: any, ...): ffi.cdata* ----@overload fun(nelem?: integer, init?: any, ...): ffi.cdata* -local ctype - ----@class ffi.cdecl*: string ----@class ffi.cdata*: userdata ----@alias ffi.ct* ffi.ctype*|ffi.cdecl*|ffi.cdata* ----@class ffi.cb*: ffi.cdata* -local cb ----@class ffi.VLA*: userdata ----@class ffi.VLS*: userdata - ----@version JIT ----@class ffilib ----@field C ffi.namespace* ----@field os string ----@field arch string -local ffi = {} - ----@param def string ----@param params? any -function ffi.cdef(def, params, ...) end - ----@param name string ----@param global? boolean ----@return ffi.namespace* clib ----@nodiscard -function ffi.load(name, global) end - ----@overload fun(ct: ffi.ct*, init: any, ...) ----@param ct ffi.ct* ----@param nelem? integer ----@param init? any ----@return ffi.cdata* cdata ----@nodiscard -function ffi.new(ct, nelem, init, ...) end - ----@param ct ffi.ct* ----@param params? any ----@return ffi.ctype* ctype ----@nodiscard -function ffi.typeof(ct, params, ...) end - ----@param ct ffi.ct* ----@param init any ----@return ffi.cdata* cdata ----@nodiscard -function ffi.cast(ct, init) end - ----@param ct ffi.ct* ----@param metatable table ----@return ffi.ctype* ctype -function ffi.metatype(ct, metatable) end - ----@param cdata ffi.cdata* ----@param finalizer? function ----@return ffi.cdata* cdata -function ffi.gc(cdata, finalizer) end - ----@param ct ffi.ct* ----@param nelem? integer ----@return integer|nil size ----@nodiscard -function ffi.sizeof(ct, nelem) end - ----@param ct ffi.ct* ----@return integer align ----@nodiscard -function ffi.alignof(ct) end - ----@param ct ffi.ct* ----@param field string ----@return integer ofs ----@return integer? bpos ----@return integer? bsize ----@nodiscard -function ffi.offsetof(ct, field) end - ----@param ct ffi.ct* ----@param obj any ----@return boolean status ----@nodiscard -function ffi.istype(ct, obj) end - ----@param newerr? integer ----@return integer err ----@nodiscard -function ffi.errno(newerr) end - ----@param ptr any ----@param len? integer ----@return string str -function ffi.string(ptr, len) end - ----@overload fun(dst: any, str: string) ----@param dst any ----@param src any ----@param len integer -function ffi.copy(dst, src, len) end - ----@param dst any ----@param len integer ----@param c? any -function ffi.fill(dst, len, c) end - ----@param param string ----@return boolean status -function ffi.abi(param) end - -function cb:free() end - ----@param func function -function cb:set(func) end - -return ffi diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/io.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/io.lua deleted file mode 100644 index 573ec74fa..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/io.lua +++ /dev/null @@ -1,265 +0,0 @@ ----@meta io - ---- ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-io"]) ---- ----@class iolib ---- ----标准输入。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-io.stdin"]) ---- ----@field stdin file* ---- ----标准输出。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-io.stdout"]) ---- ----@field stdout file* ---- ----标准错误。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-io.stderr"]) ---- ----@field stderr file* -io = {} - ----@alias openmode ----|>"r" # 读模式。 ----| "w" # 写模式。 ----| "a" # 追加模式。 ----| "r+" # 更新模式,所有之前的数据都保留。 ----| "w+" # 更新模式,所有之前的数据都删除。 ----| "a+" # 追加更新模式,所有之前的数据都保留,只允许在文件尾部做写入。 ----| "rb" # 读模式。(二进制方式) ----| "wb" # 写模式。(二进制方式) ----| "ab" # 追加模式。(二进制方式) ----| "r+b" # 更新模式,所有之前的数据都保留。(二进制方式) ----| "w+b" # 更新模式,所有之前的数据都删除。(二进制方式) ----| "a+b" # 追加更新模式,所有之前的数据都保留,只允许在文件尾部做写入。(二进制方式) - ---- ----关闭 `file` 或默认输出文件。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-io.close"]) ---- ----@param file? file* ----@return boolean? suc ----@return exitcode? exitcode ----@return integer? code -function io.close(file) end - ---- ----将写入的数据保存到默认输出文件中。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-io.flush"]) ---- -function io.flush() end - ---- ----设置 `file` 为默认输入文件。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-io.input"]) ---- ----@overload fun():file* ----@param file string|file* -function io.input(file) end - ---- ---------- ----```lua ----for c in io.lines(filename, ...) do ---- body ----end ----``` ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-io.lines"]) ---- ----@param filename string? ----@param ... readmode ----@return fun():any, ... -function io.lines(filename, ...) end - ---- ----用字符串 `mode` 指定的模式打开一个文件。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-io.open"]) ---- ----@param filename string ----@param mode? openmode ----@return file*? ----@return string? errmsg ----@nodiscard -function io.open(filename, mode) end - ---- ----设置 `file` 为默认输出文件。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-io.output"]) ---- ----@overload fun():file* ----@param file string|file* -function io.output(file) end - ----@alias popenmode ----| "r" # 从这个程序中读取数据。(二进制方式) ----| "w" # 向这个程序写入输入。(二进制方式) - ---- ----用一个分离进程开启程序 `prog` 。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-io.popen"]) ---- ----@param prog string ----@param mode? popenmode ----@return file*? ----@return string? errmsg -function io.popen(prog, mode) end - ---- ----读文件 `file`, 指定的格式决定了要读什么。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-io.read"]) ---- ----@param ... readmode ----@return any ----@return any ... ----@nodiscard -function io.read(...) end - ---- ----如果成功,返回一个临时文件的句柄。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-io.tmpfile"]) ---- ----@return file* ----@nodiscard -function io.tmpfile() end - ----@alias filetype ----| "file" # 是一个打开的文件句柄。 ----| "closed file" # 是一个关闭的文件句柄。 ----| `nil` # 不是文件句柄。 - ---- ----检查 `obj` 是否是合法的文件句柄。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-io.type"]) ---- ----@param file file* ----@return filetype ----@nodiscard -function io.type(file) end - ---- ----将参数的值逐个写入默认输出文件。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-io.write"]) ---- ----@return file* ----@return string? errmsg -function io.write(...) end - ---- ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-file"]) ---- ----@class file* -local file = {} - ----@alias readmode integer|string ----| "n" # 读取一个数字,根据 Lua 的转换文法返回浮点数或整数。 ----| "a" # 从当前位置开始读取整个文件。 ----|>"l" # 读取一行并忽略行结束标记。 ----| "L" # 读取一行并保留行结束标记。 - ----@alias exitcode "exit"|"signal" - ---- ----关闭 `file`。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-file:close"]) ---- ----@return boolean? suc ----@return exitcode? exitcode ----@return integer? code -function file:close() end - ---- ----将写入的数据保存到 `file` 中。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-file:flush"]) ---- -function file:flush() end - ---- ---------- ----```lua ----for c in file:lines(...) do ---- body ----end ----``` ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-file:lines"]) ---- ----@param ... readmode ----@return fun():any, ... -function file:lines(...) end - ---- ----读文件 `file`, 指定的格式决定了要读什么。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-file:read"]) ---- ----@param ... readmode ----@return any ----@return any ... ----@nodiscard -function file:read(...) end - ----@alias seekwhence ----| "set" # 基点为 0 (文件开头)。 ----|>"cur" # 基点为当前位置。 ----| "end" # 基点为文件尾。 - ---- ----设置及获取基于文件开头处计算出的位置。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-file:seek"]) ---- ----@param whence? seekwhence ----@param offset? integer ----@return integer offset ----@return string? errmsg -function file:seek(whence, offset) end - ----@alias vbuf ----| "no" # 不缓冲;输出操作立刻生效。 ----| "full" # 完全缓冲;只有在缓存满或调用 flush 时才做输出操作。 ----| "line" # 行缓冲;输出将缓冲到每次换行前。 - ---- ----设置输出文件的缓冲模式。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-file:setvbuf"]) ---- ----@param mode vbuf ----@param size? integer -function file:setvbuf(mode, size) end - ---- ----将参数的值逐个写入 `file`。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-file:write"]) ---- ----@param ... string|number ----@return file*? ----@return string? errmsg -function file:write(...) end - -return io diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/jit.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/jit.lua deleted file mode 100644 index ca618226b..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/jit.lua +++ /dev/null @@ -1,32 +0,0 @@ ----@meta jit - ----@version JIT ----@class jitlib ----@field version string ----@field version_num number ----@field os string ----@field arch string -jit = {} - ----@overload fun(...):... ----@param func function|boolean ----@param recursive? boolean -function jit.on(func, recursive) end - ----@overload fun(...):... ----@param func function|boolean ----@param recursive? boolean -function jit.off(func, recursive) end - ----@overload fun(...):... ----@overload fun(tr: number) ----@param func function|boolean ----@param recursive? boolean -function jit.flush(func, recursive) end - ----@return boolean status ----@return string ... ----@nodiscard -function jit.status() end - -return jit diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/math.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/math.lua deleted file mode 100644 index e6b7f0d5e..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/math.lua +++ /dev/null @@ -1,379 +0,0 @@ ----@meta math - ---- ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math"]) ---- ----@class mathlib ---- ----一个比任何数字值都大的浮点数。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.huge"]) ---- ----@field huge number ---- ----最大值的整数。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.maxinteger"]) ---- ----@field maxinteger integer ---- ----最小值的整数。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.mininteger"]) ---- ----@field mininteger integer ---- ----*π* 的值。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.pi"]) ---- ----@field pi number -math = {} - ---- ----返回 `x` 的绝对值。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.abs"]) ---- ----@generic Number: number ----@param x Number ----@return Number ----@nodiscard -function math.abs(x) end - ---- ----返回 `x` 的反余弦值(用弧度表示)。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.acos"]) ---- ----@param x number ----@return number ----@nodiscard -function math.acos(x) end - ---- ----返回 `x` 的反正弦值(用弧度表示)。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.asin"]) ---- ----@param x number ----@return number ----@nodiscard -function math.asin(x) end - ---- ----返回 `y/x` 的反正切值(用弧度表示)。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.atan"]) ---- ----@param y number ----@param x? number ----@return number ----@nodiscard -function math.atan(y, x) end - ----@version <5.2 ---- ----返回 `y/x` 的反正切值(用弧度表示)。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.atan2"]) ---- ----@param y number ----@param x number ----@return number ----@nodiscard -function math.atan2(y, x) end - ---- ----返回不小于 `x` 的最小整数值。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.ceil"]) ---- ----@param x number ----@return integer ----@nodiscard -function math.ceil(x) end - ---- ----返回 `x` 的余弦(假定参数是弧度)。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.cos"]) ---- ----@param x number ----@return number ----@nodiscard -function math.cos(x) end - ----@version <5.2 ---- ----返回 `x` 的双曲余弦(假定参数是弧度)。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.cosh"]) ---- ----@param x number ----@return number ----@nodiscard -function math.cosh(x) end - ---- ----将角 `x` 从弧度转换为角度。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.deg"]) ---- ----@param x number ----@return number ----@nodiscard -function math.deg(x) end - ---- ----返回 `e^x` 的值 (e 为自然对数的底)。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.exp"]) ---- ----@param x number ----@return number ----@nodiscard -function math.exp(x) end - ---- ----返回不大于 `x` 的最大整数值。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.floor"]) ---- ----@param x number ----@return integer ----@nodiscard -function math.floor(x) end - ---- ----返回 `x` 除以 `y`,将商向零圆整后的余数。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.fmod"]) ---- ----@param x number ----@param y number ----@return number ----@nodiscard -function math.fmod(x, y) end - ----@version <5.2 ---- ----将 `x` 分解为尾数与指数,返回值符合 `x = m * (2 ^ e)` 。`e` 是一个整数,`m` 是 [0.5, 1) 之间的规格化小数 (`x` 为0时 `m` 为0)。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.frexp"]) ---- ----@param x number ----@return number m ----@return number e ----@nodiscard -function math.frexp(x) end - ----@version <5.2 ---- ----返回 `m * (2 ^ e)` 。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.ldexp"]) ---- ----@param m number ----@param e number ----@return number ----@nodiscard -function math.ldexp(m, e) end - ---- ----回以指定底的 `x` 的对数。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.log"]) ---- ----@param x number ----@param base? integer ----@return number ----@nodiscard -function math.log(x, base) end - ----@version <5.1 ---- ----返回 `x` 的以10为底的对数。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.log10"]) ---- ----@param x number ----@return number ----@nodiscard -function math.log10(x) end - ---- ----返回参数中最大的值, 大小由 Lua 操作 `<` 决定。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.max"]) ---- ----@generic Number: number ----@param x Number ----@param ... Number ----@return Number ----@nodiscard -function math.max(x, ...) end - ---- ----返回参数中最小的值, 大小由 Lua 操作 `<` 决定。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.min"]) ---- ----@generic Number: number ----@param x Number ----@param ... Number ----@return Number ----@nodiscard -function math.min(x, ...) end - ---- ----返回 `x` 的整数部分和小数部分。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.modf"]) ---- ----@param x number ----@return integer ----@return number ----@nodiscard -function math.modf(x) end - ----@version <5.2 ---- ----返回 `x ^ y` 。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.pow"]) ---- ----@param x number ----@param y number ----@return number ----@nodiscard -function math.pow(x, y) end - ---- ----将角 `x` 从角度转换为弧度。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.rad"]) ---- ----@param x number ----@return number ----@nodiscard -function math.rad(x) end - ---- ----* `math.random()`: 返回 [0,1) 区间内一致分布的浮点伪随机数。 ----* `math.random(n)`: 返回 [1, n] 区间内一致分布的整数伪随机数。 ----* `math.random(m, n)`: 返回 [m, n] 区间内一致分布的整数伪随机数。 ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.random"]) ---- ----@overload fun():number ----@overload fun(m: integer):integer ----@param m integer ----@param n integer ----@return integer ----@nodiscard -function math.random(m, n) end - ---- ----* `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.(不会翻) ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.randomseed"]) ---- ----@param x? integer ----@param y? integer -function math.randomseed(x, y) end - ---- ----返回 `x` 的正弦值(假定参数是弧度)。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.sin"]) ---- ----@param x number ----@return number ----@nodiscard -function math.sin(x) end - ----@version <5.2 ---- ----返回 `x` 的双曲正弦值(假定参数是弧度)。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.sinh"]) ---- ----@param x number ----@return number ----@nodiscard -function math.sinh(x) end - ---- ----返回 `x` 的平方根。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.sqrt"]) ---- ----@param x number ----@return number ----@nodiscard -function math.sqrt(x) end - ---- ----返回 `x` 的正切值(假定参数是弧度)。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.tan"]) ---- ----@param x number ----@return number ----@nodiscard -function math.tan(x) end - ----@version <5.2 ---- ----返回 `x` 的双曲正切值(假定参数是弧度)。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.tanh"]) ---- ----@param x number ----@return number ----@nodiscard -function math.tanh(x) end - ----@version >5.3 ---- ----如果 `x` 可以转换为一个整数, 返回该整数。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.tointeger"]) ---- ----@param x any ----@return integer? ----@nodiscard -function math.tointeger(x) end - ---- ----如果 `x` 是整数,返回 `"integer"`, 如果它是浮点数,返回 `"float"`, 如果 `x` 不是数字,返回 `nil`。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.type"]) ---- ----@param x any ----@return ----| '"integer"' ----| '"float"' ----| 'nil' ----@nodiscard -function math.type(x) end - ---- ----如果整数 `m` 和 `n` 以无符号整数形式比较, `m` 在 `n` 之下,返回布尔真否则返回假。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-math.ult"]) ---- ----@param m integer ----@param n integer ----@return boolean ----@nodiscard -function math.ult(m, n) end - -return math diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/os.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/os.lua deleted file mode 100644 index d75cc08f3..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/os.lua +++ /dev/null @@ -1,186 +0,0 @@ ----@meta os - ---- ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-os"]) ---- ----@class oslib -os = {} - ---- ----返回程序使用的按秒计 CPU 时间的近似值。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-os.clock"]) ---- ----@return number ----@nodiscard -function os.clock() end - ----@class osdate ---- ----四位数字 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-osdate.year"]) ---- ----@field year integer|string ---- ----1-12 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-osdate.month"]) ---- ----@field month integer|string ---- ----1-31 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-osdate.day"]) ---- ----@field day integer|string ---- ----0-23 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-osdate.hour"]) ---- ----@field hour integer|string ---- ----0-59 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-osdate.min"]) ---- ----@field min integer|string ---- ----0-61 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-osdate.sec"]) ---- ----@field sec integer|string ---- ----星期几,1-7,星期天为 1 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-osdate.wday"]) ---- ----@field wday integer|string ---- ----当年的第几天,1-366 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-osdate.yday"]) ---- ----@field yday integer|string ---- ----夏令时标记,一个布尔量 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-osdate.isdst"]) ---- ----@field isdst boolean - ---- ----返回一个包含日期及时刻的字符串或表。 格式化方法取决于所给字符串 `format`。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-os.date"]) ---- ----@param format? string ----@param time? integer ----@return string|osdate ----@nodiscard -function os.date(format, time) end - ---- ----返回以秒计算的时刻 `t1` 到 `t2` 的差值。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-os.difftime"]) ---- ----@param t2 integer ----@param t1 integer ----@return integer ----@nodiscard -function os.difftime(t2, t1) end - ---- ----调用系统解释器执行 `command`。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-os.execute"]) ---- ----@param command? string ----@return boolean? suc ----@return exitcode? exitcode ----@return integer? code -function os.execute(command) end - ---- ----调用 ISO C 函数 `exit` 终止宿主程序。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-os.exit"]) ---- ----@param code? boolean|integer ----@param close? boolean -function os.exit(code, close) end - ---- ----返回进程环境变量 `varname` 的值。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-os.getenv"]) ---- ----@param varname string ----@return string? ----@nodiscard -function os.getenv(varname) end - ---- ----删除指定名字的文件。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-os.remove"]) ---- ----@param filename string ----@return boolean suc ----@return string? errmsg -function os.remove(filename) end - ---- ----将名字为 `oldname` 的文件或目录更名为 `newname`。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-os.rename"]) ---- ----@param oldname string ----@param newname string ----@return boolean suc ----@return string? errmsg -function os.rename(oldname, newname) end - ----@alias localecategory ----|>"all" ----| "collate" ----| "ctype" ----| "monetary" ----| "numeric" ----| "time" - ---- ----设置程序的当前区域。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-os.setlocale"]) ---- ----@param locale string|nil ----@param category? localecategory ----@return string localecategory -function os.setlocale(locale, category) end - ---- ----当不传参数时,返回当前时刻。 如果传入一张表,就返回由这张表表示的时刻。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-os.time"]) ---- ----@param date? osdate ----@return integer ----@nodiscard -function os.time(date) end - ---- ----返回一个可用于临时文件的文件名字符串。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-os.tmpname"]) ---- ----@return string ----@nodiscard -function os.tmpname() end - -return os diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/package.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/package.lua deleted file mode 100644 index 865fa8a3d..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/package.lua +++ /dev/null @@ -1,107 +0,0 @@ ----@meta package - ---- ----加载一个模块,返回该模块的返回值(`nil`时为`true`)与搜索器返回的加载数据。默认搜索器的加载数据指示了加载位置,对于文件来说就是文件路径。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-require"]) ---- ----@param modname string ----@return unknown ----@return unknown loaderdata -function require(modname) end - ---- ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-package"]) ---- ----@class packagelib ---- ----这个路径被 `require` 在 C 加载器中做搜索时用到。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-package.cpath"]) ---- ----@field cpath string ---- ----用于 `require` 控制哪些模块已经被加载的表。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-package.loaded"]) ---- ----@field loaded table ---- ----这个路径被 `require` 在 Lua 加载器中做搜索时用到。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-package.path"]) ---- ----@field path string ---- ----保存有一些特殊模块的加载器。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-package.preload"]) ---- ----@field preload table -package = {} - ---- ----一个描述有一些为包管理准备的编译期配置信息的串。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-package.config"]) ---- -package.config = [[ -/ -; -? -! --]] - ----@version <5.1 ---- ----用于 `require` 控制如何加载模块的表。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-package.loaders"]) ---- -package.loaders = {} - ---- ----让宿主程序动态链接 C 库 `libname` 。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-package.loadlib"]) ---- ----@param libname string ----@param funcname string ----@return any -function package.loadlib(libname, funcname) end - ---- ----用于 `require` 控制如何加载模块的表。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-package.searchers"]) ---- ----@version >5.2 -package.searchers = {} - ---- ----在指定 `path` 中搜索指定的 `name` 。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-package.searchpath"]) ---- ----@version >5.2,JIT ----@param name string ----@param path string ----@param sep? string ----@param rep? string ----@return string? filename ----@return string? errmsg ----@nodiscard -function package.searchpath(name, path, sep, rep) end - ---- ----给 `module` 设置一个元表,该元表的 `__index` 域为全局环境,这样模块便会继承全局环境的值。可作为 `module` 函数的选项。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-package.seeall"]) ---- ----@version <5.1 ----@param module table -function package.seeall(module) end - -return package diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/string.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/string.lua deleted file mode 100644 index 4ec7f4062..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/string.lua +++ /dev/null @@ -1,220 +0,0 @@ ----@meta string - ---- ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-string"]) ---- ----@class stringlib -string = {} - ---- ----返回字符 `s[i]`, `s[i+1]`, ... ,`s[j]` 的内部数字编码。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-string.byte"]) ---- ----@param s string|number ----@param i? integer ----@param j? integer ----@return integer ... ----@nodiscard -function string.byte(s, i, j) end - ---- ----接收零或更多的整数。 返回和参数数量相同长度的字符串。 其中每个字符的内部编码值等于对应的参数值。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-string.char"]) ---- ----@param byte integer ----@param ... integer ----@return string ----@nodiscard -function string.char(byte, ...) end - ---- ----返回包含有以二进制方式表示的(一个 *二进制代码块* )指定函数的字符串。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-string.dump"]) ---- ----@param f async fun(...):... ----@param strip? boolean ----@return string ----@nodiscard -function string.dump(f, strip) end - ---- ----查找第一个字符串中匹配到的 `pattern`(参见 [§6.4.1](command:extension.lua.doc?["en-us/54/manual.html/6.4.1"]))。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-string.find"]) ---- ----@param s string|number ----@param pattern string|number ----@param init? integer ----@param plain? boolean ----@return integer start ----@return integer end ----@return any ... captured ----@nodiscard -function string.find(s, pattern, init, plain) end - ---- ----返回不定数量参数的格式化版本,格式化串为第一个参数。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-string.format"]) ---- ----@param s string|number ----@param ... any ----@return string ----@nodiscard -function string.format(s, ...) end - ---- ----返回一个迭代器函数。 每次调用这个函数都会继续以 `pattern` (参见 [§6.4.1](command:extension.lua.doc?["en-us/54/manual.html/6.4.1"])) 对 s 做匹配,并返回所有捕获到的值。 ---- ----下面这个例子会循环迭代字符串 s 中所有的单词, 并逐行打印: ----```lua ---- s = ----"hello world from Lua" ---- for w in string.gmatch(s, "%a+") do ---- print(w) ---- end ----``` ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-string.gmatch"]) ---- ----@param s string|number ----@param pattern string|number ----@param init? integer ----@return fun():string, ... -function string.gmatch(s, pattern, init) end - ---- ----将字符串 s 中,所有的(或是在 n 给出时的前 n 个) pattern (参见 [§6.4.1](command:extension.lua.doc?["en-us/54/manual.html/6.4.1"]))都替换成 repl ,并返回其副本。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-string.gsub"]) ---- ----@param s string|number ----@param pattern string|number ----@param repl string|number|table|function ----@param n? integer ----@return string ----@return integer count ----@nodiscard -function string.gsub(s, pattern, repl, n) end - ---- ----返回其长度。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-string.len"]) ---- ----@param s string|number ----@return integer ----@nodiscard -function string.len(s) end - ---- ----将其中的大写字符都转为小写后返回其副本。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-string.lower"]) ---- ----@param s string|number ----@return string ----@nodiscard -function string.lower(s) end - ---- ----在字符串 s 中找到第一个能用 pattern (参见 [§6.4.1](command:extension.lua.doc?["en-us/54/manual.html/6.4.1"]))匹配到的部分。 如果能找到,match 返回其中的捕获物; 否则返回 nil 。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-string.match"]) ---- ----@param s string|number ----@param pattern string|number ----@param init? integer ----@return any ... ----@nodiscard -function string.match(s, pattern, init) end - ----@version >5.3 ---- ----返回一个打包了(即以二进制形式序列化) v1, v2 等值的二进制字符串。 字符串 fmt 为打包格式(参见 [§6.4.2](command:extension.lua.doc?["en-us/54/manual.html/6.4.2"]))。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-string.pack"]) ---- ----@param fmt string ----@param v1 string|number ----@param ... string|number ----@return string binary ----@nodiscard -function string.pack(fmt, v1, v2, ...) end - ----@version >5.3 ---- ----返回以指定格式用 [string.pack](command:extension.lua.doc?["en-us/54/manual.html/pdf-string.pack"]) 打包的字符串的长度。 格式化字符串中不可以有变长选项 's' 或 'z' (参见 [§6.4.2](command:extension.lua.doc?["en-us/54/manual.html/6.4.2"]))。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-string.packsize"]) ---- ----@param fmt string ----@return integer ----@nodiscard -function string.packsize(fmt) end - ---- ----返回 `n` 个字符串 `s` 以字符串 `sep` 为分割符连在一起的字符串。 默认的 `sep` 值为空字符串(即没有分割符)。 如果 `n` 不是正数则返回空串。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-string.rep"]) ---- ----@param s string|number ----@param n integer ----@param sep? string|number ----@return string ----@nodiscard -function string.rep(s, n, sep) end - ---- ----返回字符串 s 的翻转串。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-string.reverse"]) ---- ----@param s string|number ----@return string ----@nodiscard -function string.reverse(s) end - ---- ----返回字符串的子串, 该子串从 `i` 开始到 `j` 为止。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-string.sub"]) ---- ----@param s string|number ----@param i integer ----@param j? integer ----@return string ----@nodiscard -function string.sub(s, i, j) end - ----@version >5.3 ---- ----返回以格式 fmt (参见 [§6.4.2](command:extension.lua.doc?["en-us/54/manual.html/6.4.2"])) 打包在字符串 s (参见 string.pack) 中的值。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-string.unpack"]) ---- ----@param fmt string ----@param s string ----@param pos? integer ----@return any ... ----@return integer offset ----@nodiscard -function string.unpack(fmt, s, pos) end - ---- ----接收一个字符串,将其中的小写字符都转为大写后返回其副本。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-string.upper"]) ---- ----@param s string|number ----@return string ----@nodiscard -function string.upper(s) end - -return string diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/string/buffer.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/string/buffer.lua deleted file mode 100644 index 077a5b234..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/string/buffer.lua +++ /dev/null @@ -1,353 +0,0 @@ ----@meta string.buffer - ----@version JIT ---- The string buffer library allows high-performance manipulation of string-like data. ---- ---- Unlike Lua strings, which are constants, string buffers are mutable sequences of 8-bit (binary-transparent) characters. Data can be stored, formatted and encoded into a string buffer and later converted, extracted or decoded. ---- ---- The convenient string buffer API simplifies common string manipulation tasks, that would otherwise require creating many intermediate strings. String buffers improve performance by eliminating redundant memory copies, object creation, string interning and garbage collection overhead. In conjunction with the FFI library, they allow zero-copy operations. ---- ---- The string buffer libary also includes a high-performance serializer for Lua objects. ---- ---- ---- ## Streaming Serialization ---- ---- In some contexts, it's desirable to do piecewise serialization of large datasets, also known as streaming. ---- ---- This serialization format can be safely concatenated and supports streaming. Multiple encodings can simply be appended to a buffer and later decoded individually: ---- ---- ```lua ---- local buf = buffer.new() ---- buf:encode(obj1) ---- buf:encode(obj2) ---- local copy1 = buf:decode() ---- local copy2 = buf:decode() ---- ``` ---- ---- Here's how to iterate over a stream: ---- ---- ```lua ---- while #buf ~= 0 do ---- local obj = buf:decode() ---- -- Do something with obj. ---- end ---- ``` ---- ---- Since the serialization format doesn't prepend a length to its encoding, network applications may need to transmit the length, too. ---- Serialization Format Specification ---- ---- This serialization format is designed for internal use by LuaJIT applications. Serialized data is upwards-compatible and portable across all supported LuaJIT platforms. ---- ---- It's an 8-bit binary format and not human-readable. It uses e.g. embedded zeroes and stores embedded Lua string objects unmodified, which are 8-bit-clean, too. Encoded data can be safely concatenated for streaming and later decoded one top-level object at a time. ---- ---- The encoding is reasonably compact, but tuned for maximum performance, not for minimum space usage. It compresses well with any of the common byte-oriented data compression algorithms. ---- ---- Although documented here for reference, this format is explicitly not intended to be a 'public standard' for structured data interchange across computer languages (like JSON or MessagePack). Please do not use it as such. ---- ---- The specification is given below as a context-free grammar with a top-level object as the starting point. Alternatives are separated by the | symbol and * indicates repeats. Grouping is implicit or indicated by {…}. Terminals are either plain hex numbers, encoded as bytes, or have a .format suffix. ---- ---- ``` ---- object → nil | false | true ---- | null | lightud32 | lightud64 ---- | int | num | tab | tab_mt ---- | int64 | uint64 | complex ---- | string ---- ---- nil → 0x00 ---- false → 0x01 ---- true → 0x02 ---- ---- null → 0x03 // NULL lightuserdata ---- lightud32 → 0x04 data.I // 32 bit lightuserdata ---- lightud64 → 0x05 data.L // 64 bit lightuserdata ---- ---- int → 0x06 int.I // int32_t ---- num → 0x07 double.L ---- ---- tab → 0x08 // Empty table ---- | 0x09 h.U h*{object object} // Key/value hash ---- | 0x0a a.U a*object // 0-based array ---- | 0x0b a.U a*object h.U h*{object object} // Mixed ---- | 0x0c a.U (a-1)*object // 1-based array ---- | 0x0d a.U (a-1)*object h.U h*{object object} // Mixed ---- tab_mt → 0x0e (index-1).U tab // Metatable dict entry ---- ---- int64 → 0x10 int.L // FFI int64_t ---- uint64 → 0x11 uint.L // FFI uint64_t ---- complex → 0x12 re.L im.L // FFI complex ---- ---- string → (0x20+len).U len*char.B ---- | 0x0f (index-1).U // String dict entry ---- ---- .B = 8 bit ---- .I = 32 bit little-endian ---- .L = 64 bit little-endian ---- .U = prefix-encoded 32 bit unsigned number n: ---- 0x00..0xdf → n.B ---- 0xe0..0x1fdf → (0xe0|(((n-0xe0)>>8)&0x1f)).B ((n-0xe0)&0xff).B ---- 0x1fe0.. → 0xff n.I ---- ``` ---- ---- ## Error handling ---- ---- Many of the buffer methods can throw an error. Out-of-memory or usage errors are best caught with an outer wrapper for larger parts of code. There's not much one can do after that, anyway. ---- ---- OTOH you may want to catch some errors individually. Buffer methods need to receive the buffer object as the first argument. The Lua colon-syntax `obj:method()` does that implicitly. But to wrap a method with `pcall()`, the arguments need to be passed like this: ---- ---- ```lua ---- local ok, err = pcall(buf.encode, buf, obj) ---- if not ok then ---- -- Handle error in err. ---- end ---- ``` ---- ---- ## FFI caveats ---- ---- The string buffer library has been designed to work well together with the FFI library. But due to the low-level nature of the FFI library, some care needs to be taken: ---- ---- First, please remember that FFI pointers are zero-indexed. The space returned by `buf:reserve()` and `buf:ref()` starts at the returned pointer and ends before len bytes after that. ---- ---- I.e. the first valid index is `ptr[0]` and the last valid index is `ptr[len-1]`. If the returned length is zero, there's no valid index at all. The returned pointer may even be `NULL`. ---- ---- The space pointed to by the returned pointer is only valid as long as the buffer is not modified in any way (neither append, nor consume, nor reset, etc.). The pointer is also not a GC anchor for the buffer object itself. ---- ---- Buffer data is only guaranteed to be byte-aligned. Casting the returned pointer to a data type with higher alignment may cause unaligned accesses. It depends on the CPU architecture whether this is allowed or not (it's always OK on x86/x64 and mostly OK on other modern architectures). ---- ---- FFI pointers or references do not count as GC anchors for an underlying object. E.g. an array allocated with `ffi.new()` is anchored by `buf:set(array, len)`, but not by `buf:set(array+offset, len)`. The addition of the offset creates a new pointer, even when the offset is zero. In this case, you need to make sure there's still a reference to the original array as long as its contents are in use by the buffer. ---- ---- Even though each LuaJIT VM instance is single-threaded (but you can create multiple VMs), FFI data structures can be accessed concurrently. Be careful when reading/writing FFI cdata from/to buffers to avoid concurrent accesses or modifications. In particular, the memory referenced by `buf:set(cdata, len)` must not be modified while buffer readers are working on it. Shared, but read-only memory mappings of files are OK, but only if the file does not change. -local buffer = {} - ---- A buffer object is a garbage-collected Lua object. After creation with `buffer.new()`, it can (and should) be reused for many operations. When the last reference to a buffer object is gone, it will eventually be freed by the garbage collector, along with the allocated buffer space. ---- ---- Buffers operate like a FIFO (first-in first-out) data structure. Data can be appended (written) to the end of the buffer and consumed (read) from the front of the buffer. These operations may be freely mixed. ---- ---- The buffer space that holds the characters is managed automatically — it grows as needed and already consumed space is recycled. Use `buffer.new(size)` and `buf:free()`, if you need more control. ---- ---- The maximum size of a single buffer is the same as the maximum size of a Lua string, which is slightly below two gigabytes. For huge data sizes, neither strings nor buffers are the right data structure — use the FFI library to directly map memory or files up to the virtual memory limit of your OS. ---- ----@version JIT ----@class string.buffer : table -local buf = {} - ---- A string, number, or any object obj with a __tostring metamethod to the buffer. ---- ----@alias string.buffer.data string|number|table - - ---- Appends a string str, a number num or any object obj with a `__tostring` metamethod to the buffer. Multiple arguments are appended in the given order. ---- ---- Appending a buffer to a buffer is possible and short-circuited internally. But it still involves a copy. Better combine the buffer writes to use a single buffer. ---- ----@param data string.buffer.data ----@param ...? string.buffer.data ----@return string.buffer -function buf:put(data, ...) end - - ---- Appends the formatted arguments to the buffer. The format string supports the same options as string.format(). ---- ----@param format string ----@param ... string.buffer.data ----@return string.buffer -function buf:putf(format, ...) end - - ---- Appends the given len number of bytes from the memory pointed to by the FFI cdata object to the buffer. The object needs to be convertible to a (constant) pointer. ---- ----@param cdata ffi.cdata* ----@param len integer ----@return string.buffer -function buf:putcdata(cdata, len) end - - ---- This method allows zero-copy consumption of a string or an FFI cdata object as a buffer. It stores a reference to the passed string str or the FFI cdata object in the buffer. Any buffer space originally allocated is freed. This is not an append operation, unlike the `buf:put*()` methods. ---- ---- After calling this method, the buffer behaves as if `buf:free():put(str)` or `buf:free():put(cdata, len)` had been called. However, the data is only referenced and not copied, as long as the buffer is only consumed. ---- ---- In case the buffer is written to later on, the referenced data is copied and the object reference is removed (copy-on-write semantics). ---- ---- The stored reference is an anchor for the garbage collector and keeps the originally passed string or FFI cdata object alive. ---- ----@param str string.buffer.data ----@return string.buffer ----@overload fun(self:string.buffer, cdata:ffi.cdata*, len:integer):string.buffer -function buf:set(str) end - ---- Reset (empty) the buffer. The allocated buffer space is not freed and may be reused. ----@return string.buffer -function buf:reset() end - - ---- The buffer space of the buffer object is freed. The object itself remains intact, empty and may be reused. ---- ---- Note: you normally don't need to use this method. The garbage collector automatically frees the buffer space, when the buffer object is collected. Use this method, if you need to free the associated memory immediately. -function buf:free() end - - ---- The reserve method reserves at least size bytes of write space in the buffer. It returns an uint8_t * FFI cdata pointer ptr that points to this space. ---- ---- The available length in bytes is returned in len. This is at least size bytes, but may be more to facilitate efficient buffer growth. You can either make use of the additional space or ignore len and only use size bytes. ---- ---- This, along with `buf:commit()` allow zero-copy use of C read-style APIs: ---- ---- ```lua ---- local MIN_SIZE = 65536 ---- repeat ---- local ptr, len = buf:reserve(MIN_SIZE) ---- local n = C.read(fd, ptr, len) ---- if n == 0 then break end -- EOF. ---- if n < 0 then error("read error") end ---- buf:commit(n) ---- until false ---- ``` ---- ---- The reserved write space is not initialized. At least the used bytes must be written to before calling the commit method. There's no need to call the commit method, if nothing is added to the buffer (e.g. on error). ----@param size integer ----@return ffi.cdata* ptr # an uint8_t * FFI cdata pointer that points to this space ----@return integer len # available length (bytes) -function buf:reserve(size) end - - ---- Appends the used bytes of the previously returned write space to the buffer data. ----@param used integer ----@return string.buffer -function buf:commit(used) end - - ---- Skips (consumes) len bytes from the buffer up to the current length of the buffer data. ----@param len integer ----@return string.buffer -function buf:skip(len) end - ---- Consumes the buffer data and returns one or more strings. If called without arguments, the whole buffer data is consumed. If called with a number, up to `len` bytes are consumed. A `nil` argument consumes the remaining buffer space (this only makes sense as the last argument). Multiple arguments consume the buffer data in the given order. ---- ---- Note: a zero length or no remaining buffer data returns an empty string and not `nil`. ---- ----@param len? integer ----@param ... integer|nil ----@return string ... -function buf:get(len, ...) end - ---- Creates a string from the buffer data, but doesn't consume it. The buffer remains unchanged. ---- ---- Buffer objects also define a `__tostring metamethod`. This means buffers can be passed to the global `tostring()` function and many other functions that accept this in place of strings. The important internal uses in functions like `io.write()` are short-circuited to avoid the creation of an intermediate string object. ----@return string -function buf:tostring() end - - ---- Returns an uint8_t * FFI cdata pointer ptr that points to the buffer data. The length of the buffer data in bytes is returned in len. ---- ---- The returned pointer can be directly passed to C functions that expect a buffer and a length. You can also do bytewise reads (`local x = ptr[i]`) or writes (`ptr[i] = 0x40`) of the buffer data. ---- ---- In conjunction with the `buf:skip()` method, this allows zero-copy use of C write-style APIs: ---- ---- ```lua ---- repeat ---- local ptr, len = buf:ref() ---- if len == 0 then break end ---- local n = C.write(fd, ptr, len) ---- if n < 0 then error("write error") end ---- buf:skip(n) ---- until n >= len ---- ``` ---- ---- Unlike Lua strings, buffer data is not implicitly zero-terminated. It's not safe to pass ptr to C functions that expect zero-terminated strings. If you're not using len, then you're doing something wrong. ---- ----@return ffi.cdata* ptr # an uint8_t * FFI cdata pointer that points to the buffer data. ----@return integer len # length of the buffer data in bytes -function buf:ref() end - ---- Serializes (encodes) the Lua object to the buffer ---- ---- This function may throw an error when attempting to serialize unsupported object types, circular references or deeply nested tables. ----@param obj string.buffer.data ----@return string.buffer -function buf:encode(obj) end - - ---- De-serializes one object from the buffer. ---- ---- The returned object may be any of the supported Lua types — even `nil`. ---- ---- This function may throw an error when fed with malformed or incomplete encoded data. ---- ---- Leaves any left-over data in the buffer. ---- ---- Attempting to de-serialize an FFI type will throw an error, if the FFI library is not built-in or has not been loaded, yet. ---- ----@return string.buffer.data|nil obj -function buf:decode() end - - ---- Serializes (encodes) the Lua object obj ---- ---- This function may throw an error when attempting to serialize unsupported object types, circular references or deeply nested tables. ----@param obj string.buffer.data ----@return string -function buffer.encode(obj) end - ---- De-serializes (decodes) the string to a Lua object ---- ---- The returned object may be any of the supported Lua types — even `nil`. ---- ---- Throws an error when fed with malformed or incomplete encoded data. ---- Throws an error when there's left-over data after decoding a single top-level object. ---- ---- Attempting to de-serialize an FFI type will throw an error, if the FFI library is not built-in or has not been loaded, yet. ---- ----@param str string ----@return string.buffer.data|nil obj -function buffer.decode(str) end - - - - ---- Creates a new buffer object. ---- ---- The optional size argument ensures a minimum initial buffer size. This is strictly an optimization when the required buffer size is known beforehand. The buffer space will grow as needed, in any case. ---- ---- The optional table options sets various serialization options. ---- ----@param size? integer ----@param options? string.buffer.serialization.opts ----@return string.buffer -function buffer.new(size, options) end - ---- Serialization Options ---- ---- The options table passed to buffer.new() may contain the following members (all optional): ---- ---- * `dict` is a Lua table holding a dictionary of strings that commonly occur as table keys of objects you are serializing. These keys are compactly encoded as indexes during serialization. A well chosen dictionary saves space and improves serialization performance. ---- ---- * `metatable` is a Lua table holding a dictionary of metatables for the table objects you are serializing. ---- ---- dict needs to be an array of strings and metatable needs to be an array of tables. Both starting at index 1 and without holes (no nil inbetween). The tables are anchored in the buffer object and internally modified into a two-way index (don't do this yourself, just pass a plain array). The tables must not be modified after they have been passed to buffer.new(). ---- ---- The dict and metatable tables used by the encoder and decoder must be the same. Put the most common entries at the front. Extend at the end to ensure backwards-compatibility — older encodings can then still be read. You may also set some indexes to false to explicitly drop backwards-compatibility. Old encodings that use these indexes will throw an error when decoded. ---- ---- Metatables that are not found in the metatable dictionary are ignored when encoding. Decoding returns a table with a nil metatable. ---- ---- Note: parsing and preparation of the options table is somewhat expensive. Create a buffer object only once and recycle it for multiple uses. Avoid mixing encoder and decoder buffers, since the buf:set() method frees the already allocated buffer space: ---- ---- ```lua ---- local options = { ---- dict = { "commonly", "used", "string", "keys" }, ---- } ---- local buf_enc = buffer.new(options) ---- local buf_dec = buffer.new(options) ---- ---- local function encode(obj) ---- return buf_enc:reset():encode(obj):get() ---- end ---- ---- local function decode(str) ---- return buf_dec:set(str):decode() ---- end ---- ``` ----@class string.buffer.serialization.opts ----@field dict string[] ----@field metatable table[] - - -return buffer diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/table.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/table.lua deleted file mode 100644 index 999993500..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/table.lua +++ /dev/null @@ -1,154 +0,0 @@ ----@meta table - ---- ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-table"]) ---- ----@class tablelib -table = {} - ---- ----提供一个列表,其所有元素都是字符串或数字,返回字符串 `list[i]..sep..list[i+1] ··· sep..list[j]`。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-table.concat"]) ---- ----@param list table ----@param sep? string ----@param i? integer ----@param j? integer ----@return string ----@nodiscard -function table.concat(list, sep, i, j) end - ---- ----在 `list` 的位置 `pos` 处插入元素 `value`。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-table.insert"]) ---- ----@overload fun(list: table, value: any) ----@param list table ----@param pos integer ----@param value any -function table.insert(list, pos, value) end - ----@version <5.1 ---- ----返回给定表的最大正数索引,如果表没有正数索引,则返回零。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-table.maxn"]) ---- ----@param table table ----@return integer ----@nodiscard -function table.maxn(table) end - ----@version >5.3 ---- ----将元素从表 `a1` 移到表 `a2`。 ----```lua ----a2[t],··· = ----a1[f],···,a1[e] ----return a2 ----``` ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-table.move"]) ---- ----@param a1 table ----@param f integer ----@param e integer ----@param t integer ----@param a2? table ----@return table a2 -function table.move(a1, f, e, t, a2) end - ----@version >5.2, JIT ---- ----返回用所有参数以键 `1`,`2`, 等填充的新表, 并将 `"n"` 这个域设为参数的总数。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-table.pack"]) ---- ----@return table ----@nodiscard -function table.pack(...) end - ---- ----移除 `list` 中 `pos` 位置上的元素,并返回这个被移除的值。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-table.remove"]) ---- ----@param list table ----@param pos? integer ----@return any -function table.remove(list, pos) end - ---- ----在表内从 `list[1]` 到 `list[#list]` *原地* 对其间元素按指定次序排序。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-table.sort"]) ---- ----@generic T ----@param list T[] ----@param comp? fun(a: T, b: T):boolean -function table.sort(list, comp) end - ----@version >5.2, JIT ---- ----返回列表中的元素。 这个函数等价于 ----```lua ---- return list[i], list[i+1], ···, list[j] ----``` ----i 默认为 1 ,j 默认为 #list。 ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-table.unpack"]) ---- ----@generic T ----@param list T[] ----@param i? integer ----@param j? integer ----@return T ... ----@nodiscard -function table.unpack(list, i, j) end - ----@version <5.1, JIT ---- ----遍历表中的每一个元素,并以key和value执行回调函数。如果回调函数返回一个非nil值则循环终止,并且返回这个值。该函数等同pair(list),比pair(list)更慢。不推荐使用 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-table.foreach"]) ---- ----@generic T ----@param list any ----@param callback fun(key: string, value: any):T|nil ----@return T|nil ----@deprecated -function table.foreach(list, callback) end - ----@version <5.1, JIT ---- ----遍历数组中的每一个元素,并以索引号index和value执行回调函数。如果回调函数返回一个非nil值则循环终止,并且返回这个值。该函数等同ipair(list),比ipair(list)更慢。不推荐使用 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-table.foreachi"]) ---- ----@generic T ----@param list any ----@param callback fun(key: string, value: any):T|nil ----@return T|nil ----@deprecated -function table.foreachi(list, callback) end - ----@version <5.1, JIT ---- ----返回表的长度。该函数等价于#list。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-table.getn"]) ---- ----@generic T ----@param list T[] ----@return integer ----@nodiscard ----@deprecated -function table.getn(list) end - -return table diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/table/clear.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/table/clear.lua deleted file mode 100644 index e2cd1a4f2..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/table/clear.lua +++ /dev/null @@ -1,17 +0,0 @@ ----@meta table.clear - ----@version JIT ---- ----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. ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-table.clear"]) ---- ----@param tab table -local function clear(tab) end - -return clear diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/table/new.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/table/new.lua deleted file mode 100644 index 2b7b6e2cb..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/table/new.lua +++ /dev/null @@ -1,18 +0,0 @@ ----@meta table.new - ----@version JIT ---- ----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") ----``` ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-table.new"]) ---- ----@param narray integer ----@param nhash integer ----@return table -local function new(narray, nhash) end - -return new diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/utf8.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/utf8.lua deleted file mode 100644 index 63b811273..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/Lua 5.4 zh-cn utf8/utf8.lua +++ /dev/null @@ -1,86 +0,0 @@ ----@meta utf8 - ----@version >5.3 ---- ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-utf8"]) ---- ----@class utf8lib ---- ----用于精确匹配到一个 UTF-8 字节序列的模式,它假定处理的对象是一个合法的 UTF-8 字符串。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-utf8.charpattern"]) ---- ----@field charpattern string -utf8 = {} - ---- ----接收零或多个整数, 将每个整数转换成对应的 UTF-8 字节序列,并返回这些序列连接到一起的字符串。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-utf8.char"]) ---- ----@param code integer ----@param ... integer ----@return string ----@nodiscard -function utf8.char(code, ...) end - ---- ----返回一系列的值,可以让 ----```lua ----for p, c in utf8.codes(s) do ---- body ----end ----``` ----迭代出字符串 s 中所有的字符。 这里的 p 是位置(按字节数)而 c 是每个字符的编号。 如果处理到一个不合法的字节序列,将抛出一个错误。 ---- ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-utf8.codes"]) ---- ----@param s string ----@param lax? boolean ----@return fun(s: string, p: integer):integer, integer -function utf8.codes(s, lax) end - ---- ----以整数形式返回 `s` 中 从位置 `i` 到 `j` 间(包括两端) 所有字符的编号。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-utf8.codepoint"]) ---- ----@param s string ----@param i? integer ----@param j? integer ----@param lax? boolean ----@return integer code ----@return integer ... ----@nodiscard -function utf8.codepoint(s, i, j, lax) end - ---- ----返回字符串 `s` 中 从位置 `i` 到 `j` 间 (包括两端) UTF-8 字符的个数。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-utf8.len"]) ---- ----@param s string ----@param i? integer ----@param j? integer ----@param lax? boolean ----@return integer? ----@return integer? errpos ----@nodiscard -function utf8.len(s, i, j, lax) end - ---- ----返回编码在 `s` 中的第 `n` 个字符的开始位置(按字节数) (从位置 `i` 处开始统计)。 ---- ----[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-utf8.offset"]) ---- ----@param s string ----@param n integer ----@param i? integer ----@return integer p ----@nodiscard -function utf8.offset(s, n, i) end - -return utf8 diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/template/basic.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/template/basic.lua deleted file mode 100644 index c024b2226..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/template/basic.lua +++ /dev/null @@ -1,293 +0,0 @@ ----@meta _ - ----#DES 'arg' ----@type string[] -arg = {} - ----#DES 'assert' ----@generic T ----@param v? T ----@param message? any ----@return T ----@return any ... -function assert(v, message, ...) end - ----@alias gcoptions ----|>"collect" # ---#DESTAIL 'cgopt.collect' ----| "stop" # ---#DESTAIL 'cgopt.stop' ----| "restart" # ---#DESTAIL 'cgopt.restart' ----| "count" # ---#DESTAIL 'cgopt.count' ----| "step" # ---#DESTAIL 'cgopt.step' ----| "isrunning" # ---#DESTAIL 'cgopt.isrunning' ----#if VERSION >= 5.4 then ----| "incremental" # ---#DESTAIL 'cgopt.incremental' ----| "generational" # ---#DESTAIL 'cgopt.generational' ----#else ----| "setpause" # ---#DESTAIL 'cgopt.setpause' ----| "setstepmul" # ---#DESTAIL 'cgopt.setstepmul' ----#end - ----#if VERSION >= 5.4 then ----#DES 'collectgarbage' ----@param opt? gcoptions ----@return any -function collectgarbage(opt, ...) end ----#else ----#DES 'collectgarbage' ----@param opt? gcoptions ----@param arg? integer ----@return any -function collectgarbage(opt, arg) end ----#end - ----#DES 'dofile' ----@param filename? string ----@return any ... -function dofile(filename) end - ----#DES 'error' ----@param message any ----@param level? integer -function error(message, level) end - ----#DES '_G' ----@class _G -_G = {} - ----@version 5.1 ----#DES 'getfenv' ----@param f? integer|async fun(...):... ----@return table ----@nodiscard -function getfenv(f) end - ----#DES 'getmetatable' ----@param object any ----@return table metatable ----@nodiscard -function getmetatable(object) end - ----#DES 'ipairs' ----@generic T: table, V ----@param t T ----@return fun(table: V[], i?: integer):integer, V ----@return T ----@return integer i -function ipairs(t) end - ----@alias loadmode ----| "b" # ---#DESTAIL 'loadmode.b' ----| "t" # ---#DESTAIL 'loadmode.t' ----|>"bt" # ---#DESTAIL 'loadmode.bt' - ----#if VERSION <= 5.1 and not JIT then ----#DES 'load<5.1' ----@param func function ----@param chunkname? string ----@return function? ----@return string? error_message ----@nodiscard -function load(func, chunkname) end ----#else ----#DES 'load>5.2' ----@param chunk string|function ----@param chunkname? string ----@param mode? loadmode ----@param env? table ----@return function? ----@return string? error_message ----@nodiscard -function load(chunk, chunkname, mode, env) end ----#end - ----#if VERSION <= 5.1 and not JIT then ----#DES 'loadfile' ----@param filename? string ----@return function? ----@return string? error_message ----@nodiscard -function loadfile(filename) end ----#else ----#DES 'loadfile' ----@param filename? string ----@param mode? loadmode ----@param env? table ----@return function? ----@return string? error_message ----@nodiscard -function loadfile(filename, mode, env) end ----#end - ----@version 5.1 ----#DES 'loadstring' ----@param text string ----@param chunkname? string ----@return function? ----@return string? error_message ----@nodiscard -function loadstring(text, chunkname) end - ----@version 5.1 ----@param proxy boolean|table|userdata ----@return userdata ----@nodiscard -function newproxy(proxy) end - ----@version 5.1 ----#DES 'module' ----@param name string -function module(name, ...) end - ----#DES 'next' ----@generic K, V ----@param table table ----@param index? K ----@return K? ----@return V? ----@nodiscard -function next(table, index) end - ----#DES 'pairs' ----@generic T: table, K, V ----@param t T ----@return fun(table: table, index?: K):K, V ----@return T -function pairs(t) end - ----#DES 'pcall' ----#if VERSION == 5.1 and not JIT then ----@param f function ----#else ----@param f async fun(...):... ----#end ----@param arg1? any ----@return boolean success ----@return any result ----@return any ... -function pcall(f, arg1, ...) end - ----#DES 'print' -function print(...) end - ----#DES 'rawequal' ----@param v1 any ----@param v2 any ----@return boolean ----@nodiscard -function rawequal(v1, v2) end - ----#DES 'rawget' ----@param table table ----@param index any ----@return any ----@nodiscard -function rawget(table, index) end - ----#DES 'rawlen' ----@param v table|string ----@return integer len ----@nodiscard -function rawlen(v) end - ----#DES 'rawset' ----@param table table ----@param index any ----@param value any ----@return table -function rawset(table, index, value) end - ----#DES 'select' ----@param index integer|"#" ----@return any ----@nodiscard -function select(index, ...) end - ----@version 5.1 ----#DES 'setfenv' ----@param f async fun(...):...|integer ----@param table table ----@return function -function setfenv(f, table) end - ----#DES 'setmetatable' ----@param table table ----@param metatable? table ----@return table -function setmetatable(table, metatable) end - ----#DES 'tonumber' ----@overload fun(e: string, base: integer):integer ----@param e any ----@return number? ----@nodiscard -function tonumber(e) end - ----#DES 'tostring' ----@param v any ----@return string ----@nodiscard -function tostring(v) end - ----@alias type ----| "nil" ----| "number" ----| "string" ----| "boolean" ----| "table" ----| "function" ----| "thread" ----| "userdata" ----#if VERSION == JIT then ----| "cdata" ----#end - ----#DES 'type' ----@param v any ----@return type type ----@nodiscard -function type(v) end - ----#DES '_VERSION' ----#if VERSION == 5.1 then -_VERSION = "Lua 5.1" ----#elseif VERSION == 5.2 then -_VERSION = "Lua 5.2" ----#elseif VERSION == 5.3 then -_VERSION = "Lua 5.3" ----#elseif VERSION == 5.4 then -_VERSION = "Lua 5.4" ----#end - ----@version >5.4 ----#DES 'warn' ----@param message string -function warn(message, ...) end - ----#if VERSION == 5.1 and not JIT then ----#DES 'xpcall=5.1' ----@param f function ----@param err function ----@return boolean success ----@return any result ----@return any ... -function xpcall(f, err) end ----#else ----#DES 'xpcall>5.2' ----@param f async fun(...):... ----@param msgh function ----@param arg1? any ----@return boolean success ----@return any result ----@return any ... -function xpcall(f, msgh, arg1, ...) end ----#end - ----@version 5.1 ----#DES 'unpack' ----@generic T ----@param list T[] ----@param i? integer ----@param j? integer ----@return T ... ----@nodiscard -function unpack(list, i, j) end diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/template/bit.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/template/bit.lua deleted file mode 100644 index c9563f420..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/template/bit.lua +++ /dev/null @@ -1,80 +0,0 @@ ----#if not JIT then DISABLE() end ----@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 diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/template/bit32.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/template/bit32.lua deleted file mode 100644 index ddccbab49..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/template/bit32.lua +++ /dev/null @@ -1,86 +0,0 @@ ----#if VERSION ~= 5.2 then DISABLE() end ----@meta bit32 - ----@version 5.2 ----#DES 'bit32' ----@class bit32lib -bit32 = {} - ----#DES 'bit32.arshift' ----@param x integer ----@param disp integer ----@return integer ----@nodiscard -function bit32.arshift(x, disp) end - ----#DES 'bit32.band' ----@return integer ----@nodiscard -function bit32.band(...) end - ----#DES 'bit32.bnot' ----@param x integer ----@return integer ----@nodiscard -function bit32.bnot(x) end - ----#DES 'bit32.bor' ----@return integer ----@nodiscard -function bit32.bor(...) end - ----#DES 'bit32.btest' ----@return boolean ----@nodiscard -function bit32.btest(...) end - ----#DES 'bit32.bxor' ----@return integer ----@nodiscard -function bit32.bxor(...) end - ----#DES 'bit32.extract' ----@param n integer ----@param field integer ----@param width? integer ----@return integer ----@nodiscard -function bit32.extract(n, field, width) end - ----#DES 'bit32.replace' ----@param n integer ----@param v integer ----@param field integer ----@param width? integer ----@nodiscard -function bit32.replace(n, v, field, width) end - ----#DES 'bit32.lrotate' ----@param x integer ----@param distp integer ----@return integer ----@nodiscard -function bit32.lrotate(x, distp) end - ----#DES 'bit32.lshift' ----@param x integer ----@param distp integer ----@return integer ----@nodiscard -function bit32.lshift(x, distp) end - ----#DES 'bit32.rrotate' ----@param x integer ----@param distp integer ----@return integer ----@nodiscard -function bit32.rrotate(x, distp) end - ----#DES 'bit32.rshift' ----@param x integer ----@param distp integer ----@return integer ----@nodiscard -function bit32.rshift(x, distp) end - -return bit32 diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/template/builtin.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/template/builtin.lua deleted file mode 100644 index 466a0966e..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/template/builtin.lua +++ /dev/null @@ -1,16 +0,0 @@ ----@meta _ - ----@class unknown ----@class any ----@class nil ----@class boolean ----@class true: boolean ----@class false: boolean ----@class number ----@class integer: number ----@class thread ----@class table: { [K]: V } ----@class string: stringlib ----@class userdata ----@class lightuserdata ----@class function diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/template/coroutine.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/template/coroutine.lua deleted file mode 100644 index b3890bfde..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/template/coroutine.lua +++ /dev/null @@ -1,67 +0,0 @@ ----@meta coroutine - ----#DES 'coroutine' ----@class coroutinelib -coroutine = {} - ----#DES 'coroutine.create' ----@param f async fun(...):... ----@return thread ----@nodiscard -function coroutine.create(f) end - ----#if VERSION >= 5.4 then ----#DES 'coroutine.isyieldable>5.4' ----@param co? thread ----@return boolean ----@nodiscard -function coroutine.isyieldable(co) end ----#else ----#DES 'coroutine.isyieldable' ----@return boolean ----@nodiscard -function coroutine.isyieldable() end ----#end - ----@version >5.4 ----#DES 'coroutine.close' ----@param co thread ----@return boolean noerror ----@return any errorobject -function coroutine.close(co) end - ----#DES 'coroutine.resume' ----@param co thread ----@param val1? any ----@return boolean success ----@return any ... -function coroutine.resume(co, val1, ...) end - ----#DES 'coroutine.running' ----@return thread running ----@return boolean ismain ----@nodiscard -function coroutine.running() end - ----#DES 'coroutine.status' ----@param co thread ----@return ----| '"running"' # ---#DESTAIL 'costatus.running' ----| '"suspended"' # ---#DESTAIL 'costatus.suspended' ----| '"normal"' # ---#DESTAIL 'costatus.normal' ----| '"dead"' # ---#DESTAIL 'costatus.dead' ----@nodiscard -function coroutine.status(co) end - ----#DES 'coroutine.wrap' ----@param f async fun(...):... ----@return fun(...):... ----@nodiscard -function coroutine.wrap(f) end - ----#DES 'coroutine.yield' ----@async ----@return any ... -function coroutine.yield(...) end - -return coroutine diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/template/debug.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/template/debug.lua deleted file mode 100644 index 9f48ee98c..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/template/debug.lua +++ /dev/null @@ -1,221 +0,0 @@ ----@meta debug - ----#DES 'debug' ----@class debuglib -debug = {} - ----@class debuginfo ----@field name string ----@field namewhat string ----@field source string ----@field short_src string ----@field linedefined integer ----@field lastlinedefined integer ----@field what string ----@field currentline integer ----@field istailcall boolean ----@field nups integer ----#if VERSION >= 5.2 or JIT then ----@field nparams integer ----@field isvararg boolean ----#end ----@field func function ----#if VERSION >= 5.4 then ----@field ftransfer integer ----@field ntransfer integer ----#end ----@field activelines table - ----#DES 'debug.debug' -function debug.debug() end - ----@version 5.1 ----#DES 'debug.getfenv' ----@param o any ----@return table ----@nodiscard -function debug.getfenv(o) end - ----#DES 'debug.gethook' ----@param co? thread ----@return function hook ----@return string mask ----@return integer count ----@nodiscard -function debug.gethook(co) end - ----@alias infowhat string ----|+"n" # ---#DESTAIL 'infowhat.n' ----|+"S" # ---#DESTAIL 'infowhat.S' ----|+"l" # ---#DESTAIL 'infowhat.l' ----|+"t" # ---#DESTAIL 'infowhat.t' ----#if VERSION <= 5.1 and not JIT then ----|+"u" # ---#DESTAIL 'infowhat.u<5.1' ----#else ----|+"u" # ---#DESTAIL 'infowhat.u>5.2' ----#end ----|+"f" # ---#DESTAIL 'infowhat.f' ----#if VERSION >= 5.4 then ----|+"r" # ---#DESTAIL 'infowhat.r' ----#end ----|+"L" # ---#DESTAIL 'infowhat.L' - ----#DES 'debug.getinfo' ----@overload fun(f: integer|function, what?: infowhat):debuginfo ----@param thread thread ----@param f integer|async fun(...):... ----@param what? infowhat ----@return debuginfo ----@nodiscard -function debug.getinfo(thread, f, what) end - ----#if VERSION <= 5.1 and not JIT then ----#DES 'debug.getlocal<5.1' ----@overload fun(level: integer, index: integer):string, any ----@param thread thread ----@param level integer ----@param index integer ----@return string name ----@return any value ----@nodiscard -function debug.getlocal(thread, level, index) end ----#else ----#DES 'debug.getlocal>5.2' ----@overload fun(f: integer|async fun(...):..., index: integer):string, any ----@param thread thread ----@param f integer|async fun(...):... ----@param index integer ----@return string name ----@return any value ----@nodiscard -function debug.getlocal(thread, f, index) end ----#end - ----#DES 'debug.getmetatable' ----@param object any ----@return table metatable ----@nodiscard -function debug.getmetatable(object) end - ----#DES 'debug.getregistry' ----@return table ----@nodiscard -function debug.getregistry() end - ----#DES 'debug.getupvalue' ----@param f async fun(...):... ----@param up integer ----@return string name ----@return any value ----@nodiscard -function debug.getupvalue(f, up) end - ----#if VERSION >= 5.4 then ----#DES 'debug.getuservalue>5.4' ----@param u userdata ----@param n? integer ----@return any ----@return boolean ----@nodiscard -function debug.getuservalue(u, n) end ----#elseif VERSION >= 5.2 or JIT then ----#DES 'debug.getuservalue<5.3' ----@param u userdata ----@return any ----@nodiscard -function debug.getuservalue(u) end ----#end - ----#DES 'debug.setcstacklimit' ----@deprecated ----@param limit integer ----@return integer|boolean -function debug.setcstacklimit(limit) end - ----#DES 'debug.setfenv' ----@version 5.1 ----@generic T ----@param object T ----@param env table ----@return T object -function debug.setfenv(object, env) end - ----@alias hookmask string ----|+"c" # ---#DESTAIL 'hookmask.c' ----|+"r" # ---#DESTAIL 'hookmask.r' ----|+"l" # ---#DESTAIL 'hookmask.l' - ----#DES 'debug.sethook' ----@overload fun(hook: (async fun(...):...), mask: hookmask, count?: integer) ----@overload fun(thread: thread):... ----@overload fun(...):... ----@param thread thread ----@param hook async fun(...):... ----@param mask hookmask ----@param count? integer -function debug.sethook(thread, hook, mask, count) end - ----#DES 'debug.setlocal' ----@overload fun(level: integer, index: integer, value: any):string ----@param thread thread ----@param level integer ----@param index integer ----@param value any ----@return string name -function debug.setlocal(thread, level, index, value) end - ----#DES 'debug.setmetatable' ----@generic T ----@param value T ----@param meta? table ----@return T value -function debug.setmetatable(value, meta) end - ----#DES 'debug.setupvalue' ----@param f async fun(...):... ----@param up integer ----@param value any ----@return string name -function debug.setupvalue(f, up, value) end - ----#if VERSION >= 5.4 then ----#DES 'debug.setuservalue>5.4' ----@param udata userdata ----@param value any ----@param n? integer ----@return userdata udata -function debug.setuservalue(udata, value, n) end ----#elseif VERSION >= 5.2 or JIT then ----#DES 'debug.setuservalue<5.3' ----@param udata userdata ----@param value any ----@return userdata udata -function debug.setuservalue(udata, value) end ----#end - ----#DES 'debug.traceback' ----@overload fun(message?: any, level?: integer): string ----@param thread thread ----@param message? any ----@param level? integer ----@return string message ----@nodiscard -function debug.traceback(thread, message, level) end - ----@version >5.2, JIT ----#DES 'debug.upvalueid' ----@param f async fun(...):... ----@param n integer ----@return lightuserdata id ----@nodiscard -function debug.upvalueid(f, n) end - ----@version >5.2, JIT ----#DES 'debug.upvaluejoin' ----@param f1 async fun(...):... ----@param n1 integer ----@param f2 async fun(...):... ----@param n2 integer -function debug.upvaluejoin(f1, n1, f2, n2) end - -return debug diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/template/ffi.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/template/ffi.lua deleted file mode 100644 index a9d486578..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/template/ffi.lua +++ /dev/null @@ -1,122 +0,0 @@ ----#if not JIT then DISABLE() end ----@meta ffi - ----@class ffi.namespace*: table ----@field [string] function - ----@class ffi.ctype*: userdata ----@overload fun(init?: any, ...): ffi.cdata* ----@overload fun(nelem?: integer, init?: any, ...): ffi.cdata* -local ctype - ----@class ffi.cdecl*: string ----@class ffi.cdata*: userdata ----@alias ffi.ct* ffi.ctype*|ffi.cdecl*|ffi.cdata* ----@class ffi.cb*: ffi.cdata* -local cb ----@class ffi.VLA*: userdata ----@class ffi.VLS*: userdata - ----@version JIT ----@class ffilib ----@field C ffi.namespace* ----@field os string ----@field arch string -local ffi = {} - ----@param def string ----@param params? any -function ffi.cdef(def, params, ...) end - ----@param name string ----@param global? boolean ----@return ffi.namespace* clib ----@nodiscard -function ffi.load(name, global) end - ----@overload fun(ct: ffi.ct*, init: any, ...) ----@param ct ffi.ct* ----@param nelem? integer ----@param init? any ----@return ffi.cdata* cdata ----@nodiscard -function ffi.new(ct, nelem, init, ...) end - ----@param ct ffi.ct* ----@param params? any ----@return ffi.ctype* ctype ----@nodiscard -function ffi.typeof(ct, params, ...) end - ----@param ct ffi.ct* ----@param init any ----@return ffi.cdata* cdata ----@nodiscard -function ffi.cast(ct, init) end - ----@param ct ffi.ct* ----@param metatable table ----@return ffi.ctype* ctype -function ffi.metatype(ct, metatable) end - ----@param cdata ffi.cdata* ----@param finalizer? function ----@return ffi.cdata* cdata -function ffi.gc(cdata, finalizer) end - ----@param ct ffi.ct* ----@param nelem? integer ----@return integer|nil size ----@nodiscard -function ffi.sizeof(ct, nelem) end - ----@param ct ffi.ct* ----@return integer align ----@nodiscard -function ffi.alignof(ct) end - ----@param ct ffi.ct* ----@param field string ----@return integer ofs ----@return integer? bpos ----@return integer? bsize ----@nodiscard -function ffi.offsetof(ct, field) end - ----@param ct ffi.ct* ----@param obj any ----@return boolean status ----@nodiscard -function ffi.istype(ct, obj) end - ----@param newerr? integer ----@return integer err ----@nodiscard -function ffi.errno(newerr) end - ----@param ptr any ----@param len? integer ----@return string str -function ffi.string(ptr, len) end - ----@overload fun(dst: any, str: string) ----@param dst any ----@param src any ----@param len integer -function ffi.copy(dst, src, len) end - ----@param dst any ----@param len integer ----@param c? any -function ffi.fill(dst, len, c) end - ----@param param string ----@return boolean status -function ffi.abi(param) end - -function cb:free() end - ----@param func function -function cb:set(func) end - -return ffi diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/template/io.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/template/io.lua deleted file mode 100644 index 2200a6268..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/template/io.lua +++ /dev/null @@ -1,170 +0,0 @@ ----@meta io - ----#DES 'io' ----@class iolib ----#DES 'io.stdin' ----@field stdin file* ----#DES 'io.stdout' ----@field stdout file* ----#DES 'io.stderr' ----@field stderr file* -io = {} - ----@alias openmode ----|>"r" # ---#DESTAIL 'openmode.r' ----| "w" # ---#DESTAIL 'openmode.w' ----| "a" # ---#DESTAIL 'openmode.a' ----| "r+" # ---#DESTAIL 'openmode.r+' ----| "w+" # ---#DESTAIL 'openmode.w+' ----| "a+" # ---#DESTAIL 'openmode.a+' ----| "rb" # ---#DESTAIL 'openmode.rb' ----| "wb" # ---#DESTAIL 'openmode.wb' ----| "ab" # ---#DESTAIL 'openmode.ab' ----| "r+b" # ---#DESTAIL 'openmode.r+b' ----| "w+b" # ---#DESTAIL 'openmode.w+b' ----| "a+b" # ---#DESTAIL 'openmode.a+b' - ----#DES 'io.close' ----@param file? file* ----@return boolean? suc ----@return exitcode? exitcode ----@return integer? code -function io.close(file) end - ----#DES 'io.flush' -function io.flush() end - ----#DES 'io.input' ----@overload fun():file* ----@param file string|file* -function io.input(file) end - ----#DES 'io.lines' ----@param filename string? ----@param ... readmode ----@return fun():any, ... -function io.lines(filename, ...) end - ----#DES 'io.open' ----@param filename string ----@param mode? openmode ----@return file*? ----@return string? errmsg ----@nodiscard -function io.open(filename, mode) end - ----#DES 'io.output' ----@overload fun():file* ----@param file string|file* -function io.output(file) end - ----@alias popenmode ----| "r" # ---#DESTAIL 'popenmode.r' ----| "w" # ---#DESTAIL 'popenmode.w' - ----#DES 'io.popen' ----@param prog string ----@param mode? popenmode ----@return file*? ----@return string? errmsg -function io.popen(prog, mode) end - ----#DES 'io.read' ----@param ... readmode ----@return any ----@return any ... ----@nodiscard -function io.read(...) end - ----#DES 'io.tmpfile' ----@return file* ----@nodiscard -function io.tmpfile() end - ----@alias filetype ----| "file" # ---#DESTAIL 'filetype.file' ----| "closed file" # ---#DESTAIL 'filetype.closed file' ----| `nil` # ---#DESTAIL 'filetype.nil' - ----#DES 'io.type' ----@param file file* ----@return filetype ----@nodiscard -function io.type(file) end - ----#DES 'io.write' ----@return file* ----@return string? errmsg -function io.write(...) end - ----#DES 'file' ----@class file* -local file = {} - ----@alias readmode integer|string ----#if VERSION >= 5.3 then ----| "n" # ---#DESTAIL 'readmode.n' ----| "a" # ---#DESTAIL 'readmode.a' ----|>"l" # ---#DESTAIL 'readmode.l' ----| "L" # ---#DESTAIL 'readmode.L' ----#else ----| "*n" # ---#DESTAIL 'readmode.n' ----| "*a" # ---#DESTAIL 'readmode.a' ----|>"*l" # ---#DESTAIL 'readmode.l' ----#if JIT then ----| "*L" # ---#DESTAIL 'readmode.L' ----#end ----#end - ----@alias exitcode "exit"|"signal" - ----#DES 'file:close' ----@return boolean? suc ----@return exitcode? exitcode ----@return integer? code -function file:close() end - ----#DES 'file:flush' -function file:flush() end - ----#DES 'file:lines' ----@param ... readmode ----@return fun():any, ... -function file:lines(...) end - ----#DES 'file:read' ----@param ... readmode ----@return any ----@return any ... ----@nodiscard -function file:read(...) end - ----@alias seekwhence ----| "set" # ---#DESTAIL 'seekwhence.set' ----|>"cur" # ---#DESTAIL 'seekwhence.cur' ----| "end" # ---#DESTAIL 'seekwhence.end' - ----#DES 'file:seek' ----@param whence? seekwhence ----@param offset? integer ----@return integer offset ----@return string? errmsg -function file:seek(whence, offset) end - ----@alias vbuf ----| "no" # ---#DESTAIL 'vbuf.no' ----| "full" # ---#DESTAIL 'vbuf.full' ----| "line" # ---#DESTAIL 'vbuf.line' - ----#DES 'file:setvbuf' ----@param mode vbuf ----@param size? integer -function file:setvbuf(mode, size) end - ----#DES 'file:write' ----@param ... string|number ----@return file*? ----@return string? errmsg -function file:write(...) end - -return io diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/template/jit.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/template/jit.lua deleted file mode 100644 index dae996b5b..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/template/jit.lua +++ /dev/null @@ -1,33 +0,0 @@ ----#if not JIT then DISABLE() end ----@meta jit - ----@version JIT ----@class jitlib ----@field version string ----@field version_num number ----@field os string ----@field arch string -jit = {} - ----@overload fun(...):... ----@param func function|boolean ----@param recursive? boolean -function jit.on(func, recursive) end - ----@overload fun(...):... ----@param func function|boolean ----@param recursive? boolean -function jit.off(func, recursive) end - ----@overload fun(...):... ----@overload fun(tr: number) ----@param func function|boolean ----@param recursive? boolean -function jit.flush(func, recursive) end - ----@return boolean status ----@return string ... ----@nodiscard -function jit.status() end - -return jit diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/template/math.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/template/math.lua deleted file mode 100644 index 37e1d5c74..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/template/math.lua +++ /dev/null @@ -1,253 +0,0 @@ ----@meta math - ----#DES 'math' ----@class mathlib ----#DES 'math.huge' ----@field huge number ----#if VERSION >= 5.3 then ----#DES 'math.maxinteger' ----@field maxinteger integer ----#DES 'math.mininteger' ----@field mininteger integer ----#end ----#DES 'math.pi' ----@field pi number -math = {} - ----#DES 'math.abs' ----@generic Number: number ----@param x Number ----@return Number ----@nodiscard -function math.abs(x) end - ----#DES 'math.acos' ----@param x number ----@return number ----@nodiscard -function math.acos(x) end - ----#DES 'math.asin' ----@param x number ----@return number ----@nodiscard -function math.asin(x) end - ----#if VERSION <= 5.2 then ----#DES 'math.atan<5.2' ----@param y number ----@return number ----@nodiscard -function math.atan(y) end ----#else ----#DES 'math.atan>5.3' ----@param y number ----@param x? number ----@return number ----@nodiscard -function math.atan(y, x) end ----#end - ----@version <5.2 ----#DES 'math.atan2' ----@param y number ----@param x number ----@return number ----@nodiscard -function math.atan2(y, x) end - ----#DES 'math.ceil' ----@param x number ----@return integer ----@nodiscard -function math.ceil(x) end - ----#DES 'math.cos' ----@param x number ----@return number ----@nodiscard -function math.cos(x) end - ----@version <5.2 ----#DES 'math.cosh' ----@param x number ----@return number ----@nodiscard -function math.cosh(x) end - ----#DES 'math.deg' ----@param x number ----@return number ----@nodiscard -function math.deg(x) end - ----#DES 'math.exp' ----@param x number ----@return number ----@nodiscard -function math.exp(x) end - ----#DES 'math.floor' ----@param x number ----@return integer ----@nodiscard -function math.floor(x) end - ----#DES 'math.fmod' ----@param x number ----@param y number ----@return number ----@nodiscard -function math.fmod(x, y) end - ----@version <5.2 ----#DES 'math.frexp' ----@param x number ----@return number m ----@return number e ----@nodiscard -function math.frexp(x) end - ----@version <5.2 ----#DES 'math.ldexp' ----@param m number ----@param e number ----@return number ----@nodiscard -function math.ldexp(m, e) end - ----#if VERSION <= 5.1 and not JIT then ----#DES 'math.log<5.1' ----@param x number ----@return number ----@nodiscard -function math.log(x) end ----#else ----#DES 'math.log>5.2' ----@param x number ----@param base? integer ----@return number ----@nodiscard -function math.log(x, base) end ----#end - ----@version <5.1 ----#DES 'math.log10' ----@param x number ----@return number ----@nodiscard -function math.log10(x) end - ----#DES 'math.max' ----@generic Number: number ----@param x Number ----@param ... Number ----@return Number ----@nodiscard -function math.max(x, ...) end - ----#DES 'math.min' ----@generic Number: number ----@param x Number ----@param ... Number ----@return Number ----@nodiscard -function math.min(x, ...) end - ----#DES 'math.modf' ----@param x number ----@return integer ----@return number ----@nodiscard -function math.modf(x) end - ----@version <5.2 ----#DES 'math.pow' ----@param x number ----@param y number ----@return number ----@nodiscard -function math.pow(x, y) end - ----#DES 'math.rad' ----@param x number ----@return number ----@nodiscard -function math.rad(x) end - ----#DES 'math.random' ----@overload fun():number ----@overload fun(m: integer):integer ----@param m integer ----@param n integer ----@return integer ----@nodiscard -function math.random(m, n) end - ----#if VERSION >= 5.4 then ----#DES 'math.randomseed>5.4' ----@param x? integer ----@param y? integer -function math.randomseed(x, y) end ----#else ----#DES 'math.randomseed<5.3' ----@param x integer -function math.randomseed(x) end ----#end - ----#DES 'math.sin' ----@param x number ----@return number ----@nodiscard -function math.sin(x) end - ----@version <5.2 ----#DES 'math.sinh' ----@param x number ----@return number ----@nodiscard -function math.sinh(x) end - ----#DES 'math.sqrt' ----@param x number ----@return number ----@nodiscard -function math.sqrt(x) end - ----#DES 'math.tan' ----@param x number ----@return number ----@nodiscard -function math.tan(x) end - ----@version <5.2 ----#DES 'math.tanh' ----@param x number ----@return number ----@nodiscard -function math.tanh(x) end - ----@version >5.3 ----#DES 'math.tointeger' ----@param x any ----@return integer? ----@nodiscard -function math.tointeger(x) end - ----#DES 'math.type' ----@param x any ----@return ----| '"integer"' ----| '"float"' ----| 'nil' ----@nodiscard -function math.type(x) end - ----#DES 'math.ult' ----@param m integer ----@param n integer ----@return boolean ----@nodiscard -function math.ult(m, n) end - -return math diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/template/os.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/template/os.lua deleted file mode 100644 index 102a92281..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/template/os.lua +++ /dev/null @@ -1,114 +0,0 @@ ----@meta os - ----#DES 'os' ----@class oslib -os = {} - ----#DES 'os.clock' ----@return number ----@nodiscard -function os.clock() end - ----@class osdate ----#DES 'osdate.year' ----@field year integer|string ----#DES 'osdate.month' ----@field month integer|string ----#DES 'osdate.day' ----@field day integer|string ----#DES 'osdate.hour' ----@field hour integer|string ----#DES 'osdate.min' ----@field min integer|string ----#DES 'osdate.sec' ----@field sec integer|string ----#DES 'osdate.wday' ----@field wday integer|string ----#DES 'osdate.yday' ----@field yday integer|string ----#DES 'osdate.isdst' ----@field isdst boolean - ----#DES 'os.date' ----@param format? string ----@param time? integer ----@return string|osdate ----@nodiscard -function os.date(format, time) end - ----#DES 'os.difftime' ----@param t2 integer ----@param t1 integer ----@return integer ----@nodiscard -function os.difftime(t2, t1) end - ----#DES 'os.execute' ----#if VERSION <= 5.1 and not JIT then ----@param command? string ----@return integer code -function os.execute(command) end ----#else ----@param command? string ----@return boolean? suc ----@return exitcode? exitcode ----@return integer? code -function os.execute(command) end ----#end - ----#if VERSION <= 5.1 and not JIT then ----#DES 'os.exit<5.1' ----@param code? integer -function os.exit(code, close) end ----#else ----#DES 'os.exit>5.2' ----@param code? boolean|integer ----@param close? boolean -function os.exit(code, close) end ----#end - ----#DES 'os.getenv' ----@param varname string ----@return string? ----@nodiscard -function os.getenv(varname) end - ----#DES 'os.remove' ----@param filename string ----@return boolean suc ----@return string? errmsg -function os.remove(filename) end - ----#DES 'os.rename' ----@param oldname string ----@param newname string ----@return boolean suc ----@return string? errmsg -function os.rename(oldname, newname) end - ----@alias localecategory ----|>"all" ----| "collate" ----| "ctype" ----| "monetary" ----| "numeric" ----| "time" - ----#DES 'os.setlocale' ----@param locale string|nil ----@param category? localecategory ----@return string localecategory -function os.setlocale(locale, category) end - ----#DES 'os.time' ----@param date? osdate ----@return integer ----@nodiscard -function os.time(date) end - ----#DES 'os.tmpname' ----@return string ----@nodiscard -function os.tmpname() end - -return os diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/template/package.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/template/package.lua deleted file mode 100644 index 3845e7694..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/template/package.lua +++ /dev/null @@ -1,66 +0,0 @@ ----@meta package - ----#if VERSION >=5.4 then ----#DES 'require>5.4' ----@param modname string ----@return unknown ----@return unknown loaderdata -function require(modname) end ----#else ----#DES 'require<5.3' ----@param modname string ----@return unknown -function require(modname) end ----#end - ----#DES 'package' ----@class packagelib ----#DES 'package.cpath' ----@field cpath string ----#DES 'package.loaded' ----@field loaded table ----#DES 'package.path' ----@field path string ----#DES 'package.preload' ----@field preload table -package = {} - ----#DES 'package.config' -package.config = [[ -/ -; -? -! --]] - ----@version <5.1 ----#DES 'package.loaders' -package.loaders = {} - ----#DES 'package.loadlib' ----@param libname string ----@param funcname string ----@return any -function package.loadlib(libname, funcname) end - ----#DES 'package.searchers' ----@version >5.2 -package.searchers = {} - ----#DES 'package.searchpath' ----@version >5.2,JIT ----@param name string ----@param path string ----@param sep? string ----@param rep? string ----@return string? filename ----@return string? errmsg ----@nodiscard -function package.searchpath(name, path, sep, rep) end - ----#DES 'package.seeall' ----@version <5.1 ----@param module table -function package.seeall(module) end - -return package diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/template/string.buffer.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/template/string.buffer.lua deleted file mode 100644 index 7285290a4..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/template/string.buffer.lua +++ /dev/null @@ -1,354 +0,0 @@ ----#if not JIT then DISABLE() end ----@meta string.buffer - ----@version JIT ---- The string buffer library allows high-performance manipulation of string-like data. ---- ---- Unlike Lua strings, which are constants, string buffers are mutable sequences of 8-bit (binary-transparent) characters. Data can be stored, formatted and encoded into a string buffer and later converted, extracted or decoded. ---- ---- The convenient string buffer API simplifies common string manipulation tasks, that would otherwise require creating many intermediate strings. String buffers improve performance by eliminating redundant memory copies, object creation, string interning and garbage collection overhead. In conjunction with the FFI library, they allow zero-copy operations. ---- ---- The string buffer libary also includes a high-performance serializer for Lua objects. ---- ---- ---- ## Streaming Serialization ---- ---- In some contexts, it's desirable to do piecewise serialization of large datasets, also known as streaming. ---- ---- This serialization format can be safely concatenated and supports streaming. Multiple encodings can simply be appended to a buffer and later decoded individually: ---- ---- ```lua ---- local buf = buffer.new() ---- buf:encode(obj1) ---- buf:encode(obj2) ---- local copy1 = buf:decode() ---- local copy2 = buf:decode() ---- ``` ---- ---- Here's how to iterate over a stream: ---- ---- ```lua ---- while #buf ~= 0 do ---- local obj = buf:decode() ---- -- Do something with obj. ---- end ---- ``` ---- ---- Since the serialization format doesn't prepend a length to its encoding, network applications may need to transmit the length, too. ---- Serialization Format Specification ---- ---- This serialization format is designed for internal use by LuaJIT applications. Serialized data is upwards-compatible and portable across all supported LuaJIT platforms. ---- ---- It's an 8-bit binary format and not human-readable. It uses e.g. embedded zeroes and stores embedded Lua string objects unmodified, which are 8-bit-clean, too. Encoded data can be safely concatenated for streaming and later decoded one top-level object at a time. ---- ---- The encoding is reasonably compact, but tuned for maximum performance, not for minimum space usage. It compresses well with any of the common byte-oriented data compression algorithms. ---- ---- Although documented here for reference, this format is explicitly not intended to be a 'public standard' for structured data interchange across computer languages (like JSON or MessagePack). Please do not use it as such. ---- ---- The specification is given below as a context-free grammar with a top-level object as the starting point. Alternatives are separated by the | symbol and * indicates repeats. Grouping is implicit or indicated by {…}. Terminals are either plain hex numbers, encoded as bytes, or have a .format suffix. ---- ---- ``` ---- object → nil | false | true ---- | null | lightud32 | lightud64 ---- | int | num | tab | tab_mt ---- | int64 | uint64 | complex ---- | string ---- ---- nil → 0x00 ---- false → 0x01 ---- true → 0x02 ---- ---- null → 0x03 // NULL lightuserdata ---- lightud32 → 0x04 data.I // 32 bit lightuserdata ---- lightud64 → 0x05 data.L // 64 bit lightuserdata ---- ---- int → 0x06 int.I // int32_t ---- num → 0x07 double.L ---- ---- tab → 0x08 // Empty table ---- | 0x09 h.U h*{object object} // Key/value hash ---- | 0x0a a.U a*object // 0-based array ---- | 0x0b a.U a*object h.U h*{object object} // Mixed ---- | 0x0c a.U (a-1)*object // 1-based array ---- | 0x0d a.U (a-1)*object h.U h*{object object} // Mixed ---- tab_mt → 0x0e (index-1).U tab // Metatable dict entry ---- ---- int64 → 0x10 int.L // FFI int64_t ---- uint64 → 0x11 uint.L // FFI uint64_t ---- complex → 0x12 re.L im.L // FFI complex ---- ---- string → (0x20+len).U len*char.B ---- | 0x0f (index-1).U // String dict entry ---- ---- .B = 8 bit ---- .I = 32 bit little-endian ---- .L = 64 bit little-endian ---- .U = prefix-encoded 32 bit unsigned number n: ---- 0x00..0xdf → n.B ---- 0xe0..0x1fdf → (0xe0|(((n-0xe0)>>8)&0x1f)).B ((n-0xe0)&0xff).B ---- 0x1fe0.. → 0xff n.I ---- ``` ---- ---- ## Error handling ---- ---- Many of the buffer methods can throw an error. Out-of-memory or usage errors are best caught with an outer wrapper for larger parts of code. There's not much one can do after that, anyway. ---- ---- OTOH you may want to catch some errors individually. Buffer methods need to receive the buffer object as the first argument. The Lua colon-syntax `obj:method()` does that implicitly. But to wrap a method with `pcall()`, the arguments need to be passed like this: ---- ---- ```lua ---- local ok, err = pcall(buf.encode, buf, obj) ---- if not ok then ---- -- Handle error in err. ---- end ---- ``` ---- ---- ## FFI caveats ---- ---- The string buffer library has been designed to work well together with the FFI library. But due to the low-level nature of the FFI library, some care needs to be taken: ---- ---- First, please remember that FFI pointers are zero-indexed. The space returned by `buf:reserve()` and `buf:ref()` starts at the returned pointer and ends before len bytes after that. ---- ---- I.e. the first valid index is `ptr[0]` and the last valid index is `ptr[len-1]`. If the returned length is zero, there's no valid index at all. The returned pointer may even be `NULL`. ---- ---- The space pointed to by the returned pointer is only valid as long as the buffer is not modified in any way (neither append, nor consume, nor reset, etc.). The pointer is also not a GC anchor for the buffer object itself. ---- ---- Buffer data is only guaranteed to be byte-aligned. Casting the returned pointer to a data type with higher alignment may cause unaligned accesses. It depends on the CPU architecture whether this is allowed or not (it's always OK on x86/x64 and mostly OK on other modern architectures). ---- ---- FFI pointers or references do not count as GC anchors for an underlying object. E.g. an array allocated with `ffi.new()` is anchored by `buf:set(array, len)`, but not by `buf:set(array+offset, len)`. The addition of the offset creates a new pointer, even when the offset is zero. In this case, you need to make sure there's still a reference to the original array as long as its contents are in use by the buffer. ---- ---- Even though each LuaJIT VM instance is single-threaded (but you can create multiple VMs), FFI data structures can be accessed concurrently. Be careful when reading/writing FFI cdata from/to buffers to avoid concurrent accesses or modifications. In particular, the memory referenced by `buf:set(cdata, len)` must not be modified while buffer readers are working on it. Shared, but read-only memory mappings of files are OK, but only if the file does not change. -local buffer = {} - ---- A buffer object is a garbage-collected Lua object. After creation with `buffer.new()`, it can (and should) be reused for many operations. When the last reference to a buffer object is gone, it will eventually be freed by the garbage collector, along with the allocated buffer space. ---- ---- Buffers operate like a FIFO (first-in first-out) data structure. Data can be appended (written) to the end of the buffer and consumed (read) from the front of the buffer. These operations may be freely mixed. ---- ---- The buffer space that holds the characters is managed automatically — it grows as needed and already consumed space is recycled. Use `buffer.new(size)` and `buf:free()`, if you need more control. ---- ---- The maximum size of a single buffer is the same as the maximum size of a Lua string, which is slightly below two gigabytes. For huge data sizes, neither strings nor buffers are the right data structure — use the FFI library to directly map memory or files up to the virtual memory limit of your OS. ---- ----@version JIT ----@class string.buffer : table -local buf = {} - ---- A string, number, or any object obj with a __tostring metamethod to the buffer. ---- ----@alias string.buffer.data string|number|table - - ---- Appends a string str, a number num or any object obj with a `__tostring` metamethod to the buffer. Multiple arguments are appended in the given order. ---- ---- Appending a buffer to a buffer is possible and short-circuited internally. But it still involves a copy. Better combine the buffer writes to use a single buffer. ---- ----@param data string.buffer.data ----@param ...? string.buffer.data ----@return string.buffer -function buf:put(data, ...) end - - ---- Appends the formatted arguments to the buffer. The format string supports the same options as string.format(). ---- ----@param format string ----@param ... string.buffer.data ----@return string.buffer -function buf:putf(format, ...) end - - ---- Appends the given len number of bytes from the memory pointed to by the FFI cdata object to the buffer. The object needs to be convertible to a (constant) pointer. ---- ----@param cdata ffi.cdata* ----@param len integer ----@return string.buffer -function buf:putcdata(cdata, len) end - - ---- This method allows zero-copy consumption of a string or an FFI cdata object as a buffer. It stores a reference to the passed string str or the FFI cdata object in the buffer. Any buffer space originally allocated is freed. This is not an append operation, unlike the `buf:put*()` methods. ---- ---- After calling this method, the buffer behaves as if `buf:free():put(str)` or `buf:free():put(cdata, len)` had been called. However, the data is only referenced and not copied, as long as the buffer is only consumed. ---- ---- In case the buffer is written to later on, the referenced data is copied and the object reference is removed (copy-on-write semantics). ---- ---- The stored reference is an anchor for the garbage collector and keeps the originally passed string or FFI cdata object alive. ---- ----@param str string.buffer.data ----@return string.buffer ----@overload fun(self:string.buffer, cdata:ffi.cdata*, len:integer):string.buffer -function buf:set(str) end - ---- Reset (empty) the buffer. The allocated buffer space is not freed and may be reused. ----@return string.buffer -function buf:reset() end - - ---- The buffer space of the buffer object is freed. The object itself remains intact, empty and may be reused. ---- ---- Note: you normally don't need to use this method. The garbage collector automatically frees the buffer space, when the buffer object is collected. Use this method, if you need to free the associated memory immediately. -function buf:free() end - - ---- The reserve method reserves at least size bytes of write space in the buffer. It returns an uint8_t * FFI cdata pointer ptr that points to this space. ---- ---- The available length in bytes is returned in len. This is at least size bytes, but may be more to facilitate efficient buffer growth. You can either make use of the additional space or ignore len and only use size bytes. ---- ---- This, along with `buf:commit()` allow zero-copy use of C read-style APIs: ---- ---- ```lua ---- local MIN_SIZE = 65536 ---- repeat ---- local ptr, len = buf:reserve(MIN_SIZE) ---- local n = C.read(fd, ptr, len) ---- if n == 0 then break end -- EOF. ---- if n < 0 then error("read error") end ---- buf:commit(n) ---- until false ---- ``` ---- ---- The reserved write space is not initialized. At least the used bytes must be written to before calling the commit method. There's no need to call the commit method, if nothing is added to the buffer (e.g. on error). ----@param size integer ----@return ffi.cdata* ptr # an uint8_t * FFI cdata pointer that points to this space ----@return integer len # available length (bytes) -function buf:reserve(size) end - - ---- Appends the used bytes of the previously returned write space to the buffer data. ----@param used integer ----@return string.buffer -function buf:commit(used) end - - ---- Skips (consumes) len bytes from the buffer up to the current length of the buffer data. ----@param len integer ----@return string.buffer -function buf:skip(len) end - ---- Consumes the buffer data and returns one or more strings. If called without arguments, the whole buffer data is consumed. If called with a number, up to `len` bytes are consumed. A `nil` argument consumes the remaining buffer space (this only makes sense as the last argument). Multiple arguments consume the buffer data in the given order. ---- ---- Note: a zero length or no remaining buffer data returns an empty string and not `nil`. ---- ----@param len? integer ----@param ... integer|nil ----@return string ... -function buf:get(len, ...) end - ---- Creates a string from the buffer data, but doesn't consume it. The buffer remains unchanged. ---- ---- Buffer objects also define a `__tostring metamethod`. This means buffers can be passed to the global `tostring()` function and many other functions that accept this in place of strings. The important internal uses in functions like `io.write()` are short-circuited to avoid the creation of an intermediate string object. ----@return string -function buf:tostring() end - - ---- Returns an uint8_t * FFI cdata pointer ptr that points to the buffer data. The length of the buffer data in bytes is returned in len. ---- ---- The returned pointer can be directly passed to C functions that expect a buffer and a length. You can also do bytewise reads (`local x = ptr[i]`) or writes (`ptr[i] = 0x40`) of the buffer data. ---- ---- In conjunction with the `buf:skip()` method, this allows zero-copy use of C write-style APIs: ---- ---- ```lua ---- repeat ---- local ptr, len = buf:ref() ---- if len == 0 then break end ---- local n = C.write(fd, ptr, len) ---- if n < 0 then error("write error") end ---- buf:skip(n) ---- until n >= len ---- ``` ---- ---- Unlike Lua strings, buffer data is not implicitly zero-terminated. It's not safe to pass ptr to C functions that expect zero-terminated strings. If you're not using len, then you're doing something wrong. ---- ----@return ffi.cdata* ptr # an uint8_t * FFI cdata pointer that points to the buffer data. ----@return integer len # length of the buffer data in bytes -function buf:ref() end - ---- Serializes (encodes) the Lua object to the buffer ---- ---- This function may throw an error when attempting to serialize unsupported object types, circular references or deeply nested tables. ----@param obj string.buffer.data ----@return string.buffer -function buf:encode(obj) end - - ---- De-serializes one object from the buffer. ---- ---- The returned object may be any of the supported Lua types — even `nil`. ---- ---- This function may throw an error when fed with malformed or incomplete encoded data. ---- ---- Leaves any left-over data in the buffer. ---- ---- Attempting to de-serialize an FFI type will throw an error, if the FFI library is not built-in or has not been loaded, yet. ---- ----@return string.buffer.data|nil obj -function buf:decode() end - - ---- Serializes (encodes) the Lua object obj ---- ---- This function may throw an error when attempting to serialize unsupported object types, circular references or deeply nested tables. ----@param obj string.buffer.data ----@return string -function buffer.encode(obj) end - ---- De-serializes (decodes) the string to a Lua object ---- ---- The returned object may be any of the supported Lua types — even `nil`. ---- ---- Throws an error when fed with malformed or incomplete encoded data. ---- Throws an error when there's left-over data after decoding a single top-level object. ---- ---- Attempting to de-serialize an FFI type will throw an error, if the FFI library is not built-in or has not been loaded, yet. ---- ----@param str string ----@return string.buffer.data|nil obj -function buffer.decode(str) end - - - - ---- Creates a new buffer object. ---- ---- The optional size argument ensures a minimum initial buffer size. This is strictly an optimization when the required buffer size is known beforehand. The buffer space will grow as needed, in any case. ---- ---- The optional table options sets various serialization options. ---- ----@param size? integer ----@param options? string.buffer.serialization.opts ----@return string.buffer -function buffer.new(size, options) end - ---- Serialization Options ---- ---- The options table passed to buffer.new() may contain the following members (all optional): ---- ---- * `dict` is a Lua table holding a dictionary of strings that commonly occur as table keys of objects you are serializing. These keys are compactly encoded as indexes during serialization. A well chosen dictionary saves space and improves serialization performance. ---- ---- * `metatable` is a Lua table holding a dictionary of metatables for the table objects you are serializing. ---- ---- dict needs to be an array of strings and metatable needs to be an array of tables. Both starting at index 1 and without holes (no nil inbetween). The tables are anchored in the buffer object and internally modified into a two-way index (don't do this yourself, just pass a plain array). The tables must not be modified after they have been passed to buffer.new(). ---- ---- The dict and metatable tables used by the encoder and decoder must be the same. Put the most common entries at the front. Extend at the end to ensure backwards-compatibility — older encodings can then still be read. You may also set some indexes to false to explicitly drop backwards-compatibility. Old encodings that use these indexes will throw an error when decoded. ---- ---- Metatables that are not found in the metatable dictionary are ignored when encoding. Decoding returns a table with a nil metatable. ---- ---- Note: parsing and preparation of the options table is somewhat expensive. Create a buffer object only once and recycle it for multiple uses. Avoid mixing encoder and decoder buffers, since the buf:set() method frees the already allocated buffer space: ---- ---- ```lua ---- local options = { ---- dict = { "commonly", "used", "string", "keys" }, ---- } ---- local buf_enc = buffer.new(options) ---- local buf_dec = buffer.new(options) ---- ---- local function encode(obj) ---- return buf_enc:reset():encode(obj):get() ---- end ---- ---- local function decode(str) ---- return buf_dec:set(str):decode() ---- end ---- ``` ----@class string.buffer.serialization.opts ----@field dict string[] ----@field metatable table[] - - -return buffer diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/template/string.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/template/string.lua deleted file mode 100644 index 841654f5c..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/template/string.lua +++ /dev/null @@ -1,155 +0,0 @@ ----@meta string - ----#DES 'string' ----@class stringlib -string = {} - ----#DES 'string.byte' ----@param s string|number ----@param i? integer ----@param j? integer ----@return integer ... ----@nodiscard -function string.byte(s, i, j) end - ----#DES 'string.char' ----@param byte integer ----@param ... integer ----@return string ----@nodiscard -function string.char(byte, ...) end - ----#DES 'string.dump' ----@param f async fun(...):... ----@param strip? boolean ----@return string ----@nodiscard -function string.dump(f, strip) end - ----#DES 'string.find' ----@param s string|number ----@param pattern string|number ----@param init? integer ----@param plain? boolean ----@return integer start ----@return integer end ----@return any ... captured ----@nodiscard -function string.find(s, pattern, init, plain) end - ----#DES 'string.format' ----@param s string|number ----@param ... any ----@return string ----@nodiscard -function string.format(s, ...) end - ----#DES 'string.gmatch' ----#if VERSION <= 5.3 then ----@param s string|number ----@param pattern string|number ----@return fun():string, ... ----@nodiscard -function string.gmatch(s, pattern) end ----#else ----@param s string|number ----@param pattern string|number ----@param init? integer ----@return fun():string, ... -function string.gmatch(s, pattern, init) end ----#end - ----#DES 'string.gsub' ----@param s string|number ----@param pattern string|number ----@param repl string|number|table|function ----@param n? integer ----@return string ----@return integer count ----@nodiscard -function string.gsub(s, pattern, repl, n) end - ----#DES 'string.len' ----@param s string|number ----@return integer ----@nodiscard -function string.len(s) end - ----#DES 'string.lower' ----@param s string|number ----@return string ----@nodiscard -function string.lower(s) end - ----#DES 'string.match' ----@param s string|number ----@param pattern string|number ----@param init? integer ----@return any ... ----@nodiscard -function string.match(s, pattern, init) end - ----@version >5.3 ----#DES 'string.pack' ----@param fmt string ----@param v1 string|number ----@param ... string|number ----@return string binary ----@nodiscard -function string.pack(fmt, v1, v2, ...) end - ----@version >5.3 ----#DES 'string.packsize' ----@param fmt string ----@return integer ----@nodiscard -function string.packsize(fmt) end - ----#if VERSION <= 5.1 and not JIT then ----#DES 'string.rep<5.1' ----@param s string|number ----@param n integer ----@return string ----@nodiscard -function string.rep(s, n) end ----#else ----#DES 'string.rep>5.2' ----@param s string|number ----@param n integer ----@param sep? string|number ----@return string ----@nodiscard -function string.rep(s, n, sep) end ----#end - ----#DES 'string.reverse' ----@param s string|number ----@return string ----@nodiscard -function string.reverse(s) end - ----#DES 'string.sub' ----@param s string|number ----@param i integer ----@param j? integer ----@return string ----@nodiscard -function string.sub(s, i, j) end - ----@version >5.3 ----#DES 'string.unpack' ----@param fmt string ----@param s string ----@param pos? integer ----@return any ... ----@return integer offset ----@nodiscard -function string.unpack(fmt, s, pos) end - ----#DES 'string.upper' ----@param s string|number ----@return string ----@nodiscard -function string.upper(s) end - -return string diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/template/table.clear.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/template/table.clear.lua deleted file mode 100644 index 122e3651c..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/template/table.clear.lua +++ /dev/null @@ -1,9 +0,0 @@ ----#if not JIT then DISABLE() end ----@meta table.clear - ----@version JIT ----#DES 'table.clear' ----@param tab table -local function clear(tab) end - -return clear diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/template/table.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/template/table.lua deleted file mode 100644 index a2e9580b4..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/template/table.lua +++ /dev/null @@ -1,95 +0,0 @@ ----@meta table - ----#DES 'table' ----@class tablelib -table = {} - ----#DES 'table.concat' ----@param list table ----@param sep? string ----@param i? integer ----@param j? integer ----@return string ----@nodiscard -function table.concat(list, sep, i, j) end - ----#DES 'table.insert' ----@overload fun(list: table, value: any) ----@param list table ----@param pos integer ----@param value any -function table.insert(list, pos, value) end - ----@version <5.1 ----#DES 'table.maxn' ----@param table table ----@return integer ----@nodiscard -function table.maxn(table) end - ----@version >5.3 ----#DES 'table.move' ----@param a1 table ----@param f integer ----@param e integer ----@param t integer ----@param a2? table ----@return table a2 -function table.move(a1, f, e, t, a2) end - ----@version >5.2, JIT ----#DES 'table.pack' ----@return table ----@nodiscard -function table.pack(...) end - ----#DES 'table.remove' ----@param list table ----@param pos? integer ----@return any -function table.remove(list, pos) end - ----#DES 'table.sort' ----@generic T ----@param list T[] ----@param comp? fun(a: T, b: T):boolean -function table.sort(list, comp) end - ----@version >5.2, JIT ----#DES 'table.unpack' ----@generic T ----@param list T[] ----@param i? integer ----@param j? integer ----@return T ... ----@nodiscard -function table.unpack(list, i, j) end - ----@version <5.1, JIT ----#DES 'table.foreach' ----@generic T ----@param list any ----@param callback fun(key: string, value: any):T|nil ----@return T|nil ----@deprecated -function table.foreach(list, callback) end - ----@version <5.1, JIT ----#DES 'table.foreachi' ----@generic T ----@param list any ----@param callback fun(key: string, value: any):T|nil ----@return T|nil ----@deprecated -function table.foreachi(list, callback) end - ----@version <5.1, JIT ----#DES 'table.getn' ----@generic T ----@param list T[] ----@return integer ----@nodiscard ----@deprecated -function table.getn(list) end - -return table diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/template/table.new.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/template/table.new.lua deleted file mode 100644 index f4b05cdc6..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/template/table.new.lua +++ /dev/null @@ -1,11 +0,0 @@ ----#if not JIT then DISABLE() end ----@meta table.new - ----@version JIT ----#DES 'table.new' ----@param narray integer ----@param nhash integer ----@return table -local function new(narray, nhash) end - -return new diff --git a/.building/lua-language-server-3.6.18-win32-x64/meta/template/utf8.lua b/.building/lua-language-server-3.6.18-win32-x64/meta/template/utf8.lua deleted file mode 100644 index 5c7668384..000000000 --- a/.building/lua-language-server-3.6.18-win32-x64/meta/template/utf8.lua +++ /dev/null @@ -1,78 +0,0 @@ ----#if VERSION <= 5.2 then DISABLE() end ----@meta utf8 - ----@version >5.3 ----#DES 'utf8' ----@class utf8lib ----#DES 'utf8.charpattern' ----@field charpattern string -utf8 = {} - ----#DES 'utf8.char' ----@param code integer ----@param ... integer ----@return string ----@nodiscard -function utf8.char(code, ...) end - ----#DES 'utf8.codes' ----#if VERSION <= 5.3 then ----@param s string ----@return fun(s: string, p: integer):integer, integer -function utf8.codes(s) end ----#else ----@param s string ----@param lax? boolean ----@return fun(s: string, p: integer):integer, integer -function utf8.codes(s, lax) end ----#end - ----#DES 'utf8.codepoint' ----#if VERSION <= 5.3 then ----@param s string ----@param i? integer ----@param j? integer ----@return integer code ----@return integer ... ----@nodiscard -function utf8.codepoint(s, i, j) end ----#else ----@param s string ----@param i? integer ----@param j? integer ----@param lax? boolean ----@return integer code ----@return integer ... ----@nodiscard -function utf8.codepoint(s, i, j, lax) end ----#end - ----#DES 'utf8.len' ----#if VERSION <= 5.3 then ----@param s string ----@param i? integer ----@param j? integer ----@return integer? ----@return integer? errpos ----@nodiscard -function utf8.len(s, i, j) end ----#else ----@param s string ----@param i? integer ----@param j? integer ----@param lax? boolean ----@return integer? ----@return integer? errpos ----@nodiscard -function utf8.len(s, i, j, lax) end ----#end - ----#DES 'utf8.offset' ----@param s string ----@param n integer ----@param i? integer ----@return integer p ----@nodiscard -function utf8.offset(s, n, i) end - -return utf8 diff --git a/.github/ISSUE_TEMPLATE/component_missmatch_bug_report.yml b/.github/ISSUE_TEMPLATE/component_missmatch_bug_report.yml index 61be1096d..6a82b58aa 100644 --- a/.github/ISSUE_TEMPLATE/component_missmatch_bug_report.yml +++ b/.github/ISSUE_TEMPLATE/component_missmatch_bug_report.yml @@ -35,7 +35,7 @@ body: validations: required: true - type: textarea - id: description + id: additional_info attributes: - label: Description + label: Additional information description: If you have any additional information, please add it here. \ No newline at end of file diff --git a/mods/noita-mp/config.lua b/mods/noita-mp/config.lua index 8c5c2f29f..2aefb816f 100644 --- a/mods/noita-mp/config.lua +++ b/mods/noita-mp/config.lua @@ -59,7 +59,7 @@ EntitySerialisationUtils.ignore = { "ControllerGoombaAIComponent", "ControlsComponent", "FishAIComponent", - "HitboxComponent", -- Unable to determine HitboxComponents by values, if there are more than one, everyone could match? + "HitboxComponent", -- Unable to determine HitboxComponents by values, if there are more than one, everyone could match? "HotspotComponent", -- Unable to determine HotspotComponent by values, if there are more than one, everyone could match? "Inventory2Component", "InventoryGuiComponent", @@ -74,9 +74,25 @@ EntitySerialisationUtils.ignore = { --- Entities with filename or better to say filepath listed in byFilenameOrPath will be ignored on serialisation byFilenameOrPath = {}, --- Component members listed in byMemberKey will be ignored on serialisation - byMemberKey = { "mUpdateFrame", "mFramesOnGround", "mLastFrameOnGround", "mFramesNotSwimming", - "mAirFramesNotInWater", "mLastCheckTime", "mLastExecutionFrame", "mNextExecutionTime", "mTimesExecuted", - "mRenderListHandle", "physics_explosion_power", "delay" } + byMemberKey = { + "delay", + "m_frame_created", + "mAirFramesNotInWater", + "mFramesNotSwimming", + "mFramesOnGround", + "mFromMaterialArray", + "mLastCheckTime", + "mLastExecutionFrame", + "mLastFrameOnGround", + "mNextExecutionTime", + "mPixelSprite", + "mRenderListHandle", + "mTimesExecuted", + "mToMaterialArray", + "mUpdateFrame", + "physics_explosion_power", + "player_polymorph_count", + } } ------------------------------------------------------------------------------------------------------------------------ diff --git a/mods/noita-mp/data/biome/_biomes_all.xml b/mods/noita-mp/data/biome/_biomes_all.xml deleted file mode 100644 index 12f69f2cb..000000000 --- a/mods/noita-mp/data/biome/_biomes_all.xml +++ /dev/null @@ -1,1030 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/mods/noita-mp/data/biome/_pixel_scenes.xml b/mods/noita-mp/data/biome/_pixel_scenes.xml deleted file mode 100644 index 5bcc7da74..000000000 --- a/mods/noita-mp/data/biome/_pixel_scenes.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/mods/noita-mp/data/biome_impl/biome_map.png b/mods/noita-mp/data/biome_impl/biome_map.png deleted file mode 100644 index ac4600d0c..000000000 Binary files a/mods/noita-mp/data/biome_impl/biome_map.png and /dev/null differ diff --git a/mods/noita-mp/data/biome_impl/testing-room-pixel-scene.png b/mods/noita-mp/data/biome_impl/testing-room-pixel-scene.png deleted file mode 100644 index 12ebb04ce..000000000 Binary files a/mods/noita-mp/data/biome_impl/testing-room-pixel-scene.png and /dev/null differ diff --git a/mods/noita-mp/files/data/biome/testing-room.xml b/mods/noita-mp/files/data/biome/testing-room.xml deleted file mode 100644 index e0ff2a4de..000000000 --- a/mods/noita-mp/files/data/biome/testing-room.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - \ No newline at end of file diff --git a/mods/noita-mp/files/data/magic_numbers.xml b/mods/noita-mp/files/data/magic_numbers.xml index bbf37db0e..ef9aca0d3 100644 --- a/mods/noita-mp/files/data/magic_numbers.xml +++ b/mods/noita-mp/files/data/magic_numbers.xml @@ -1,6 +1,4 @@ \ No newline at end of file diff --git a/mods/noita-mp/files/scripts/DefaultBiomeMap.lua b/mods/noita-mp/files/scripts/DefaultBiomeMap.lua index 3758db2bb..a528a1257 100644 --- a/mods/noita-mp/files/scripts/DefaultBiomeMap.lua +++ b/mods/noita-mp/files/scripts/DefaultBiomeMap.lua @@ -1,6 +1,3 @@ ---- defaultbiomemap --- @module ignoreMe --- @todo remove this when synchronisation is working dofile_once("data/scripts/lib/utilities.lua") BiomeMapSetSize(70, 48) BiomeMapLoadImage(0, 0, "data/biome_impl/biome_map.png") diff --git a/mods/noita-mp/files/scripts/NoitaMpSettings.lua b/mods/noita-mp/files/scripts/NoitaMpSettings.lua index ba04d47da..f15a8f2b3 100644 --- a/mods/noita-mp/files/scripts/NoitaMpSettings.lua +++ b/mods/noita-mp/files/scripts/NoitaMpSettings.lua @@ -3,18 +3,16 @@ NoitaMpSettings = {} --- 'Imports' -local fu = require("FileUtils") local lfs = require("lfs") local winapi = require("winapi") local json = require("json") -local Utils = require("Utils") function NoitaMpSettings.clearAndCreateSettings() local cpc = CustomProfiler.start("NoitaMpSettings.clearAndCreateSettings") - local settingsDir = fu.GetAbsolutePathOfNoitaMpSettingsDirectory() - if fu.Exists(settingsDir) then - fu.RemoveContentOfDirectory(settingsDir) + local settingsDir = FileUtils.GetAbsolutePathOfNoitaMpSettingsDirectory() + if FileUtils.Exists(settingsDir) then + FileUtils.RemoveContentOfDirectory(settingsDir) Logger.info(Logger.channels.initialize, ("Removed old settings in '%s'!"):format(settingsDir)) else lfs.mkdir(settingsDir) @@ -40,21 +38,21 @@ function NoitaMpSettings.writeSettings(key, value) who = whoAmI() end local settingsFile = ("%s%s%s%s.json") - :format(fu.GetAbsolutePathOfNoitaMpSettingsDirectory(), pathSeparator, pid, who) + :format(FileUtils.GetAbsolutePathOfNoitaMpSettingsDirectory(), pathSeparator, pid, who) - if not fu.Exists(settingsFile) then - fu.WriteFile(settingsFile, "{}") + if not FileUtils.Exists(settingsFile) then + FileUtils.WriteFile(settingsFile, "{}") end - local contentString = fu.ReadFile(settingsFile) + local contentString = FileUtils.ReadFile(settingsFile) local contentJson = json.decode(contentString) contentJson[key] = value - fu.WriteFile(settingsFile, json.encode(contentJson)) + FileUtils.WriteFile(settingsFile, json.encode(contentJson)) Logger.trace(Logger.channels.testing, ("Wrote custom setting: %s = %s"):format(key, value)) - local result = fu.ReadFile(settingsFile) + local result = FileUtils.ReadFile(settingsFile) CustomProfiler.stop("NoitaMpSettings.writeSettings", cpc) return result end @@ -64,13 +62,13 @@ function NoitaMpSettings.getSetting(key) local pid = winapi.get_current_pid() local settingsFile = ("%s%s%s%s.json") - :format(fu.GetAbsolutePathOfNoitaMpSettingsDirectory(), pathSeparator, pid, whoAmI()) + :format(FileUtils.GetAbsolutePathOfNoitaMpSettingsDirectory(), pathSeparator, pid, whoAmI()) - if not fu.Exists(settingsFile) then - fu.WriteFile(settingsFile, "{}") + if not FileUtils.Exists(settingsFile) then + FileUtils.WriteFile(settingsFile, "{}") end - local contentString = fu.ReadFile(settingsFile) + local contentString = FileUtils.ReadFile(settingsFile) local contentJson = json.decode(contentString) if Utils.IsEmpty(contentJson[key]) then diff --git a/mods/noita-mp/files/scripts/Ui.lua b/mods/noita-mp/files/scripts/Ui.lua index 74a0165f6..b7203539c 100644 --- a/mods/noita-mp/files/scripts/Ui.lua +++ b/mods/noita-mp/files/scripts/Ui.lua @@ -6,7 +6,6 @@ Ui = {} -- 'Imports' local renderEzgui = dofile_once("mods/noita-mp/lua_modules/share/lua/5.1/ezgui/EZGUI.lua").init( "mods/noita-mp/lua_modules/share/lua/5.1/ezgui") -local fu = require("FileUtils") --- Global private variables: @@ -141,7 +140,7 @@ function Ui.new() local text = "" if foldingOpen then self.ezguiFoldingData.data.text = ("[- NoitaMP] %s eCache:%s pCache:%s nCache:%s %s") - :format(fu.GetVersionByFile(), EntityCache.size(), CustomProfiler.getSize(), + :format(FileUtils.GetVersionByFile(), EntityCache.size(), CustomProfiler.getSize(), NetworkUtils.getClientOrServer().getAckCacheSize(), GameGetFrameNum()) else self.ezguiFoldingData.data.text = ("[+ NoitaMP] eCache:%s pCache:%s nCache:%s %s") diff --git a/mods/noita-mp/files/scripts/biome/testingRoom.lua b/mods/noita-mp/files/scripts/biome/testingRoom.lua deleted file mode 100644 index 360ef7d8a..000000000 --- a/mods/noita-mp/files/scripts/biome/testingRoom.lua +++ /dev/null @@ -1,20 +0,0 @@ ---- testingroom.lua -dofile_once("data/scripts/biome_scripts.lua") - -RegisterSpawnFunction(0xffffeedd, "init") -RegisterSpawnFunction(0xffff0001, "spawn_enemy_a") -RegisterSpawnFunction(0xffff0002, "spawn_enemy_b") - -function init(x, y) - LoadPixelScene("mods/noita-mp/data/biome_impl/testing-room-pixel-scene.png", "", x, y, "", true) -end - -function spawn_enemy_a(x, y) - EntityLoad("data/entities/animals/zombie_weak.xml", x, y) -end - -function spawn_enemy_b(x, y) - EntityLoad("data/entities/animals/firemage_weak.xml", x, y) -end - -function spawn_small_enemies() end \ No newline at end of file diff --git a/mods/noita-mp/files/scripts/init/init_.lua b/mods/noita-mp/files/scripts/init/init_.lua index 8bb0e703c..442f624b7 100644 --- a/mods/noita-mp/files/scripts/init/init_.lua +++ b/mods/noita-mp/files/scripts/init/init_.lua @@ -265,19 +265,172 @@ local checkMandatoryDependencyMods = function() if not ModIsEnabled("NoitaDearImGui") then error("Please install NoitaDearImGui mod: https://github.com/dextercd/Noita-Dear-ImGui/releases/tag/release-1.9.0", 2) end - if not FileUtils.Exists(("%s\\..\\NoitaPatcher"):format(FileUtils.GetAbsoluteDirectoryPathOfNoitaMP())) then - error("Please install NoitaPatcher mod: https://github.com/dextercd/NoitaPatcher/releases/tag/release-1.10.1", 2) - end - if not FileUtils.Exists(("%s\\..\\nsew"):format(FileUtils.GetAbsoluteDirectoryPathOfNoitaMP())) then - error("Please install NSEW mod: https://github.com/dextercd/Noita-Synchronise-Expansive-Worlds/releases/tag/release-0.0.5", 2) - end + -- if not FileUtils.Exists(("%s\\..\\NoitaPatcher"):format(FileUtils.GetAbsoluteDirectoryPathOfNoitaMP())) then + -- error("Please install NoitaPatcher mod: https://github.com/dextercd/NoitaPatcher/releases/tag/release-1.10.1", 2) + -- end + -- if not FileUtils.Exists(("%s\\..\\nsew"):format(FileUtils.GetAbsoluteDirectoryPathOfNoitaMP())) then + -- error("Please install NSEW mod: https://github.com/dextercd/Noita-Synchronise-Expansive-Worlds/releases/tag/release-0.0.5", 2) + -- end if not ModIsEnabled("EnableLogger") then error("Please install EnableLogger mod: https://steamcommunity.com/sharedfiles/filedetails/?id=2124936579&searchtext=logger", 2) end - if not ModIsEnabled("minidump") then - error("Please install minidump mod: https://github.com/dextercd/Noita-Minidump/releases/tag/release-1.1.2", 2) - end + -- if not ModIsEnabled("minidump") then + -- error("Please install minidump mod: https://github.com/dextercd/Noita-Minidump/releases/tag/release-1.1.2", 2) + -- end end end checkMandatoryDependencyMods() + + + + + + + + + + +-- function toBinString(s) +-- bytes = { string.byte(s, i, string.len(s)) } +-- binary = "" + +-- for i, number in ipairs(bytes) do +-- c = 0 + +-- while (number > 0) do +-- binary = (number % 2) .. binary +-- number = number - (number % 2) +-- number = number / 2 +-- c = c + 1 +-- end + +-- while (c < 8) do +-- binary = "0" .. binary +-- c = c + 1 +-- end +-- end + +-- return binary +-- end + +-- function toBin(s) +-- binary = toBinString(s) +-- ret = {} +-- c = 1 + +-- for i = 1, string.len(binary) do +-- char = string.sub(binary, i, i) + +-- if (tonumber(char) == 0) then +-- ret[c] = 0 +-- c = c + 1 +-- elseif (tonumber(char) == 1) then +-- ret[c] = 1 +-- c = c + 1 +-- elseif (tonumber(char)) then +-- print("Error: expected \'0\' or \'1\' but got \'", char, "\'.") +-- end +-- end + +-- return ret +-- end + +-- function toBinAndBack(s) +-- local bin = toBin(s) +-- local r = {} +-- for i = 1, #bin, 8 do +-- local n = 0 +-- for j = 0, 7 do +-- n = n + (2 ^ (7 - j)) * bin[i + j] +-- end +-- r[#r + 1] = n +-- end +-- for i = 1, #r do +-- r[i] = string.char(r[i]) +-- end +-- return table.concat(r):reverse() +-- end + +-- -- local function hexdecode(hex) +-- -- return (hex:gsub("%x%x", function(digits) +-- -- return string.char(tonumber(digits, 16)) +-- -- end)) +-- -- end + +-- -- local function hexencode(str) +-- -- return (str:gsub(".", function(char) +-- -- return string.format("%2x", char:byte()) +-- -- end)) +-- -- end + +-- -- print(hexdecode(hexencode("Hello, World!"))) + +-- -- -- local bytemarkers = { { 0x7FF, 192 }, { 0xFFFF, 224 }, { 0x1FFFFF, 240 } } +-- -- -- function utf8(decimal) +-- -- -- if type(decimal) ~= "number" then +-- -- -- decimal = hexencode(decimal) +-- -- -- end +-- -- -- if decimal < 128 then return string.char(decimal) end +-- -- -- local charbytes = {} +-- -- -- for bytes, vals in ipairs(bytemarkers) do +-- -- -- if decimal <= vals[1] then +-- -- -- for b = bytes + 1, 2, -1 do +-- -- -- local mod = decimal % 64 +-- -- -- decimal = (decimal - mod) / 64 +-- -- -- charbytes[b] = string.char(128 + mod) +-- -- -- end +-- -- -- charbytes[1] = string.char(vals[2] + decimal) +-- -- -- break +-- -- -- end +-- -- -- end +-- -- -- return table.concat(charbytes) +-- -- -- end + +-- -- -- function utf8frompoints(...) +-- -- -- local chars, arg = {}, { ... } +-- -- -- for i, n in ipairs(arg) do chars[i] = utf8(arg[i]) end +-- -- -- return table.concat(chars) +-- -- -- end + +-- -- -- FileUtils.WriteFile(("%s%s%s"):format(FileUtils.GetDesktopDirectory(), pathSeparator, "utf8.txt"), +-- -- -- utf8frompoints(72, 233, 108, 108, 246, 32, 8364, 8212)) +-- -- --> Héllö €— + +-- -- REMOVE this +-- if require then +-- local base64 = require("base64") +-- local b64str = +-- "AAAADyRhbmltYWxfbG9uZ2xlZwAAAAAhZGF0YS9lbnRpdGllcy9hbmltYWxzL2xvbmdsZWcueG1sAAAATXRlbGVwb3J0YWJsZV9OT1QsZW5lbXksbW9ydGFsLGh1bWFuLGhpdHRhYmxlLGhvbWluZ190YXJnZXQsZGVzdHJ1Y3Rpb25fdGFyZ2V0RBHAAMK0AAA/gAAAP4AAAAAAAAAAAAAXAAAAEUFuaW1hbEFJQ29tcG9uZW50AQEAAAAAAAAAAAAAAAAAAAAKSm9iRGVmYXVsdAAAAGQAAABkAAAAAP////gAAEOWAABDlgAAQrQAAAAAAB5DlgAAAAAAMgAAAHg/gAAAQsgAAAABAQAAQsgAAAAAAAAKAAAAAgAAABQ+TMzNPszMzT+AAAA+gAAAQkgAAAAAAAAAAAAAAAFBoAAAAAAAIGRhdGEvcGFydGljbGVzL2V4cGxvc2lvbl8wMzIueG1sAAABAAAAAECgAAAAAAAAP4AAAEDwAAABAAAAAAE9o9cKAAAA/wAAANkAAAC0QQAAAAEBAAAAAAAAAAoAAAAKP4AAAAABAAAABGZpcmUAAAAFAAAAAAAAAAVzcGFyawAAJxAAAAAFAAAABwAAABQAAAABAAAABwAAABQ+qn76AQAAAAAAAE4gAAAACgAAAAEBAQEAAAAAPkzMzT+AAAA/gAAAQKAAAEMWAAAAAAAAQsgAAAAAAAA/QAAAAQABAAAAAAAAAAAAAAAAAAAAAP////8AAAACQkgAAAAAAHg+gAAAQ0gAAD9mZmZBIAAAQyAAAAAAAAIAAAA8AAAAAP////8AAAAAwSAAAAAAAAAAI2RhdGEvZW50aXRpZXMvcHJvamVjdGlsZXMvc3BlYXIueG1sAAAAAQAAAAEAAABAQAAAQSAAAAAAAC0AQ0gAAAAAASwAAADAAAAAVAEAAAAIAAAACAAAAAAAAAAGAAAAAAAAAAADQbAAAMIEAAABAQAAAQAAAANAwAAAAAAAAEKsJjwAAAAA/////wAAAA5BdWRpb0NvbXBvbmVudAEBAAAAAAAAAB9kYXRhL2F1ZGlvL0Rlc2t0b3AvYW5pbWFscy5iYW5rAAAAB2FuaW1hbHMAAAAAAQAAAAAAAA5BdWRpb0NvbXBvbmVudAEBAAAAAAAAAB9kYXRhL2F1ZGlvL0Rlc2t0b3AvYW5pbWFscy5iYW5rAAAAD2FuaW1hbHMvZ2VuZXJpYwAAAAABAAAAAAAADkF1ZGlvQ29tcG9uZW50AQEAAAAAAAAAH2RhdGEvYXVkaW8vRGVza3RvcC9hbmltYWxzLmJhbmsAAAAPYW5pbWFscy9sb25nbGVnAAAAAAAAAAAAAAAUQ2FtZXJhQm91bmRDb21wb25lbnQBAQAAAAABSBxAAEGgAAAAAAAUAQEAAAAbQ2hhcmFjdGVyQ29sbGlzaW9uQ29tcG9uZW50AQEAAAAAAAAABgAAAAYAAAAWQ2hhcmFjdGVyRGF0YUNvbXBvbmVudAEBAAAAAAAAAADAAAAAAAAAAP////9AAAAAAAAAAP/////AwAAAAAAAAP////9AQAAAAAAAAP////8+zMzN////+kEQAAAAAAAAAAAAAAAAAAD/////AAAAAAAAAAAAAAAALAAAAAgAAAAEAAAABAAAAAQAAAAAAAABAAAACgAAAF8AAAAAQKAAAEDNtthApJJPwZySOkGcoVzCIAAAwTkkdD+kknkAO2VgQgAAAAAARHoAAAAAAB1DaGFyYWN0ZXJQbGF0Zm9ybWluZ0NvbXBvbmVudAEBAAAAAMJIAAAAAAAA/////0JIAAAAAAAA/////8P6AAAAAAAA/////0P6AAAAAAAA/////0HIAAAAAAAA/////0HlZgQAAAAA/////wAAAADDDAAAAAAAAkK0AAAAAAAA/////0K0AAAAAAAA/////0GgAAA/gAAAAAE+mZmaPczMzUQWAAA/mZmaPzMzMz9mZmY/czMzP2ZmZgA/gAAAAD3MzM0AAAAAAAAAAEJIAAABAAAAFP////8AAAARQ29udHJvbHNDb21wb25lbnQBAQAAAAAAAAAAAAAAAD8zMzMAAAAURGFtYWdlTW9kZWxDb21wb25lbnQBAQAAAAA/vCj1wo9cKT+8KPXCj1wpAAAAAAAAAAAAAAAAAAAAAD+AAAA/gAAAP4AAAD+AAAA/gAAAPzMzMz+AAAA/gAAAP4AAAD+AAAA/gAAAP4AAAD+AAAA/gAAAAAAAAAAAAAAAQowAAEN6AAA9zMzNP5mZmgFAoAAAQKAAAD5MzM0AAAAAAQAAAAQAAADmYWNpZCxsYXZhLHBvaXNvbixibG9vZF9jb2xkLGJsb29kX2NvbGRfdmFwb3VyLHJhZGlvYWN0aXZlX2dhcyxyYWRpb2FjdGl2ZV9nYXNfc3RhdGljLHJvY2tfc3RhdGljX3JhZGlvYWN0aXZlLHJvY2tfc3RhdGljX3BvaXNvbixpY2VfcmFkaW9hY3RpdmVfc3RhdGljLGljZV9yYWRpb2FjdGl2ZV9nbGFzcyxpY2VfYWNpZF9zdGF0aWMsaWNlX2FjaWRfZ2xhc3Mscm9ja19zdGF0aWNfY3Vyc2VkLHBvb19nYXMAAABdMC4wMDQsMC4wMDQsMC4wMDEsMC4wMDA4LDAuMDAwNywwLjAwMSwwLjAwMSwwLjAwMSwwLjAwMSwwLjAwMSwwLjAwMSwwLjAwMSwwLjAwMSwwLjAwNSwwLjAwMDAxAAEBAAAABG1lYXQAAAAjZGF0YS9yYWdkb2xscy9sb25nbGVnL2ZpbGVuYW1lcy50eHQAAAAEbWVhdAAAAADAwAAAAAAAAAAAAAxibG9vZF9mYWRpbmcAAAAFYmxvb2QBP4AAAP////8AAABJZGF0YS9wYXJ0aWNsZXMvYmxvb2RzcGxhdHRlcnMvYmxvb2RzcGxhdHRlcl9kaXJlY3Rpb25hbF9wdXJwbGVfJFsxLTNdLnhtbAAAAD1kYXRhL3BhcnRpY2xlcy9ibG9vZHNwbGF0dGVycy9ibG9vZHNwbGF0dGVyX3B1cnBsZV8kWzEtM10ueG1sAAAAAAEAAAAAAAAAAAEBAAAAAAAAAAAAAD8AAAAAAAAEOZ1JUj5MzM2AAAAAgAAAAP//2PAAAAASR2FtZVN0YXRzQ29tcG9uZW50AQEAAAAAAAAAB2xvbmdsZWcAAAAXPz9TVEEvc3RhdHNfbG9uZ2xlZy54bWwAAAAAAAAAAAAAAAATR2Vub21lRGF0YUNvbXBvbmVudAEBAAAAAAAAAA8AAAAA/////wFBIAAAAAAAAA9IaXRib3hDb21wb25lbnQBAQAAAAAAAQDAoAAAQKAAAMDAAABAwAAAAAAAAAAAAAA/gAAAAAAAEEhvdHNwb3RDb21wb25lbnQBAQAAAAlzaG9vdF9wb3MAAAAAwIAAAAEAAAAAAAAAEkl0ZW1DaGVzdENvbXBvbmVudAEAAAAAAAAAAAIAAAADAAAAAQEAAAAAAAAAAAAAAAAQo9h5AAAADEx1YUNvbXBvbmVudAEBAAAAAAAAAAAAAAAAAAD/////AAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAhZGF0YS9zY3JpcHRzL2l0ZW1zL2Ryb3BfbW9uZXkubHVhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////wAAAAAUUGF0aEZpbmRpbmdDb21wb25lbnQBAQAAAAAAAAB4AJiWfwACNmgAAjZoRImAAAAAABQAAAAUAAAARgAAABRBAAAAAAEAAAAAAAAAAEPIAABDSAAAP4AAAELIAABCcAAAAAAABkCgAABBcAAAP4AAAEDgAABBoAAAP4AAAEEgAADCcAAAP4AAAEIgAADCDAAAP4AAAEJwAADCIAAAP4AAAEJwAABClgAAP4AAAAAAAB5QYXRoRmluZGluZ0dyaWRNYXJrZXJDb21wb25lbnQBAQAAAAAAAAAQAAAAAMDAAAAAAAAAAAAAF1Nwcml0ZUFuaW1hdG9yQ29tcG9uZW50AQEAAAAAAAAACWNoYXJhY3RlcgAAAAAPU3ByaXRlQ29tcG9uZW50AQEAAAAJY2hhcmFjdGVyAAAAHGRhdGEvZW5lbWllc19nZngvbG9uZ2xlZy54bWwAAEDAAABBQAAAAAAAAAAAAAAAAAAAAAAAAD+AAAABAAAAAAAAAAR3YWxrAAAAAAAAAAC/gAAAAQEAAD+AAAA/gAAAAAAAABVTcHJpdGVTdGFpbnNDb21wb25lbnQBAQAAAAAAAAAAAQAAAAEAAAAA/////wAAABlTdGF0dXNFZmZlY3REYXRhQ29tcG9uZW50AQEAAAAAAAAAKQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEVZlbG9jaXR5Q29tcG9uZW50AQEAAAAAAAAAAEPIAAA9TMzNPwzMzUR6AAABAAEAAQAAAAA/gAAAAAAAAAAAAAAAAAAA" +-- local decoded = base64.decode(b64str) + +-- local test = toBinAndBack(decoded) + +-- print(Utils.pformat(decoded)) +-- FileUtils.WriteBinaryFile(("%s%s%s"):format(FileUtils.GetDesktopDirectory(), pathSeparator, "poly.txt"), decoded) + +-- local utf8 = require("lua-utf8") + +-- print(utf8.escape("%123%u123%{123}%u{123}%xABC%x{ABC}")) +-- print(utf8.escape("%%123%?%d%%u")) + +-- local f = assert(io.open(("%s%s%s"):format(FileUtils.GetDesktopDirectory(), pathSeparator, "poly.txt"), "rb")) +-- local output = io.open(("%s%s%s"):format(FileUtils.GetDesktopDirectory(), pathSeparator, "poly2.txt"), "w") +-- local block = 10 +-- while true do +-- local bytes = decoded--f:read(block) +-- if not bytes then break end +-- for b in string.gfind(bytes, ".") do +-- if b == "D" then +-- print("issue") +-- end +-- local byteAsNumber = utf8.byte(b) +-- local byteAsHex = string.format("%02X ", utf8.byte(b)) +-- local str = utf8.escape("%" .. string.format("%s", byteAsNumber)) +-- print(str) +-- output:write(str) +-- end +-- output:write(string.rep(" ", block - string.len(bytes) + 1)) +-- output:write(string.gsub(bytes, "%c", "."), "\n") +-- end +-- end diff --git a/mods/noita-mp/files/scripts/init/init_package_loading.lua b/mods/noita-mp/files/scripts/init/init_package_loading.lua index 0c2b9e5e6..80fd103e4 100644 --- a/mods/noita-mp/files/scripts/init/init_package_loading.lua +++ b/mods/noita-mp/files/scripts/init/init_package_loading.lua @@ -40,8 +40,11 @@ package.cpath = package.cpath .. ";" .. "mods\\noita-mp\\lua_modules\\lib\\lua\\5.1\\?.dll;" print("package.cpath = " .. package.cpath) -local fu = require("FileUtils") --[[ NoitaMP additions ]] +if not FileUtils then + FileUtils = require("FileUtils") +end + -- A list of paths to lua script modules local paths = { -- [[ LuaRocks modules, running outside of noita.exe ]]-- @@ -157,26 +160,26 @@ if current_clib_extension then --package.cpath = table.concat(cpaths, ";") --[[ NoitaMP additions ]] - package.path = fu.ReplacePathSeparator(table.concat(lpaths, ";")) - package.cpath = fu.ReplacePathSeparator(table.concat(cpaths, ";")) + package.path = FileUtils.ReplacePathSeparator(table.concat(lpaths, ";")) + package.cpath = FileUtils.ReplacePathSeparator(table.concat(cpaths, ";")) if destination_path then print("destination_path was set to export LPATH and CPATH!") - local lua_path_file = fu.RemoveTrailingPathSeparator(destination_path) .. + local lua_path_file = FileUtils.RemoveTrailingPathSeparator(destination_path) .. _G.pathSeparator .. "lua_path.txt" local lua_path_file_content = ";" .. package.path - local lua_cpath_file = fu.RemoveTrailingPathSeparator(destination_path) .. + local lua_cpath_file = FileUtils.RemoveTrailingPathSeparator(destination_path) .. _G.pathSeparator .. "lua_cpath.txt" local lua_cpath_file_content = ";" .. package.cpath - fu.WriteFile(lua_path_file, lua_path_file_content) + FileUtils.WriteFile(lua_path_file, lua_path_file_content) print("init_package_loading.lua | File (" .. lua_path_file .. ") created with content: " .. lua_path_file_content) - fu.WriteFile(lua_cpath_file, lua_cpath_file_content) + FileUtils.WriteFile(lua_cpath_file, lua_cpath_file_content) print("init_package_loading.lua | File (" .. lua_cpath_file .. ") created with content: " .. lua_cpath_file_content) else diff --git a/mods/noita-mp/files/scripts/net/Client.lua b/mods/noita-mp/files/scripts/net/Client.lua index d6879efcf..e474440e3 100644 --- a/mods/noita-mp/files/scripts/net/Client.lua +++ b/mods/noita-mp/files/scripts/net/Client.lua @@ -5,10 +5,8 @@ local ClientInit = {} --- 'Imports' local sock = require("sock") -local Utils = require("Utils") local zstandard = require("zstd") local messagePack = require("MessagePack") -local fu = require("FileUtils") ---@param sockClient SockClient @@ -313,9 +311,9 @@ function ClientInit.new(sockClient) ("onMinaInformation: Clients GUID %s isn't unique! Server will fix this!"):format(self.guid)) end - if fu.GetVersionByFile() ~= tostring(data.version) then + if FileUtils.GetVersionByFile() ~= tostring(data.version) then error(("Version mismatch: NoitaMP version of Server: %s and your version: %s") - :format(data.version, fu.GetVersionByFile()), 3) + :format(data.version, FileUtils.GetVersionByFile()), 3) self.disconnect() end @@ -398,7 +396,7 @@ function ClientInit.new(sockClient) local localSeed = tonumber(StatsGetValue("world_seed")) if localSeed ~= serversSeed then - --Utils.reloadMap(serversSeed) TODO enable again, when custom map/biome isn't used anymore + Utils.ReloadMap(serversSeed) end local entityId = MinaUtils.getLocalMinaEntityId() @@ -522,7 +520,7 @@ function ClientInit.new(sockClient) end -- FOR TESTING ONLY, DO NOT MERGE - print(Utils.pformat(data)) + --print(Utils.pformat(data)) --os.exit() --if ownerGuid == MinaUtils.getLocalMinaInformation().guid then @@ -655,19 +653,19 @@ function ClientInit.new(sockClient) local modID = v.workshopID local modData = v.data if modID == "0" then - if not fu.IsDirectory((fu.GetAbsolutePathOfNoitaRootDirectory() .. "/mods/%s/"):format(modName)) then + if not FileUtils.IsDirectory((FileUtils.GetAbsolutePathOfNoitaRootDirectory() .. "/mods/%s/"):format(modName)) then local fileName = ("%s_%s_mod_sync.7z"):format(tostring(os.date("!")), modName) - fu.WriteBinaryFile(fu.GetAbsoluteDirectoryPathOfNoitaMP() .. "/" .. fileName, modData) - fu.Extract7zipArchive(fu.GetAbsoluteDirectoryPathOfNoitaMP(), fileName, - (fu.GetAbsolutePathOfNoitaRootDirectory() .. "/mods/%s/"):format(modName)) + FileUtils.WriteBinaryFile(FileUtils.GetAbsoluteDirectoryPathOfNoitaMP() .. "/" .. fileName, modData) + FileUtils.Extract7zipArchive(FileUtils.GetAbsoluteDirectoryPathOfNoitaMP(), fileName, + (FileUtils.GetAbsolutePathOfNoitaRootDirectory() .. "/mods/%s/"):format(modName)) end else - if not fu.IsDirectory(("C:/Program Files (x86)/Steam/steamapps/workshop/content/881100/%s/"):format(modID)) then - if not fu.IsDirectory((fu.GetAbsolutePathOfNoitaRootDirectory() .. "/mods/%s/"):format(modName)) then + if not FileUtils.IsDirectory(("C:/Program Files (x86)/Steam/steamapps/workshop/content/881100/%s/"):format(modID)) then + if not FileUtils.IsDirectory((FileUtils.GetAbsolutePathOfNoitaRootDirectory() .. "/mods/%s/"):format(modName)) then local fileName = ("%s_%s_mod_sync.7z"):format(tostring(os.date("!")), modName) - fu.WriteBinaryFile(fu.GetAbsoluteDirectoryPathOfNoitaMP() .. "/" .. fileName, modData) - fu.Extract7zipArchive(fu.GetAbsoluteDirectoryPathOfNoitaMP(), fileName, - (fu.GetAbsolutePathOfNoitaRootDirectory() .. "/mods/%s/"):format(modName)) + FileUtils.WriteBinaryFile(FileUtils.GetAbsoluteDirectoryPathOfNoitaMP() .. "/" .. fileName, modData) + FileUtils.Extract7zipArchive(FileUtils.GetAbsoluteDirectoryPathOfNoitaMP(), fileName, + (FileUtils.GetAbsolutePathOfNoitaRootDirectory() .. "/mods/%s/"):format(modName)) end end end @@ -834,7 +832,7 @@ function ClientInit.new(sockClient) --- Some inheritance: Save parent function (not polluting global 'self' space) local sockClientUpdate = sockClient.update --- Updates the Client by checking for network events and handling them. - function self.update() + function self.update(startFrameTime) local cpc18 = CustomProfiler.start("ClientInit.update") if not self.isConnected() and not self:isConnecting() or self:isDisconnected() then CustomProfiler.stop("ClientInit.update", cpc18) @@ -847,7 +845,7 @@ function ClientInit.new(sockClient) --EntityUtils.processEntityNetworking() --EntityUtils.initNetworkVscs() - EntityUtils.processAndSyncEntityNetworking() + EntityUtils.processAndSyncEntityNetworking(startFrameTime) local nowTime = GameGetRealWorldTimeSinceStarted() * 1000 -- *1000 to get milliseconds local elapsedTime = nowTime - prevTime @@ -984,7 +982,7 @@ function ClientInit.new(sockClient) local transform = minaInfo.transform local health = minaInfo.health local data = { - NetworkUtils.getNextNetworkMessageId(), fu.GetVersionByFile(), name, guid, entityId, nuid, transform, health + NetworkUtils.getNextNetworkMessageId(), FileUtils.GetVersionByFile(), name, guid, entityId, nuid, transform, health } local sent = self:send(NetworkUtils.events.minaInformation.name, data) CustomProfiler.stop("ClientInit.sendMinaInformation", cpc24) diff --git a/mods/noita-mp/files/scripts/net/Server.lua b/mods/noita-mp/files/scripts/net/Server.lua index 88d2d5218..f2fde530c 100644 --- a/mods/noita-mp/files/scripts/net/Server.lua +++ b/mods/noita-mp/files/scripts/net/Server.lua @@ -4,8 +4,6 @@ ServerInit = {} --- 'Imports' local sock = require("sock") -local Utils = require("Utils") -local fu = require("FileUtils") local zstandard = require("zstd") local messagePack = require("MessagePack") @@ -166,6 +164,10 @@ function ServerInit.new(sockServer) if NetworkCache.size() > self.acknowledgeMaxSize then NetworkCache.removeOldest() end + + + --NoitaComponentUtils.setNetworkSpriteIndicatorStatus(entityId, "acked") + CustomProfiler.stop("Server.onAcknowledgement", cpc03) end @@ -291,9 +293,9 @@ function ServerInit.new(sockServer) end - if fu.GetVersionByFile() ~= tostring(data.version) then + if FileUtils.GetVersionByFile() ~= tostring(data.version) then error(("Version mismatch: NoitaMP version of Client: %s and your version: %s") - :format(data.version, fu.GetVersionByFile()), 3) + :format(data.version, FileUtils.GetVersionByFile()), 3) peer:disconnect() end @@ -338,43 +340,43 @@ function ServerInit.new(sockServer) end if Utils.IsEmpty(data.networkMessageId) then - error(("onNewNuid data.networkMessageId is empty: %s"):format(data.networkMessageId), 3) + error(("onNeedNuid data.networkMessageId is empty: %s"):format(data.networkMessageId), 3) end if Utils.IsEmpty(data.owner) then - error(("onNewNuid data.owner is empty: %s"):format(Utils.pformat(data.owner)), 3) + error(("onNeedNuid data.owner is empty: %s"):format(Utils.pformat(data.owner)), 3) end if Utils.IsEmpty(data.localEntityId) then - error(("onNewNuid data.localEntityId is empty: %s"):format(data.localEntityId), 3) + error(("onNeedNuid data.localEntityId is empty: %s"):format(data.localEntityId), 3) end if Utils.IsEmpty(data.x) then - error(("onNewNuid data.x is empty: %s"):format(data.x), 3) + error(("onNeedNuid data.x is empty: %s"):format(data.x), 3) end if Utils.IsEmpty(data.y) then - error(("onNewNuid data.y is empty: %s"):format(data.y), 3) + error(("onNeedNuid data.y is empty: %s"):format(data.y), 3) end if Utils.IsEmpty(data.rotation) then - error(("onNewNuid data.rotation is empty: %s"):format(data.rotation), 3) + error(("onNeedNuid data.rotation is empty: %s"):format(data.rotation), 3) end if Utils.IsEmpty(data.velocity) then - error(("onNewNuid data.velocity is empty: %s"):format(Utils.pformat(data.velocity)), 3) + error(("onNeedNuid data.velocity is empty: %s"):format(Utils.pformat(data.velocity)), 3) end if Utils.IsEmpty(data.filename) then - error(("onNewNuid data.filename is empty: %s"):format(data.filename), 3) + error(("onNeedNuid data.filename is empty: %s"):format(data.filename), 3) end if Utils.IsEmpty(data.health) then - error(("onNewNuid data.health is empty: %s"):format(data.health), 3) + error(("onNeedNuid data.health is empty: %s"):format(data.health), 3) end if Utils.IsEmpty(data.isPolymorphed) then - error(("onNewNuid data.isPolymorphed is empty: %s"):format(data.isPolymorphed), 3) + error(("onNeedNuid data.isPolymorphed is empty: %s"):format(data.isPolymorphed), 3) end local owner = data.owner @@ -548,7 +550,7 @@ function ServerInit.new(sockServer) local function onNeedModList(data, peer) local cpc = CustomProfiler.start("Server.onMeedModList") if self.modListCached == nil then - local modXML = fu.ReadFile(fu.GetAbsoluteDirectoryPathOfParentSave() .. "\\save00\\mod_config.xml") + local modXML = FileUtils.ReadFile(FileUtils.GetAbsoluteDirectoryPathOfParentSave() .. "\\save00\\mod_config.xml") local modList = { workshop = {}, external = {} @@ -595,14 +597,14 @@ function ServerInit.new(sockServer) if modId ~= "0" then pathToMod = ("C:/Program Files (x86)/Steam/steamapps/workshop/content/881100/%s/"):format(modId) else - pathToMod = (fu.GetAbsolutePathOfNoitaRootDirectory() .. "/mods/%s/"):format(mod) + pathToMod = (FileUtils.GetAbsolutePathOfNoitaRootDirectory() .. "/mods/%s/"):format(mod) end local archiveName = ("%s_%s_mod_sync"):format(tostring(os.date("!")), mod) - fu.Create7zipArchive(archiveName, pathToMod, fu.GetAbsoluteDirectoryPathOfNoitaMP()) + FileUtils.Create7zipArchive(archiveName, pathToMod, FileUtils.GetAbsoluteDirectoryPathOfNoitaMP()) table.insert(res, { name = mod, workshopID = mod, - data = fu.ReadBinaryFile(archiveName) + data = FileUtils.ReadBinaryFile(archiveName) }) end peer:send(NetworkUtils.events.needModContent.name, { NetworkUtils.getNextNetworkMessageId(), modsToGet, res }) @@ -920,7 +922,7 @@ function ServerInit.new(sockServer) --- Some inheritance: Save parent function (not polluting global 'self' space) local sockServerUpdate = sockServer.update --- Updates the server by checking for network events and handling them. - function self.update() + function self.update(startFrameTime) local cpc016 = CustomProfiler.start("Server.update") if not self.isRunning() then --if not self.host then @@ -939,7 +941,7 @@ function ServerInit.new(sockServer) end self.sendMinaInformation() - EntityUtils.processAndSyncEntityNetworking() + EntityUtils.processAndSyncEntityNetworking(startFrameTime) local nowTime = GameGetRealWorldTimeSinceStarted() * 1000 -- *1000 to get milliseconds local elapsedTime = nowTime - prevTime @@ -1006,6 +1008,10 @@ function ServerInit.new(sockServer) --print(Utils.pformat(data)) --os.exit() + if sent == true then + NoitaComponentUtils.setNetworkSpriteIndicatorStatus(entityId, "sent") + end + return sent end @@ -1059,7 +1065,7 @@ function ServerInit.new(sockServer) local transform = minaInfo.transform local health = minaInfo.health local data = { - NetworkUtils.getNextNetworkMessageId(), fu.GetVersionByFile(), name, guid, entityId, nuid, transform, health + NetworkUtils.getNextNetworkMessageId(), FileUtils.GetVersionByFile(), name, guid, entityId, nuid, transform, health } local sent = self:sendToAll(NetworkUtils.events.minaInformation.name, data) CustomProfiler.stop("Server.sendMinaInformation", cpc24) diff --git a/mods/noita-mp/files/scripts/util/CustomProfiler.lua b/mods/noita-mp/files/scripts/util/CustomProfiler.lua index 372a66b43..ad6454985 100644 --- a/mods/noita-mp/files/scripts/util/CustomProfiler.lua +++ b/mods/noita-mp/files/scripts/util/CustomProfiler.lua @@ -1,6 +1,4 @@ local plotly = require("plotly") -local Utils = require("Utils") -local fu = require("FileUtils") ---Simple profiler that can be used to measure the duration of a function and the memory usage of a function. ---@class CustomProfiler @@ -24,7 +22,7 @@ CustomProfiler.maxEntries = 50 -- Default: 50 ---@type string The directory where the report will be saved. CustomProfiler.reportDirectory = ("%s%sNoitaMP-Reports%s%s") - :format(fu.GetDesktopDirectory(), pathSeparator, pathSeparator, os.date("%Y-%m-%d_%H-%M-%S", os.time())) + :format(FileUtils.GetDesktopDirectory(), pathSeparator, pathSeparator, os.date("%Y-%m-%d_%H-%M-%S", os.time())) ---@type string The filename of the report. CustomProfiler.reportFilename = "report.html" -- Default: report.html @@ -159,8 +157,8 @@ function CustomProfiler.stop(functionName, customProfilerCounter) CustomProfiler.reportCache[functionName]["size"] and CustomProfiler.reportCache[functionName]["size"] >= CustomProfiler.maxEntries then - if not fu.Exists(CustomProfiler.reportDirectory) then - fu.MkDir(CustomProfiler.reportDirectory) + if not FileUtils.Exists(CustomProfiler.reportDirectory) then + FileUtils.MkDir(CustomProfiler.reportDirectory) end local x = {} @@ -252,7 +250,7 @@ function CustomProfiler.report() fig1:update_layout { width = 1920, height = 1080, - title = "NoitaMP Profiler Report of " .. whoAmI() .. " " .. fu.getVersionByFile(), + title = "NoitaMP Profiler Report of " .. whoAmI() .. " " .. FileUtils.GetVersionByFile(), xaxis = { title = { text = "Frames" } }, yaxis = { title = { text = "Execution time [ms]" } }, barmode = "group" diff --git a/mods/noita-mp/files/scripts/util/EntityCache.lua b/mods/noita-mp/files/scripts/util/EntityCache.lua index 921450c02..f2b3fd88c 100644 --- a/mods/noita-mp/files/scripts/util/EntityCache.lua +++ b/mods/noita-mp/files/scripts/util/EntityCache.lua @@ -23,7 +23,7 @@ else -- if not CustomProfiler then -- ---@type CustomProfiler -- CustomProfiler = {} - + -- ---@diagnostic disable-next-line: duplicate-doc-alias -- ---@alias CustomProfiler.start function(functionName: string): number -- ---@diagnostic disable-next-line: duplicate-set-field @@ -47,11 +47,11 @@ end EntityCache.usingC = false -- not _G.disableLuaExtensionsDLL EntityCache.cache = {} EntityCache.set = function(entityId, nuid, ownerGuid, ownerName, filepath, x, y, rotation, velX, velY, - currentHealth, maxHealth) + currentHealth, maxHealth, fullySerialised, serialisedRootEntity) local cpc = CustomProfiler.start("EntityCache.set") if EntityCache.usingC then return EntityCacheC.set(entityId, nuid, ownerGuid, ownerName, filepath, x, y, rotation, velX, velY, currentHealth, - maxHealth) + maxHealth) end if not EntityCache.cache[entityId] then EntityCache.cache[entityId] = { @@ -68,10 +68,24 @@ EntityCache.set = function(entityId, nuid, ownerGuid, ownerName, filepath currentHealth = currentHealth, maxHealth = maxHealth } + if Utils.IsEmpty(fullySerialised) or fullySerialised == true then + --EntityCache.cache[entityId].fullySerialised = true + --EntityCache.cache[entityId].serialisedRootEntity = nil -- free a bit memory + else + EntityCache.cache[entityId].fullySerialised = fullySerialised + EntityCache.cache[entityId].serialisedRootEntity = serialisedRootEntity + end end CustomProfiler.stop("EntityCache.set", cpc) end +EntityCache.contains = function(entityId) + if EntityCache.cache[entityId] then + return true + end + return false +end + EntityCache.get = function(entityId) local cpc = CustomProfiler.start("EntityCache.get") if EntityCache.usingC then @@ -120,10 +134,21 @@ EntityCache.deleteNuid = function(nuid) end EntityCache.size = function() + local cpc = CustomProfiler.start("EntityCache.size") if EntityCache.usingC then + CustomProfiler.stop("EntityCache.size", cpc) return EntityCacheC.size() end - return table.size(EntityCache.cache) + local size = 0 + for i, entry in pairs(EntityCache.cache) do + if EntityGetIsAlive(entry.entityId) then + size = size + 1 + else + OnEntityRemoved(entry.entityId, entry.nuid) + end + end + CustomProfiler.stop("EntityCache.size", cpc) + return size end EntityCache.usage = function() @@ -133,4 +158,4 @@ EntityCache.usage = function() return EntityCacheC.usage() end -return EntityCache \ No newline at end of file +return EntityCache diff --git a/mods/noita-mp/files/scripts/util/EntityCacheUtils.lua b/mods/noita-mp/files/scripts/util/EntityCacheUtils.lua index e24b2e6d7..8a1c2ae4f 100644 --- a/mods/noita-mp/files/scripts/util/EntityCacheUtils.lua +++ b/mods/noita-mp/files/scripts/util/EntityCacheUtils.lua @@ -1,9 +1,9 @@ --- EntityCacheUtils --- Utils class only for cache of entities. -local EntityCacheUtils = {} +local EntityCacheUtils = {} -EntityCacheUtils.set = function(entityId, nuid, ownerGuid, ownerName, filepath, x, y, rotation, velX, velY, - currentHealth, maxHealth) +EntityCacheUtils.set = function(entityId, nuid, ownerGuid, ownerName, filepath, x, y, rotation, velX, velY, + currentHealth, maxHealth, fullySerialised, serialisedRootEntity) if Utils.IsEmpty(entityId) then error(("entityId must not be nil or empty!"):format(entityId), 2) end @@ -42,8 +42,7 @@ EntityCacheUtils.set = function(entityId, nuid, ownerGuid, ownerName, filepath, end EntityCache.set(entityId, nuid, ownerGuid, ownerName, filepath, x, y, rotation, - velX, velY, currentHealth, maxHealth) + velX, velY, currentHealth, maxHealth, fullySerialised, serialisedRootEntity) end return EntityCacheUtils - diff --git a/mods/noita-mp/files/scripts/util/EntitySerialisationUtils.lua b/mods/noita-mp/files/scripts/util/EntitySerialisationUtils.lua index 96928d9a7..89263f537 100644 --- a/mods/noita-mp/files/scripts/util/EntitySerialisationUtils.lua +++ b/mods/noita-mp/files/scripts/util/EntitySerialisationUtils.lua @@ -396,9 +396,12 @@ EntitySerialisationUtils.componentObjectMemberNames = { } ---- @param entityId number ---- @param nuid number|nil nuid can only be nil, when being Client -EntitySerialisationUtils.serializeEntireRootEntity = function(entityId, nuid) +--- @param entityId number entityId to be serialized. +--- @param nuid number|nil nuid can only be nil, when being Client. +--- @param startFrameTime number Time at the very beginning of the frame. +--- @return boolean|nil finished Indicates, if the serialization was finished. +--- @return SerialisedEntity|nil serialisedEntity The entire serialised entity. +EntitySerialisationUtils.serializeEntireRootEntity = function(entityId, nuid, startFrameTime) local cpc = CustomProfiler.start("EntitySerialisationUtils.serializeEntireRootEntity") if Utils.IsEmpty(entityId) then error(("Unable to serialize entity, because entityId is %s"):format(entityId), 2) @@ -407,7 +410,9 @@ EntitySerialisationUtils.serializeEntireRootEntity = function(entityId, nuid) error(("Unable to serialize entity, because nuid is '%s' and you're Server!"):format(nuid), 2) end if not EntityUtils.isEntityAlive(entityId) then - error("NOITA SUCKS!", 2) + -- skip, because entity already died. + CustomProfiler.stop("EntitySerialisationUtils.serializeEntireRootEntity", cpc) + return true, nil end local rootEntityId = EntityGetRootEntity(entityId) @@ -417,17 +422,24 @@ EntitySerialisationUtils.serializeEntireRootEntity = function(entityId, nuid) if rootEntityId ~= entityId then Logger.trace(Logger.channels.entity, ("Skipping serialisation of entity, because it isn't root. Root is %s!"):format(rootEntityId)) - return nil + CustomProfiler.stop("EntitySerialisationUtils.serializeEntireRootEntity", cpc) + return true, nil end - local finished = false - local root = { + --- @class SerialisedEntity + local root = { nuid = nuid, attributes = EntitySerialisationUtils.serializeEntityAttributes(rootEntityId), _tags = EntitySerialisationUtils.serializeEntityTags(rootEntityId), - components = EntitySerialisationUtils.serializeEntityComponents(rootEntityId), + components = {}, children = {} } + local finished, components = EntitySerialisationUtils.serializeEntityComponents(rootEntityId, startFrameTime) + root.components = components + if not finished then + CustomProfiler.stop("EntitySerialisationUtils.serializeEntireRootEntity", cpc) + return false, root + end local childrenEntityIds = EntityGetAllChildren(rootEntityId) or {} for i = 1, #childrenEntityIds do @@ -437,11 +449,19 @@ EntitySerialisationUtils.serializeEntireRootEntity = function(entityId, nuid) root.children[i] = {} root.children[i].attributes = EntitySerialisationUtils.serializeEntityAttributes(childEntityId) root.children[i]._tags = EntitySerialisationUtils.serializeEntityTags(childEntityId) - root.children[i].components = EntitySerialisationUtils.serializeEntityComponents(childEntityId) + root.children[i].components = {} + + local finished, components = EntitySerialisationUtils.serializeEntityComponents(childEntityId, startFrameTime) + root.children[i].components = components + if not finished then + CustomProfiler.stop("EntitySerialisationUtils.serializeEntireRootEntity", cpc) + return false, root + end end end finished = true + NoitaComponentUtils.setNetworkSpriteIndicatorStatus(entityId, "serialised") CustomProfiler.stop("EntitySerialisationUtils.serializeEntireRootEntity", cpc) return finished, root end @@ -452,7 +472,8 @@ EntitySerialisationUtils.serializeEntityAttributes = function(entityId) error(("Unable to serialize entity attributes, because entityId is %s"):format(entityId), 2) end if not EntityUtils.isEntityAlive(entityId) then - error("NOITA SUCKS!", 2) + -- skip, because entity already died. + return nil end local attributes = {} @@ -474,7 +495,8 @@ EntitySerialisationUtils.serializeEntityTags = function(entityId) error(("Unable to serialize entitys attributes, because entityId is %s"):format(entityId), 2) end if not EntityUtils.isEntityAlive(entityId) then - error("NOITA SUCKS!", 2) + -- skip, because entity already died. + return nil end local tags = EntityGetTags(entityId) if Utils.IsEmpty(tags) then @@ -485,19 +507,34 @@ EntitySerialisationUtils.serializeEntityTags = function(entityId) return tags end -EntitySerialisationUtils.serializeEntityComponents = function(entityId) +---comment +---@param entityId number +---@param startFrameTime number +---@return boolean finished Indicates, if the serialization was finished. +---@return serialisedComponents components The serialised components. +EntitySerialisationUtils.serializeEntityComponents = function(entityId, startFrameTime) local cpc = CustomProfiler.start("EntitySerialisationUtils.serializeEntityComponents") if Utils.IsEmpty(entityId) then error(("Unable to serialize entity's attributes, because entityId is %s"):format(entityId), 2) end if not EntityUtils.isEntityAlive(entityId) then - error("NOITA SUCKS!", 2) + -- skip, because entity already died. + return true, nil end local components = {} local componentIds = EntityGetAllComponents(entityId) - for i = 1, #componentIds do + local _i = 1 + if EntityCache.contains(entityId) then + local cachedEntity = EntityCache.get(entityId) + _i = #cachedEntity.serialisedRootEntity.components or 1 + for i = 1, #cachedEntity.serialisedRootEntity.components do + _i = i + end + end + + for i = _i, #componentIds do local componentId = componentIds[i] local componentType = ComponentGetTypeName(componentId) if not table.contains(EntitySerialisationUtils.ignore.byComponentsType, componentType) then @@ -509,7 +546,7 @@ EntitySerialisationUtils.serializeEntityComponents = function(entityId) local members = ComponentGetMembers(componentId) or {} for k, v in pairs(members) do if k == "impl_position" or k == "physics_explosion_power" or k == "delay" then - print("bla!") + --print("bla!") end -- skip unsupported data types if not table.contains(EntitySerialisationUtils.unsupportedDataTypes, k) @@ -520,7 +557,7 @@ EntitySerialisationUtils.serializeEntityComponents = function(entityId) local memberObject = ComponentObjectGetMembers(componentId, k) or {} for kObj, vObj in pairs(memberObject) do if vObj == "impl_position" or vObj == "physics_explosion_power" or vObj == "delay" then - print("bla!") + --print("bla!") end -- if member objects contains other member objects we cannot access them and need to skip those if not table.contains(EntitySerialisationUtils.componentObjectMemberNames, kObj) then @@ -538,7 +575,7 @@ EntitySerialisationUtils.serializeEntityComponents = function(entityId) local returnedValues = { ComponentGetValue2(componentId, k) } if #returnedValues > 1 then if k == "friend_firemage" then - print("bla!") + --print("bla!") end v = returnedValues else @@ -555,10 +592,16 @@ EntitySerialisationUtils.serializeEntityComponents = function(entityId) end end end + + local now = GameGetRealWorldTimeSinceStarted() + if startFrameTime - now >= EntityUtils.maxExecutionTime then + -- stop execution, when we are running out of time + return false, components + end end CustomProfiler.stop("EntitySerialisationUtils.serializeEntityComponents", cpc) - return components + return true, components end EntitySerialisationUtils.serializeComponentTags = function(componentId) @@ -602,7 +645,8 @@ EntitySerialisationUtils.deserializeEntireRootEntity = function(serializedRootEn end if not EntityUtils.isEntityAlive(entityId) then - error("NOITA SUCKS!", 2) + -- skip, because entity already died. + return nil end local finished = false @@ -619,7 +663,8 @@ EntitySerialisationUtils.deserializeEntityAttributes = function(entityId, serial error(("Unable to deserialize entity attributes, because entityId is %s"):format(entityId), 2) end if not EntityUtils.isEntityAlive(entityId) then - error("NOITA SUCKS!", 2) + -- skip, because entity already died. + return nil end EntitySetName(entityId, serializedRootEntity.attributes.name) @@ -641,7 +686,8 @@ EntitySerialisationUtils.deserializeEntityTags = function(entityId, serial error(("Unable to serialize entitys attributes, because entityId is %s"):format(entityId), 2) end if not EntityUtils.isEntityAlive(entityId) then - error("NOITA SUCKS!", 2) + -- skip, because entity already died. + return nil end local tags = string.split(serializedRootEntity.tags or "", ",") @@ -660,7 +706,8 @@ EntitySerialisationUtils.deserializeEntityComponents = function(entityId, serial error(("Unable to serialize entity's attributes, because entityId is %s"):format(entityId), 2) end if not EntityUtils.isEntityAlive(entityId) then - error("NOITA SUCKS!", 2) + -- skip, because entity already died. + return nil end local processedComponentIds = {} @@ -674,7 +721,7 @@ EntitySerialisationUtils.deserializeEntityComponents = function(entityId, serial table.removeByTable(allComponentsPerType, processedComponentIds) -- remove already processed components, otherwise next possible match will be used if componentType == "SpriteParticleEmitterComponent" and #allComponentsPerType > 1 then - print("ASFLDJNOSUIFDGHJOSDFJIUG") + --print("ASFLDJNOSUIFDGHJOSDFJIUG") end if not table.contains(EntitySerialisationUtils.ignore.byComponentsType, componentType) then --- some components shouldn't be enabled or even added in multiplayer? @@ -706,7 +753,7 @@ EntitySerialisationUtils.deserializeEntityComponents = function(entityId, serial EntitySerialisationUtils.gitHubIssues[componentType] = false local title = ("[Runtime]+Entity+deserialisation+failed+on+'%s'") :format(componentType) - local url = ("https://github.com/Ismoh/NoitaMP/issues/new?title=%s&labels=bug&projects=ismoh/1&milestone=synchronisation&template=component_missmatch_bug_report.md") + local url = ("https://github.com/Ismoh/NoitaMP/issues/new?labels=bug&projects=ismoh/1&milestone=synchronisation&template=component_missmatch_bug_report.yml&title=%s") :format(title) Utils.openUrl(url) EntitySerialisationUtils.gitHubIssues[componentType] = true -- Let's save some memory and just save a true/false value @@ -743,15 +790,15 @@ EntitySerialisationUtils.deserializeEntityComponents = function(entityId, serial else if table.contains(EntitySerialisationUtils.componentObjectMemberNames, k) then if k == "impl_position" or k == "physics_explosion_power" or k == "delay" then - print("bla!") + --print("bla!") end for kObj, vObj in pairs(v) do if vObj == "impl_position" or vObj == "physics_explosion_power" or vObj == "delay" then - print("bla!") + --print("bla!") end - print(("ComponentObjectSetValue2 componentType %s, k %s, v %s, kObj %s, vObj %s") - :format(componentType, k, Utils.pformat(v), kObj, vObj)) - ComponentObjectSetValue2(componentId, k, kObj, vObj) + -- print(("ComponentObjectSetValue2 componentType %s, k %s, v %s, kObj %s, vObj %s") + -- :format(componentType, k, Utils.pformat(v), kObj, vObj)) + -- ComponentObjectSetValue2(componentId, k, kObj, vObj) end elseif type(v) == "table" then -- if v is a table, we need to use the additional and optional parameters ComponentSetValue2(componentId, @@ -784,7 +831,8 @@ EntitySerialisationUtils.deserializeComponentTags = function(entityId, compon error(("Unable to deserialize components tags, because componentId is %s"):format(componentId), 2) end if not EntityUtils.isEntityAlive(entityId) then - error("NOITA SUCKS!", 2) + -- skip, because entity already died. + return nil end local tags = string.split(serialisedComponent._tags or "", ",") diff --git a/mods/noita-mp/files/scripts/util/EntityUtils.lua b/mods/noita-mp/files/scripts/util/EntityUtils.lua index 370e3c9fb..c402a5a24 100644 --- a/mods/noita-mp/files/scripts/util/EntityUtils.lua +++ b/mods/noita-mp/files/scripts/util/EntityUtils.lua @@ -73,7 +73,6 @@ end --- @see config.lua - if not EntityUtils then EntityUtils = {} end @@ -84,6 +83,12 @@ EntityUtils.aliveEntityIds = { -1 } --- Contains the highest alive entity id EntityUtils.previousHighestAliveEntityId = 1 +--- Time(Frames) between coroutines. +--- @see coroutines.lua#wake_up_waiting_threads +--- coroutines.lua: "this function should be called once per game logic update with the amount of time +--- that has passed since it was last called" +EntityUtils.timeFramesDelta = 1 + function getHighestAliveEntityId() local lastHighestEntityId = 0 if #EntityUtils.aliveEntityIds < EntityUtils.previousHighestAliveEntityId then @@ -127,6 +132,8 @@ OnEntityLoaded = function() end local spawnX, spawnY = EntityGetTransform(entityId) NetworkVscUtils.addOrUpdateAllVscs(entityId, MinaUtils.getLocalMinaName(), MinaUtils.getLocalMinaGuid(), nuid, spawnX, spawnY) + + NoitaComponentUtils.setNetworkSpriteIndicatorStatus(entityId, "processed") end else EntityUtils.aliveEntityIds[i] = nil -- get rid of pseudo entityId -1 @@ -142,9 +149,20 @@ OnEntityLoaded = function() CustomProfiler.stop("EntityUtils.OnEntityLoaded", cpc) end ---- Make sure this is onlt be executed once in OnWorldPOSTUpdate! -OnEntityRemoved = function() - +--- Make sure this is only be executed once! +OnEntityRemoved = function(entityId, nuid) + local cpc = CustomProfiler.start("OnEntityRemoved") + local _nuid, _entityId = GlobalsUtils.getNuidEntityPair(nuid) + if entityId ~= _entityId then + error(("EntityUtils.OnEntityRemoved: entityId %s ~= _entityId %s"):format(entityId, _entityId), 2) + end + if nuid ~= _nuid then + error(("EntityUtils.OnEntityRemoved: nuid %s ~= _nuid %s"):format(nuid, _nuid), 2) + end + EntityCache.delete(entityId) + --NetworkCacheUtils.delete + GlobalsUtils.setDeadNuid(nuid) + CustomProfiler.stop("OnEntityRemoved", cpc) end --- Special thanks to @Horscht: @@ -205,7 +223,7 @@ local function getParentsUntilRootEntity(who, entityId) Client.sendNeedNuid(ownerName, ownerGuid, entityId) -- TODO: return and wait for nuid? Otherwise child will never know who is the parent. else - error("Unable to get whoAmI()!", 2) + error("Unable to get whoAmI() unused!", 2) end end if type(parentNuid) == "number" then @@ -302,7 +320,10 @@ end --- processAndSyncEntityNetworking local prevEntityIndex = 1 -function EntityUtils.processAndSyncEntityNetworking() + +---comment +---@param startFrameTime number Time at the very beginning of the frame. +function EntityUtils.processAndSyncEntityNetworking(startFrameTime) local start = GameGetRealWorldTimeSinceStarted() * 1000 local cpc = CustomProfiler.start("EntityUtils.processAndSyncEntityNetworking") local who = whoAmI() @@ -482,7 +503,7 @@ function EntityUtils.processAndSyncEntityNetworking() -- local compOwnerName, compOwnerGuid, compNuid, filenameUnused, health, rotation, velocity, x, y = NoitaComponentUtils.getEntityData( entityId) - if cachedValue == nil then + if cachedValue == nil or cachedValue.fullySerialised == false then if who == Server.iAm then if not hasNuid then nuid = compNuid @@ -493,10 +514,19 @@ function EntityUtils.processAndSyncEntityNetworking() end --Server.sendNewNuid({ compOwnerName, compOwnerGuid }, entityId, nuid, x, y, rotation, velocity, -- filename, health, EntityUtils.isEntityPolymorphed(entityId)) - local finished, serializedEntity = EntitySerialisationUtils.serializeEntireRootEntity(entityId, nuid) - local ONLYFORTESTING = EntitySerialisationUtils.deserializeEntireRootEntity(serializedEntity) + local finished, serializedEntity = EntitySerialisationUtils.serializeEntireRootEntity(entityId, nuid, startFrameTime) + --local ONLYFORTESTING = EntitySerialisationUtils.deserializeEntireRootEntity(serializedEntity) if finished == true then Server.sendNewNuidSerialized(compOwnerName, compOwnerGuid, entityId, serializedEntity, nuid) + else + Logger.warn(Logger.channels.entity, + "EntitySerialisationUtils.serializeEntireRootEntity took too long. Breaking loop by returning entityId.") + -- when executionTime is too long, return the next entityCacheIndex to continue with it + --prevEntityIndex = entityIndex + 1 + EntityCacheUtils.set(entityId, nuid, compOwnerGuid, compOwnerName, filename, x, y, rotation, + velocity.x, velocity.y, health.current, health.max, finished, serializedEntity) + CustomProfiler.stop("EntityUtils.processAndSyncEntityNetworking", cpc) + return -- completely end function, because it took too long end end end @@ -545,7 +575,7 @@ function EntityUtils.processAndSyncEntityNetworking() end --end EntityCacheUtils.set(entityId, nuid, compOwnerGuid, compOwnerName, filename, x, y, rotation, - velocity.x, velocity.y, health.current, health.max) + velocity.x, velocity.y, health.current, health.max, true, nil) if changed then NetworkUtils.getClientOrServer().sendEntityData(entityId) end diff --git a/mods/noita-mp/files/scripts/util/FileUtils.lua b/mods/noita-mp/files/scripts/util/FileUtils.lua index ad09fdb3e..e88e03a5f 100644 --- a/mods/noita-mp/files/scripts/util/FileUtils.lua +++ b/mods/noita-mp/files/scripts/util/FileUtils.lua @@ -187,8 +187,8 @@ function FileUtils.GetAbsoluteDirectoryPathOfSave06() end --- Returns the ABSOLUTE path of the mods folder. ---- If fu.GetAbsolutePathOfNoitaRootDirectory() is not set yet, then it will be ---- @return string fu.GetAbsolutePathOfNoitaRootDirectory() .. "/mods/noita-mp" +--- If FileUtils.GetAbsolutePathOfNoitaRootDirectory() is not set yet, then it will be +--- @return string FileUtils.GetAbsolutePathOfNoitaRootDirectory() .. "/mods/noita-mp" function FileUtils.GetAbsoluteDirectoryPathOfNoitaMP() if not FileUtils.GetAbsolutePathOfNoitaRootDirectory() then FileUtils.SetAbsolutePathOfNoitaRootDirectory() @@ -215,8 +215,8 @@ function FileUtils.GetRelativeDirectoryPathOfRequiredLibs() end --- Returns the ABSOLUTE path of the library folder required for this mod. ---- If fu.GetAbsolutePathOfNoitaRootDirectory() is not set yet, then it will be ---- @return string fu.GetAbsolutePathOfNoitaRootDirectory() .. "/mods/noita-mp/files/libs" +--- If FileUtils.GetAbsolutePathOfNoitaRootDirectory() is not set yet, then it will be +--- @return string FileUtils.GetAbsolutePathOfNoitaRootDirectory() .. "/mods/noita-mp/files/libs" function FileUtils.GetAbsoluteDirectoryPathOfRequiredLibs() if not FileUtils.GetAbsolutePathOfNoitaRootDirectory() then FileUtils.SetAbsolutePathOfNoitaRootDirectory() diff --git a/mods/noita-mp/files/scripts/util/NetworkVscUtils.lua b/mods/noita-mp/files/scripts/util/NetworkVscUtils.lua index 977c5c105..3489ea746 100644 --- a/mods/noita-mp/files/scripts/util/NetworkVscUtils.lua +++ b/mods/noita-mp/files/scripts/util/NetworkVscUtils.lua @@ -15,7 +15,7 @@ local idcounter = 0 --- @param fieldNameForValue string "name", "script_source_file", "etc" --- @return number|false? compId The specific componentId, which contains the searched value or false if there isn't any Component --- @return string? value The components value -local function checkIfSpecificVscExists(entityId, componentTypeName, fieldNameForMatch, matchValue, fieldNameForValue) +function NetworkVscUtils.checkIfSpecificVscExists(entityId, componentTypeName, fieldNameForMatch, matchValue, fieldNameForValue) local cpc = CustomProfiler.start("NetworkVscUtils.checkIfSpecificVscExists") if not EntityUtils.isEntityAlive(entityId) then CustomProfiler.stop("NetworkVscUtils.checkIfSpecificVscExists", cpc) @@ -63,7 +63,7 @@ local function addOrUpdateVscForOwnerName(entityId, ownerName) ownerName = tostring(ownerName) end - local compId, compOwnerName = checkIfSpecificVscExists( + local compId, compOwnerName = NetworkVscUtils.checkIfSpecificVscExists( entityId, NetworkVscUtils.variableStorageComponentName, NetworkVscUtils.name, NetworkVscUtils.componentNameOfOwnersName, NetworkVscUtils.valueString) if compId then @@ -105,7 +105,7 @@ local function addOrUpdateVscForOwnerGuid(entityId, ownerGuid) ownerGuid = tostring(ownerGuid) end - local compId, compOwnerGuid = checkIfSpecificVscExists( + local compId, compOwnerGuid = NetworkVscUtils.checkIfSpecificVscExists( entityId, NetworkVscUtils.variableStorageComponentName, NetworkVscUtils.name, NetworkVscUtils.componentNameOfOwnersGuid, NetworkVscUtils.valueString) if compId then @@ -146,7 +146,7 @@ local function addOrUpdateVscForNuid(entityId, nuid) error(("Unable to update VSC on entity (%s), when nuid is '%s'"):format(entityId, nuid), 2) end - local compId, compNuid = checkIfSpecificVscExists( + local compId, compNuid = NetworkVscUtils.checkIfSpecificVscExists( entityId, NetworkVscUtils.variableStorageComponentName, NetworkVscUtils.name, NetworkVscUtils.componentNameOfNuid, "value_int") if compNuid == 0 or compNuid == -1 then @@ -205,7 +205,7 @@ local function addOrUpdateVscForSpawnX(entityId, spawnX) end - local compIdX, compSpawnX = checkIfSpecificVscExists( + local compIdX, compSpawnX = NetworkVscUtils.checkIfSpecificVscExists( entityId, NetworkVscUtils.variableStorageComponentName, NetworkVscUtils.name, NetworkVscUtils.componentNameOfSpawnX, "value_float") @@ -255,7 +255,7 @@ local function addOrUpdateVscForSpawnY(entityId, spawnY) end - local compIdY, compSpawnY = checkIfSpecificVscExists( + local compIdY, compSpawnY = NetworkVscUtils.checkIfSpecificVscExists( entityId, NetworkVscUtils.variableStorageComponentName, NetworkVscUtils.name, NetworkVscUtils.componentNameOfSpawnY, "value_float") @@ -303,7 +303,7 @@ local function addNuidDebugger(entityId) CustomProfiler.stop("NetworkVscUtils.addNuidDebugger", cpc) return end - local compId, compOwnerName = checkIfSpecificVscExists( + local compId, compOwnerName = NetworkVscUtils.checkIfSpecificVscExists( entityId, "LuaComponent", "script_source_file", NetworkVscUtils.componentNameOfNuidDebugger, "script_source_file") if compId then @@ -338,7 +338,7 @@ local function addNuidUpdater(entityId) CustomProfiler.stop("NetworkVscUtils.addNuidUpdater", cpc) return end - local compId, compOwnerName = checkIfSpecificVscExists( + local compId, compOwnerName = NetworkVscUtils.checkIfSpecificVscExists( entityId, "LuaComponent", "script_source_file", NetworkVscUtils.componentNameOfNuidUpdater, "script_source_file") if compId then @@ -373,19 +373,19 @@ local function getNetworkComponents(entityId) CustomProfiler.stop("NetworkVscUtils.getNetworkComponents", cpc) return end - local ownerNameCompId = checkIfSpecificVscExists( + local ownerNameCompId = NetworkVscUtils.checkIfSpecificVscExists( entityId, NetworkVscUtils.variableStorageComponentName, NetworkVscUtils.name, NetworkVscUtils.componentNameOfOwnersName, NetworkVscUtils.valueString) - local ownerGuidCompId = checkIfSpecificVscExists( + local ownerGuidCompId = NetworkVscUtils.checkIfSpecificVscExists( entityId, NetworkVscUtils.variableStorageComponentName, NetworkVscUtils.name, NetworkVscUtils.componentNameOfOwnersGuid, NetworkVscUtils.valueString) - local nuidCompId = checkIfSpecificVscExists( + local nuidCompId = NetworkVscUtils.checkIfSpecificVscExists( entityId, NetworkVscUtils.variableStorageComponentName, NetworkVscUtils.name, NetworkVscUtils.componentNameOfNuid, NetworkVscUtils.valueString) - local componentIdForNuidDebugger, scriptFileName = checkIfSpecificVscExists( + local componentIdForNuidDebugger, scriptFileName = NetworkVscUtils.checkIfSpecificVscExists( entityId, "LuaComponent", "script_source_file", NetworkVscUtils.componentNameOfNuidDebugger, "script_source_file") - local componentIdForNuidUpdater, scriptFileName = checkIfSpecificVscExists( + local componentIdForNuidUpdater, scriptFileName = NetworkVscUtils.checkIfSpecificVscExists( entityId, "LuaComponent", "script_source_file", NetworkVscUtils.componentNameOfNuidUpdater, "script_source_file") @@ -516,7 +516,7 @@ function NetworkVscUtils.isNetworkEntityByNuidVsc(entityId) CustomProfiler.stop("NetworkVscUtils.isNetworkEntityByNuidVsc", cpc) return false, -1, -1 end - local componentId, value = checkIfSpecificVscExists( + local componentId, value = NetworkVscUtils.checkIfSpecificVscExists( entityId, NetworkVscUtils.variableStorageComponentName, NetworkVscUtils.name, NetworkVscUtils.componentNameOfNuid, "value_int") if Utils.IsEmpty(componentId) or Utils.IsEmpty(value) then @@ -542,7 +542,7 @@ end --- @return number nuid Returns 'true, nuid', if set. function NetworkVscUtils.hasNuidSet(entityId) local cpc = CustomProfiler.start("NetworkVscUtils.hasNuidSet") - local nuidCompId, nuid = checkIfSpecificVscExists(entityId, NetworkVscUtils.variableStorageComponentName, + local nuidCompId, nuid = NetworkVscUtils.checkIfSpecificVscExists(entityId, NetworkVscUtils.variableStorageComponentName, NetworkVscUtils.name, NetworkVscUtils.componentNameOfNuid, "value_int") @@ -566,10 +566,10 @@ function NetworkVscUtils.hasNetworkLuaComponents(entityId) return end local has = false - local nuid_debugger, value = checkIfSpecificVscExists( + local nuid_debugger, value = NetworkVscUtils.checkIfSpecificVscExists( entityId, "LuaComponent", "script_source_file", NetworkVscUtils.componentNameOfNuidDebugger, "script_source_file") - local nuid_updater, value = checkIfSpecificVscExists( + local nuid_updater, value = NetworkVscUtils.checkIfSpecificVscExists( entityId, "LuaComponent", "script_source_file", NetworkVscUtils.componentNameOfNuidUpdater, "script_source_file") @@ -580,6 +580,8 @@ function NetworkVscUtils.hasNetworkLuaComponents(entityId) return has end + + --#endregion -- Because of stack overflow errors when loading lua files, diff --git a/mods/noita-mp/files/scripts/util/NoitaComponentUtils.lua b/mods/noita-mp/files/scripts/util/NoitaComponentUtils.lua index e0f37aa47..eae557d82 100644 --- a/mods/noita-mp/files/scripts/util/NoitaComponentUtils.lua +++ b/mods/noita-mp/files/scripts/util/NoitaComponentUtils.lua @@ -79,6 +79,59 @@ function NoitaComponentUtils.getEntityDataByNuid(nuid) return NoitaComponentUtils.getEntityData(entityId) end +---Adds a SpriteComponent to indicate network status visually. +---@param entityId number +---@return number|nil compId +function NoitaComponentUtils.addOrGetNetworkSpriteStatusIndicator(entityId) + local cpc = CustomProfiler.start("NoitaComponentUtils.addNetworkSpriteStatusIndicator") + if not EntityUtils.isEntityAlive(entityId) then + CustomProfiler.stop("NoitaComponentUtils.addNetworkSpriteStatusIndicator", cpc) + return nil + end + local compId, compOwnerName = NetworkVscUtils.checkIfSpecificVscExists( + entityId, "SpriteComponent", "image_file", + "network_indicator.png", "image_file") + if compId then + Logger.debug(Logger.channels.vsc, ("Entity(%s) already has a network indicator."):format(entityId)) + CustomProfiler.stop("NoitaComponentUtils.addNetworkSpriteStatusIndicator", cpc) + return compId + else + compId = EntityAddComponent2(entityId, "SpriteComponent", { + image_file = "mods/noita-mp/files/data/debug/network_indicator_off.png", + offset_x = 0, + offset_y = 0, + alpha = 1, + visible = true, + z_index = 0.6, + update_transform = true, + special_scale_x = 1, + special_scale_y = 1 + }) + --ComponentAddTag(compId, "enabled_in_hand") + --ComponentAddTag(compId, "enabled_in_world") + Logger.debug(Logger.channels.vsc, + ("%s(%s) added with noita componentId = %s to entityId = %s!") + :format("SpriteComponent", "network_indicator.png", compId, entityId)) + CustomProfiler.stop("NoitaComponentUtils.addNetworkSpriteStatusIndicator", cpc) + return compId + end + + error("Unable to add network indicator!", 2) + CustomProfiler.stop("NoitaComponentUtils.addNetworkSpriteStatusIndicator", cpc) + return nil +end + +---Sets the SpriteComponent to a specific status by setting image_file. +---@param entityId number +---@param status string off, processed, serialised, sent, acked +function NoitaComponentUtils.setNetworkSpriteIndicatorStatus(entityId, status) + local componentId = NoitaComponentUtils.addOrGetNetworkSpriteStatusIndicator(entityId) + if not Utils.IsEmpty(componentId) then + ComponentSetValue2(componentId, "image_file", + ("mods/noita-mp/files/data/debug/network_indicator_%s.png"):format(status)) + end +end + -- Because of stack overflow errors when loading lua files, -- I decided to put Utils 'classes' into globals _G.NoitaComponentUtils = NoitaComponentUtils diff --git a/mods/noita-mp/files/scripts/util/NuidUtils.lua b/mods/noita-mp/files/scripts/util/NuidUtils.lua index 26e68e09b..d6b384185 100644 --- a/mods/noita-mp/files/scripts/util/NuidUtils.lua +++ b/mods/noita-mp/files/scripts/util/NuidUtils.lua @@ -5,7 +5,6 @@ --- 'Imports' -local fu = require("FileUtils") local nxml = require("nxml") --- NuidUtils: @@ -23,8 +22,8 @@ local function getNextNuid() -- Are there any nuids saved in globals, if so get the highest nuid? if not xmlParsed then - local worldStateXmlAbsPath = fu.GetAbsDirPathOfWorldStateXml(_G.saveSlotMeta.dir) - if fu.Exists(worldStateXmlAbsPath) then + local worldStateXmlAbsPath = FileUtils.GetAbsDirPathOfWorldStateXml(_G.saveSlotMeta.dir) + if FileUtils.Exists(worldStateXmlAbsPath) then local f = io.open(worldStateXmlAbsPath, "r") local xml = nxml.parse(f:read("*a")) f:close() @@ -59,8 +58,8 @@ end function NuidUtils.getEntityIdsByKillIndicator() local cpc = CustomProfiler.start("NuidUtils.getEntityIdsByKillIndicator") local deadNuids = GlobalsUtils.getDeadNuids() - local worldStateXmlAbsPath = fu.GetAbsDirPathOfWorldStateXml(_G.saveSlotMeta.dir) - if fu.Exists(worldStateXmlAbsPath) then + local worldStateXmlAbsPath = FileUtils.GetAbsDirPathOfWorldStateXml(_G.saveSlotMeta.dir) + if FileUtils.Exists(worldStateXmlAbsPath) then local f = io.open(worldStateXmlAbsPath, "r") local xml = nxml.parse(f:read("*a")) f:close() diff --git a/mods/noita-mp/init.lua b/mods/noita-mp/init.lua index a857dadfa..faaaec403 100644 --- a/mods/noita-mp/init.lua +++ b/mods/noita-mp/init.lua @@ -106,14 +106,16 @@ function OnPlayerSpawned(player_entity) end function OnPausePreUpdate() + local startFrameTime = GameGetRealWorldTimeSinceStarted() local cpc = CustomProfiler.start("init.OnPausePreUpdate") - Server.update() - Client.update() + Server.update(startFrameTime) + Client.update(startFrameTime) CustomProfiler.stop("init.OnPausePreUpdate", cpc) end --- PreUpdate of world function OnWorldPreUpdate() + local startFrameTime = GameGetRealWorldTimeSinceStarted() local cpc = CustomProfiler.start("init.OnWorldPreUpdate") OnEntityLoaded() @@ -152,8 +154,8 @@ function OnWorldPreUpdate() end end - Server.update() - Client.update() + Server.update(startFrameTime) + Client.update(startFrameTime) ui.update() local cpc1 = CustomProfiler.start("init.OnWorldPreUpdate.collectgarbage.count") @@ -173,6 +175,12 @@ end function OnWorldPostUpdate() local cpc = CustomProfiler.start("init.OnWorldPostUpdate") - OnEntityRemoved() + + if EntityCache.size() >= 500 then + -- TODO: add distance check to minas + --for i = 1, #EntityCache.cache do + EntityCache.delete(EntityCache.cache[1]) + --end + end CustomProfiler.stop("init.OnWorldPostUpdate", cpc) end diff --git a/mods/noita-mp/lua_modules/lib/lua/5.1/lua-utf8.dll b/mods/noita-mp/lua_modules/lib/lua/5.1/lua-utf8.dll new file mode 100644 index 000000000..35decfc61 Binary files /dev/null and b/mods/noita-mp/lua_modules/lib/lua/5.1/lua-utf8.dll differ diff --git a/mods/noita-mp/lua_modules/share/lua/5.1/base64.lua b/mods/noita-mp/lua_modules/share/lua/5.1/base64.lua new file mode 100644 index 000000000..32de33280 --- /dev/null +++ b/mods/noita-mp/lua_modules/share/lua/5.1/base64.lua @@ -0,0 +1,201 @@ +--[[ + + base64 -- v1.5.3 public domain Lua base64 encoder/decoder + no warranty implied; use at your own risk + + Needs bit32.extract function. If not present it's implemented using BitOp + or Lua 5.3 native bit operators. For Lua 5.1 fallbacks to pure Lua + implementation inspired by Rici Lake's post: + http://ricilake.blogspot.co.uk/2007/10/iterating-bits-in-lua.html + + author: Ilya Kolbin (iskolbin@gmail.com) + url: github.com/iskolbin/lbase64 + + COMPATIBILITY + + Lua 5.1+, LuaJIT + + LICENSE + + See end of file for license information. + +--]] + + +local base64 = {} + +local extract = _G.bit32 and _G.bit32.extract -- Lua 5.2/Lua 5.3 in compatibility mode +if not extract then + if _G.bit then -- LuaJIT + local shl, shr, band = _G.bit.lshift, _G.bit.rshift, _G.bit.band + extract = function( v, from, width ) + return band( shr( v, from ), shl( 1, width ) - 1 ) + end + elseif _G._VERSION == "Lua 5.1" then + extract = function( v, from, width ) + local w = 0 + local flag = 2^from + for i = 0, width-1 do + local flag2 = flag + flag + if v % flag2 >= flag then + w = w + 2^i + end + flag = flag2 + end + return w + end + else -- Lua 5.3+ + extract = load[[return function( v, from, width ) + return ( v >> from ) & ((1 << width) - 1) + end]]() + end +end + + +function base64.makeencoder( s62, s63, spad ) + local encoder = {} + for b64code, char in pairs{[0]='A','B','C','D','E','F','G','H','I','J', + 'K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y', + 'Z','a','b','c','d','e','f','g','h','i','j','k','l','m','n', + 'o','p','q','r','s','t','u','v','w','x','y','z','0','1','2', + '3','4','5','6','7','8','9',s62 or '+',s63 or'/',spad or'='} do + encoder[b64code] = char:byte() + end + return encoder +end + +function base64.makedecoder( s62, s63, spad ) + local decoder = {} + for b64code, charcode in pairs( base64.makeencoder( s62, s63, spad )) do + decoder[charcode] = b64code + end + return decoder +end + +local DEFAULT_ENCODER = base64.makeencoder() +local DEFAULT_DECODER = base64.makedecoder() + +local char, concat = string.char, table.concat + +function base64.encode( str, encoder, usecaching ) + encoder = encoder or DEFAULT_ENCODER + local t, k, n = {}, 1, #str + local lastn = n % 3 + local cache = {} + for i = 1, n-lastn, 3 do + local a, b, c = str:byte( i, i+2 ) + local v = a*0x10000 + b*0x100 + c + local s + if usecaching then + s = cache[v] + if not s then + s = char(encoder[extract(v,18,6)], encoder[extract(v,12,6)], encoder[extract(v,6,6)], encoder[extract(v,0,6)]) + cache[v] = s + end + else + s = char(encoder[extract(v,18,6)], encoder[extract(v,12,6)], encoder[extract(v,6,6)], encoder[extract(v,0,6)]) + end + t[k] = s + k = k + 1 + end + if lastn == 2 then + local a, b = str:byte( n-1, n ) + local v = a*0x10000 + b*0x100 + t[k] = char(encoder[extract(v,18,6)], encoder[extract(v,12,6)], encoder[extract(v,6,6)], encoder[64]) + elseif lastn == 1 then + local v = str:byte( n )*0x10000 + t[k] = char(encoder[extract(v,18,6)], encoder[extract(v,12,6)], encoder[64], encoder[64]) + end + return concat( t ) +end + +function base64.decode( b64, decoder, usecaching ) + decoder = decoder or DEFAULT_DECODER + local pattern = '[^%w%+%/%=]' + if decoder then + local s62, s63 + for charcode, b64code in pairs( decoder ) do + if b64code == 62 then s62 = charcode + elseif b64code == 63 then s63 = charcode + end + end + pattern = ('[^%%w%%%s%%%s%%=]'):format( char(s62), char(s63) ) + end + b64 = b64:gsub( pattern, '' ) + local cache = usecaching and {} + local t, k = {}, 1 + local n = #b64 + local padding = b64:sub(-2) == '==' and 2 or b64:sub(-1) == '=' and 1 or 0 + for i = 1, padding > 0 and n-4 or n, 4 do + local a, b, c, d = b64:byte( i, i+3 ) + local s + if usecaching then + local v0 = a*0x1000000 + b*0x10000 + c*0x100 + d + s = cache[v0] + if not s then + local v = decoder[a]*0x40000 + decoder[b]*0x1000 + decoder[c]*0x40 + decoder[d] + s = char( extract(v,16,8), extract(v,8,8), extract(v,0,8)) + cache[v0] = s + end + else + local v = decoder[a]*0x40000 + decoder[b]*0x1000 + decoder[c]*0x40 + decoder[d] + s = char( extract(v,16,8), extract(v,8,8), extract(v,0,8)) + end + t[k] = s + k = k + 1 + end + if padding == 1 then + local a, b, c = b64:byte( n-3, n-1 ) + local v = decoder[a]*0x40000 + decoder[b]*0x1000 + decoder[c]*0x40 + t[k] = char( extract(v,16,8), extract(v,8,8)) + elseif padding == 2 then + local a, b = b64:byte( n-3, n-2 ) + local v = decoder[a]*0x40000 + decoder[b]*0x1000 + t[k] = char( extract(v,16,8)) + end + return concat( t ) +end + +return base64 + +--[[ +------------------------------------------------------------------------------ +This software is available under 2 licenses -- choose whichever you prefer. +------------------------------------------------------------------------------ +ALTERNATIVE A - MIT License +Copyright (c) 2018 Ilya Kolbin +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. +------------------------------------------------------------------------------ +ALTERNATIVE B - Public Domain (www.unlicense.org) +This is free and unencumbered software released into the public domain. +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, +commercial or non-commercial, and by any means. +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to +this software under copyright law. +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 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. +------------------------------------------------------------------------------ +--]] diff --git a/mods/noita-mp/lua_modules/share/lua/5.1/profiler.lua b/mods/noita-mp/lua_modules/share/lua/5.1/profiler.lua index 445f485b5..dd424c666 100644 --- a/mods/noita-mp/lua_modules/share/lua/5.1/profiler.lua +++ b/mods/noita-mp/lua_modules/share/lua/5.1/profiler.lua @@ -77,8 +77,6 @@ new table using the matched key names: `profiler.configuration(overrides) ]] -local fu = require("FileUtils") - --[[ Configuration ]]-- local config = { diff --git a/mods/noita-mp/lua_modules/share/lua/5.1/sock.lua b/mods/noita-mp/lua_modules/share/lua/5.1/sock.lua index bee829b92..d8c581c64 100644 --- a/mods/noita-mp/lua_modules/share/lua/5.1/sock.lua +++ b/mods/noita-mp/lua_modules/share/lua/5.1/sock.lua @@ -33,8 +33,6 @@ local sock = { } local enet = require("enet") -local Utils = require("Utils") -local fu = require("FileUtils") _G.Logger.info(_G.Logger.channels.initialize, "lua-enet version = master branch 21.10.2015") _G.Logger.info(_G.Logger.channels.initialize, "enet version = " .. enet.linked_version()) -- 1.3.17 @@ -264,8 +262,8 @@ function Server:start(ip, port) if not self.host then --error("Failed to create the host. Is there another server running on :" .. self.port .. "?") self:log("", { "Failed to create the host. Is there another server running on :" .. self.port .. "?" }) - local pid = fu.GetPidOfRunningEnetHostByPort() - fu.KillProcess(pid) + local pid = FileUtils.GetPidOfRunningEnetHostByPort() + FileUtils.KillProcess(pid) return false end diff --git a/mods/noita-mp/lua_modules/share/lua/5.1/zstd.lua b/mods/noita-mp/lua_modules/share/lua/5.1/zstd.lua index 5594c34cf..963af9d57 100644 --- a/mods/noita-mp/lua_modules/share/lua/5.1/zstd.lua +++ b/mods/noita-mp/lua_modules/share/lua/5.1/zstd.lua @@ -88,8 +88,7 @@ local arr_utint8_t = ffi_typeof "uint8_t[?]" local ptr_zstd_inbuffer_t = ffi_typeof "ZSTD_inBuffer[1]" local ptr_zstd_outbuffer_t = ffi_typeof "ZSTD_outBuffer[1]" -local fu = require("FileUtils") -local zstd = ffi_load(fu.GetAbsolutePathOfNoitaRootDirectory() .. "\\mods\\noita-mp\\lua_modules\\lib\\lua\\5.1\\libzstd") +local zstd = ffi_load(FileUtils.GetAbsolutePathOfNoitaRootDirectory() .. "\\mods\\noita-mp\\lua_modules\\lib\\lua\\5.1\\libzstd") local file = assert(io.popen("zstd -vV", "r")) local zstdVersion = file:read("*a") print("zstd version = " .. zstdVersion) diff --git a/mods/noita-mp/tests/files/scripts/NoitaMpSettings_test.lua b/mods/noita-mp/tests/files/scripts/NoitaMpSettings_test.lua index 264f047d4..90f260508 100644 --- a/mods/noita-mp/tests/files/scripts/NoitaMpSettings_test.lua +++ b/mods/noita-mp/tests/files/scripts/NoitaMpSettings_test.lua @@ -1,5 +1,3 @@ -local fu = require("FileUtils") - TestNoitaMpSettings = {} function TestNoitaMpSettings:setUp() @@ -10,7 +8,7 @@ end function TestNoitaMpSettings:testClearAndCreateSettings() NoitaMpSettings.clearAndCreateSettings() - local files = fu.GetAllFilesInDirectory(fu.GetAbsolutePathOfNoitaMpSettingsDirectory(), "json") + local files = FileUtils.GetAllFilesInDirectory(FileUtils.GetAbsolutePathOfNoitaMpSettingsDirectory(), "json") lu.assertEquals(files, {}, "Settings directory wasn't empty!") end diff --git a/mods/noita-mp/tests/files/scripts/util/FileUtils_test.lua b/mods/noita-mp/tests/files/scripts/util/FileUtils_test.lua index 714152a1d..419c3470c 100644 --- a/mods/noita-mp/tests/files/scripts/util/FileUtils_test.lua +++ b/mods/noita-mp/tests/files/scripts/util/FileUtils_test.lua @@ -1,5 +1,4 @@ local os_name = require("os_name") -local fu = require("FileUtils") TestFileUtil = {} function TestFileUtil:setUp() @@ -8,8 +7,8 @@ function TestFileUtil:setUp() return false end - if not fu.GetAbsolutePathOfNoitaRootDirectory() then - fu.SetAbsolutePathOfNoitaRootDirectory() + if not FileUtils.GetAbsolutePathOfNoitaRootDirectory() then + FileUtils.SetAbsolutePathOfNoitaRootDirectory() end end @@ -44,7 +43,7 @@ function TestFileUtil:testReplacePathSeparatorOnWindows() _G.pathSeparator = "\\" -- TODO: is there a better way to mock? local path_unix = "/test/path/123" - local path_windows = fu.ReplacePathSeparator(path_unix) + local path_windows = FileUtils.ReplacePathSeparator(path_unix) lu.assertNotEquals(path_unix, path_windows) lu.assertEquals([[\test\path\123]], path_windows) @@ -64,7 +63,7 @@ function TestFileUtil:testReplacePathSeparatorOnUnix() _G.pathSeparator = "/" -- TODO: is there a better way to mock? local path_windows = "\\test\\path\\123" - local path_unix = fu.ReplacePathSeparator(path_windows) + local path_unix = FileUtils.ReplacePathSeparator(path_windows) lu.assertNotEquals(path_windows, path_unix) lu.assertEquals("/test/path/123", path_unix) @@ -76,7 +75,7 @@ end function TestFileUtil:testRemoveTrailingPathSeparator() local path = tostring(_G.pathSeparator .. "persistent" .. _G.pathSeparator .. "flags" .. _G.pathSeparator) - local result = fu.RemoveTrailingPathSeparator(path) + local result = FileUtils.RemoveTrailingPathSeparator(path) lu.assertNotEquals(path, result) lu.assertEquals(_G.pathSeparator .. "persistent" .. _G.pathSeparator .. "flags", result) @@ -87,10 +86,10 @@ end ---------------------------------------------------------------------------------------------------- function TestFileUtil:testSetAbsolutePathOfNoitaRootDirectory() - fu.SetAbsolutePathOfNoitaRootDirectory() - lu.assertNotIsNil(fu.GetAbsolutePathOfNoitaRootDirectory(), - "fu.GetAbsolutePathOfNoitaRootDirectory() must not be nil!") - lu.assertNotStrContains(fu.GetAbsolutePathOfNoitaRootDirectory(), "\\mods\\noita-mp") + FileUtils.SetAbsolutePathOfNoitaRootDirectory() + lu.assertNotIsNil(FileUtils.GetAbsolutePathOfNoitaRootDirectory(), + "FileUtils.GetAbsolutePathOfNoitaRootDirectory() must not be nil!") + lu.assertNotStrContains(FileUtils.GetAbsolutePathOfNoitaRootDirectory(), "\\mods\\noita-mp") end function TestFileUtil:testSetAbsolutePathOfNoitaRootDirectoryUnknownOs() @@ -100,7 +99,7 @@ function TestFileUtil:testSetAbsolutePathOfNoitaRootDirectoryUnknownOs() _G.is_windows = false -- TODO: is there a better way to mock? _G.is_linux = false -- TODO: is there a better way to mock? - lu.assertErrorMsgContains("FileUtils.lua | Unable to detect OS", fu.SetAbsolutePathOfNoitaRootDirectory, + lu.assertErrorMsgContains("FileUtils.lua | Unable to detect OS", FileUtils.SetAbsolutePathOfNoitaRootDirectory, "path doesnt matter") _G.is_windows = old_is_windows @@ -109,8 +108,8 @@ end function TestFileUtil:testGetAbsolutePathOfNoitaRootDirectory() Logger.trace(Logger.channels.testing, - ("Need to verify absolute path of root noita: %s"):format(fu.GetAbsolutePathOfNoitaRootDirectory())) - lu.assertStrContains(fu.GetAbsolutePathOfNoitaRootDirectory(), + ("Need to verify absolute path of root noita: %s"):format(FileUtils.GetAbsolutePathOfNoitaRootDirectory())) + lu.assertStrContains(FileUtils.GetAbsolutePathOfNoitaRootDirectory(), _G.pathSeparator) -- TODO: Need a better test for this! end @@ -137,7 +136,7 @@ end local newfile_command_result = assert(io.popen(newfile_command, "r"), "Unable to execute command: " .. newfile_command) print(newfile_command_result:read("*a")) - local table, index = fu.GetRelativeDirectoryAndFilesOfSave06() + local table, index = FileUtils.GetRelativeDirectoryAndFilesOfSave06() print(table[1]) lu.assertEquals(table[1].dir_name, nil, "Returned relativ path doesn't match.") @@ -163,34 +162,34 @@ function TestFileUtil:testGetAbsoluteDirectoryPathOfParentSave() print(mkdir_command_result:read("*a")) -- Mock end - local path = fu.GetAbsoluteDirectoryPathOfParentSave() + local path = FileUtils.GetAbsoluteDirectoryPathOfParentSave() print(path) lu.assertNotNil(path) lu.assertStrContains(path, "Noita", "", "Parent directory of save06 does not contain Noita!") end function TestFileUtil:testGetAbsoluteDirectoryPathOfSave06() - --lu.assertError(fu.GetAbsoluteDirectoryPathOfSave06) - --lu.assertErrorMsgContains("", fu.GetAbsoluteDirectoryPathOfSave06) + --lu.assertError(FileUtils.GetAbsoluteDirectoryPathOfSave06) + --lu.assertErrorMsgContains("", FileUtils.GetAbsoluteDirectoryPathOfSave06) end function TestFileUtil:testGetAbsoluteDirectoryPathOfNoitaMP() - local actual_path = fu.GetAbsoluteDirectoryPathOfNoitaMP() - local expected = fu.ReplacePathSeparator(fu.GetAbsolutePathOfNoitaRootDirectory() .. "/mods/noita-mp") + local actual_path = FileUtils.GetAbsoluteDirectoryPathOfNoitaMP() + local expected = FileUtils.ReplacePathSeparator(FileUtils.GetAbsolutePathOfNoitaRootDirectory() .. "/mods/noita-mp") lu.assertEquals(actual_path, expected) end function TestFileUtil:testGetRelativeDirectoryPathOfNoitaMP() - lu.assertEquals(fu.GetRelativeDirectoryPathOfNoitaMP(), fu.ReplacePathSeparator("mods/noita-mp")) + lu.assertEquals(FileUtils.GetRelativeDirectoryPathOfNoitaMP(), FileUtils.ReplacePathSeparator("mods/noita-mp")) end function TestFileUtil:testGetRelativeDirectoryPathOfRequiredLibs() - lu.assertEquals(fu.GetRelativeDirectoryPathOfRequiredLibs(), fu.ReplacePathSeparator("mods/noita-mp/files/libs")) + lu.assertEquals(FileUtils.GetRelativeDirectoryPathOfRequiredLibs(), FileUtils.ReplacePathSeparator("mods/noita-mp/files/libs")) end function TestFileUtil:testGetAbsoluteDirectoryPathOfRequiredLibs() - local actual_path = fu.GetAbsoluteDirectoryPathOfRequiredLibs() - local expected = fu.ReplacePathSeparator(fu.GetAbsolutePathOfNoitaRootDirectory() .. "/mods/noita-mp/files/libs") + local actual_path = FileUtils.GetAbsoluteDirectoryPathOfRequiredLibs() + local expected = FileUtils.ReplacePathSeparator(FileUtils.GetAbsolutePathOfNoitaRootDirectory() .. "/mods/noita-mp/files/libs") lu.assertEquals(actual_path, expected) end @@ -199,65 +198,65 @@ end ---------------------------------------------------------------------------------------------------- function TestFileUtil:testExists() - lu.assertNotIsTrue(fu.Exists("nonexistingfile.asdf")) - lu.assertErrorMsgContains("is not type of string!", fu.Exists) - lu.assertIsTrue(fu.Exists(fu.GetAbsoluteDirectoryPathOfNoitaMP() .. "/mod.xml")) + lu.assertNotIsTrue(FileUtils.Exists("nonexistingfile.asdf")) + lu.assertErrorMsgContains("is not type of string!", FileUtils.Exists) + lu.assertIsTrue(FileUtils.Exists(FileUtils.GetAbsoluteDirectoryPathOfNoitaMP() .. "/mod.xml")) end function TestFileUtil:testIsFile() - lu.assertNotIsTrue(fu.IsFile("nonexistingfile.asdf")) - lu.assertErrorMsgContains("is not type of string!", fu.IsFile) - lu.assertIsTrue(fu.IsFile(fu.GetAbsoluteDirectoryPathOfNoitaMP() .. "/mod.xml")) + lu.assertNotIsTrue(FileUtils.IsFile("nonexistingfile.asdf")) + lu.assertErrorMsgContains("is not type of string!", FileUtils.IsFile) + lu.assertIsTrue(FileUtils.IsFile(FileUtils.GetAbsoluteDirectoryPathOfNoitaMP() .. "/mod.xml")) end function TestFileUtil:testIsDirectory() - lu.assertNotIsTrue(fu.IsDirectory("nonexistingdirectory")) - lu.assertErrorMsgContains("is not type of string!", fu.IsDirectory) - -- lu.assertIsTrue(fu.IsDirectory(fu.GetAbsolutePathOfNoitaRootDirectory())) TODO: https://github.com/Ismoh/NoitaMP/issues/13 + lu.assertNotIsTrue(FileUtils.IsDirectory("nonexistingdirectory")) + lu.assertErrorMsgContains("is not type of string!", FileUtils.IsDirectory) + -- lu.assertIsTrue(FileUtils.IsDirectory(FileUtils.GetAbsolutePathOfNoitaRootDirectory())) TODO: https://github.com/Ismoh/NoitaMP/issues/13 end function TestFileUtil:testReadBinaryFile() - lu.assertErrorMsgContains("is not type of string!", fu.ReadBinaryFile) - lu.assertErrorMsgContains("Unable to open and read file: ", fu.ReadBinaryFile, "nonexistingfile.asdf") + lu.assertErrorMsgContains("is not type of string!", FileUtils.ReadBinaryFile) + lu.assertErrorMsgContains("Unable to open and read file: ", FileUtils.ReadBinaryFile, "nonexistingfile.asdf") - local content = fu.ReadBinaryFile(fu.GetAbsoluteDirectoryPathOfNoitaMP() .. "/mod.xml") + local content = FileUtils.ReadBinaryFile(FileUtils.GetAbsoluteDirectoryPathOfNoitaMP() .. "/mod.xml") lu.assertNotNil(content) end function TestFileUtil:testWriteBinaryFile() - lu.assertErrorMsgContains("is not type of string!", fu.WriteBinaryFile) + lu.assertErrorMsgContains("is not type of string!", FileUtils.WriteBinaryFile) - local full_path = fu.GetAbsolutePathOfNoitaRootDirectory() .. "/write-temporary-binary-test-file.txt" - fu.WriteBinaryFile(full_path, "File Content") - lu.assertIsTrue(fu.Exists(full_path)) + local full_path = FileUtils.GetAbsolutePathOfNoitaRootDirectory() .. "/write-temporary-binary-test-file.txt" + FileUtils.WriteBinaryFile(full_path, "File Content") + lu.assertIsTrue(FileUtils.Exists(full_path)) os.remove(full_path) end function TestFileUtil:testReadFile() - lu.assertErrorMsgContains("is not type of string!", fu.ReadFile) - lu.assertErrorMsgContains("Unable to open and read file: ", fu.ReadFile, "nonexistingfile.asdf") + lu.assertErrorMsgContains("is not type of string!", FileUtils.ReadFile) + lu.assertErrorMsgContains("Unable to open and read file: ", FileUtils.ReadFile, "nonexistingfile.asdf") - local content = fu.ReadFile(fu.GetAbsoluteDirectoryPathOfNoitaMP() .. "/mod.xml") + local content = FileUtils.ReadFile(FileUtils.GetAbsoluteDirectoryPathOfNoitaMP() .. "/mod.xml") lu.assertNotNil(content) end function TestFileUtil:testWriteFile() - lu.assertErrorMsgContains("is not type of string!", fu.WriteFile) + lu.assertErrorMsgContains("is not type of string!", FileUtils.WriteFile) - local full_path = fu.GetAbsolutePathOfNoitaRootDirectory() .. "/write-temporary-test-file.txt" - fu.WriteFile(full_path, "File Content") - lu.assertIsTrue(fu.Exists(full_path)) + local full_path = FileUtils.GetAbsolutePathOfNoitaRootDirectory() .. "/write-temporary-test-file.txt" + FileUtils.WriteFile(full_path, "File Content") + lu.assertIsTrue(FileUtils.Exists(full_path)) os.remove(full_path) end function TestFileUtil:testMkDir() - lu.assertErrorMsgContains("is not type of string!", fu.MkDir) + lu.assertErrorMsgContains("is not type of string!", FileUtils.MkDir) -- TODO: windows - -- local dir_path = fu.GetAbsolutePathOfNoitaRootDirectory() .. "/tests/temp-test-dir" - -- fu.MkDir(dir_path) - -- lu.assertIsTrue(fu.exists(dir_path)) - -- lu.assertIsTrue(fu.IsDirectory(dir_path)) + -- local dir_path = FileUtils.GetAbsolutePathOfNoitaRootDirectory() .. "/tests/temp-test-dir" + -- FileUtils.MkDir(dir_path) + -- lu.assertIsTrue(FileUtils.exists(dir_path)) + -- lu.assertIsTrue(FileUtils.IsDirectory(dir_path)) end function TestFileUtil:testFind7zipExecutable() @@ -267,12 +266,12 @@ end function TestFileUtil:testExists7zip() local old = _G.seven_zip _G.seven_zip = false -- mock - lu.assertNotIsTrue(fu.Exists7zip()) + lu.assertNotIsTrue(FileUtils.Exists7zip()) _G.seven_zip = true -- mock - lu.assertIsTrue(fu.Exists7zip()) + lu.assertIsTrue(FileUtils.Exists7zip()) _G.seven_zip = old end function TestFileUtil:testCreate7zipArchive() - --fu.Create7zipArchive() + --FileUtils.Create7zipArchive() end \ No newline at end of file diff --git a/mods/noita-mp/tests/files/scripts/util/NetworkUtils_test.lua b/mods/noita-mp/tests/files/scripts/util/NetworkUtils_test.lua index d677957ab..90604068f 100644 --- a/mods/noita-mp/tests/files/scripts/util/NetworkUtils_test.lua +++ b/mods/noita-mp/tests/files/scripts/util/NetworkUtils_test.lua @@ -222,13 +222,12 @@ function TestNetworkUtils:testAlreadySentSeed() end function TestNetworkUtils:testAlreadySentMinaInformation() - local fu = require("FileUtils") -- [[ Prepare mocked data for sending MinaInformation! ]] -- local networkMessageId = NetworkUtils.getNextNetworkMessageId() local name = "ClientOwnerName" local guid = GuidUtils:getGuid() - local version = fu.GetVersionByFile() + local version = FileUtils.GetVersionByFile() local nuid = nil local data = {