Skip to content

Commit 3d19e9c

Browse files
committed
migrate to luals 3.11
1 parent 16d6c9b commit 3d19e9c

File tree

104 files changed

+4207
-1311
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+4207
-1311
lines changed

resources/changelog.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,31 @@
22

33
## Unreleased
44
<!-- Add all new changes here. They will be moved under a version at release -->
5+
6+
## 3.11.0
7+
* `NEW` Added support for Japanese locale
8+
* `NEW` Infer function parameter types when overriding the same-named class function in an instance of that class [#2158](https://github.com/LuaLS/lua-language-server/issues/2158)
9+
* `NEW` Types with literal fields can be narrowed.
10+
* `NEW` Reference addons installed via the addon manager with `${addons}` [#2866](https://github.com/LuaLS/lua-language-server/pull/2866).
11+
* `NEW` Support using `---@class` on `rawset(_G, ...)` to annotate the created global variable [#2862](https://github.com/LuaLS/lua-language-server/issues/2862)
12+
* `NEW` Settings:
13+
+ `Lua.language.fixIndent`
14+
+ `Lua.language.completeAnnotation`
15+
* `FIX` Eliminate floating point error in test benchmark output
16+
* `FIX` Remove luamake install from make scripts
17+
* `FIX` Incorrect `table` type injected to the global variable created by `rawset(_G, ...)` [#2863](https://github.com/LuaLS/lua-language-server/issues/2863)
18+
19+
## 3.10.6
20+
`2024-9-10`
521
* `NEW` Custom documentation exporter
622
* `NEW` Setting: `Lua.docScriptPath`: Path to a script that overrides `cli.doc.export`, allowing user-specified documentation exporting.
23+
* `NEW` Infer the parameter types of a same-named function in the subclass based on the parameter types in the superclass function.
24+
* `FIX` Fix `VM.OnCompileFunctionParam` function in plugins
25+
* `FIX` Lua 5.1: fix incorrect warning when using setfenv with an int as first parameter
26+
* `FIX` Improve type narrow by checking exact match on literal type params
27+
* `FIX` Correctly list enums for function overload arguments [#2840](https://github.com/LuaLS/lua-language-server/pull/2840)
28+
* `FIX` Incorrect function params' type infer when there is only `@overload` [#2509](https://github.com/LuaLS/lua-language-server/issues/2509) [#2708](https://github.com/LuaLS/lua-language-server/issues/2708) [#2709](https://github.com/LuaLS/lua-language-server/issues/2709)
29+
* `FIX` Only call workspace/configuration when available [#981](https://github.com/LuaLS/lua-language-server/issues/981), [#2318](https://github.com/LuaLS/lua-language-server/issues/2318), [2336](https://github.com/LuaLS/lua-language-server/issues/2336) [#2843](https://github.com/LuaLS/lua-language-server/pull/2843)
730

831
## 3.10.5
932
`2024-8-19`

resources/locale/en-us/setting.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,10 @@ config.misc.parameters =
281281
'[Command line parameters](https://github.com/LuaLS/lua-telemetry-server/tree/master/method) when starting the language server in VSCode.'
282282
config.misc.executablePath =
283283
'Specify the executable path in VSCode.'
284+
config.language.fixIndent =
285+
'(VSCode only) Fix incorrect auto-indentation, such as incorrect indentation when line breaks occur within a string containing the word "function."'
286+
config.language.completeAnnotation =
287+
'(VSCode only) Automatically insert "---@ " after a line break following a annotation.'
284288
config.type.castNumberToInteger =
285289
'Allowed to assign the `number` type to the `integer` type.'
286290
config.type.weakUnionCheck =

resources/locale/ja-jp/meta.lua

Lines changed: 762 additions & 0 deletions
Large diffs are not rendered by default.

resources/locale/ja-jp/script.lua

Lines changed: 1311 additions & 0 deletions
Large diffs are not rendered by default.

resources/locale/ja-jp/setting.lua

Lines changed: 456 additions & 0 deletions
Large diffs are not rendered by default.

resources/locale/pt-br/setting.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,10 @@ config.misc.parameters = -- TODO: need translate!
281281
'[Command line parameters](https://github.com/LuaLS/lua-telemetry-server/tree/master/method) when starting the language service in VSCode.'
282282
config.misc.executablePath = -- TODO: need translate!
283283
'Specify the executable path in VSCode.'
284+
config.language.fixIndent = -- TODO: need translate!
285+
'(VSCode only) Fix incorrect auto-indentation, such as incorrect indentation when line breaks occur within a string containing the word "function."'
286+
config.language.completeAnnotation = -- TODO: need translate!
287+
'(VSCode only) Automatically insert "---@ " after a line break following a annotation.'
284288
config.type.castNumberToInteger = -- TODO: need translate!
285289
'Allowed to assign the `number` type to the `integer` type.'
286290
config.type.weakUnionCheck = -- TODO: need translate!

resources/locale/zh-cn/setting.lua

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ config.runtime.nonstandardSymbol =
2828
"支持非标准的符号。请务必确认你的运行环境支持这些符号。"
2929
config.runtime.plugin =
3030
"插件路径,请查阅[文档](https://luals.github.io/wiki/plugins)了解用法。"
31-
config.runtime.pluginArgs = -- TODO: need translate!
32-
"Additional arguments for the plugin."
31+
config.runtime.pluginArgs =
32+
"插件的额外参数。"
3333
config.runtime.fileEncoding =
3434
"文件编码,`ansi` 选项只在 `Windows` 平台下有效。"
3535
config.runtime.builtin =
@@ -48,8 +48,8 @@ config.diagnostics.disable =
4848
"禁用的诊断(使用浮框括号内的代码)。"
4949
config.diagnostics.globals =
5050
"已定义的全局变量。"
51-
config.diagnostics.globalsRegex = -- TODO: need translate!
52-
"Find defined global variables using regex."
51+
config.diagnostics.globalsRegex =
52+
"启用诊断以检测尝试关闭非对象的变量。"
5353
config.diagnostics.severity =
5454
[[
5555
修改诊断等级。
@@ -280,6 +280,10 @@ config.misc.parameters =
280280
'VSCode中启动语言服务时的[命令行参数](https://luals.github.io/wiki/usage#arguments)。'
281281
config.misc.executablePath =
282282
'VSCode中指定可执行文件路径。'
283+
config.language.fixIndent =
284+
'(仅VSCode) 修复错误的自动缩进,例如在包含单词 "function" 的字符串中换行时出现的错误缩进。'
285+
config.language.completeAnnotation =
286+
'(仅VSCode) 在注解后换行时自动插入 "---@ "。'
283287
config.type.castNumberToInteger =
284288
'允许将 `number` 类型赋给 `integer` 类型。'
285289
config.type.weakUnionCheck =
@@ -354,12 +358,12 @@ config.diagnostics['cast-type-mismatch'] =
354358
'变量被转换为与其初始类型不匹配的类型'
355359
config.diagnostics['circular-doc-class'] =
356360
'两个类相互继承并互相循环'
357-
config.diagnostics['close-non-object'] = -- TODO: need translate!
358-
'Enable diagnostics for attempts to close a variable with a non-object.'
361+
config.diagnostics['close-non-object'] =
362+
'尝试关闭非对象变量的诊断'
359363
config.diagnostics['code-after-break'] =
360364
'放在循环中break语句后面的代码'
361-
config.diagnostics['codestyle-check'] = -- TODO: need translate!
362-
'Enable diagnostics for incorrectly styled lines.'
365+
config.diagnostics['codestyle-check'] =
366+
'启用对不正确样式行的诊断'
363367
config.diagnostics['count-down-loop'] =
364368
'for循环永远无法达到最大/极限值(在递减时递增)'
365369
config.diagnostics['deprecated'] =
@@ -406,9 +410,9 @@ config.diagnostics['redundant-return-value']=
406410
'返回`@return`注释未指定的额外值'
407411
config.diagnostics['return-type-mismatch'] =
408412
'返回值的类型与`@return`中声明的类型不匹配'
409-
config.diagnostics['spell-check'] = -- TODO: need translate!
410-
'Enable diagnostics for typos in strings.'
411-
config.diagnostics['name-style-check'] = -- TODO: need translate!
413+
config.diagnostics['spell-check'] =
414+
'启用字符串拼写检查的诊断。'
415+
config.diagnostics['name-style-check'] =
412416
'变量的名称样式检查'
413417
config.diagnostics['unbalanced-assignments']=
414418
'多重赋值时没有赋值所有变量(如`local x,y = 1`)'
@@ -428,8 +432,8 @@ config.diagnostics['unknown-operator'] =
428432
'未知的运算符'
429433
config.diagnostics['unreachable-code'] =
430434
'不可达的代码'
431-
config.diagnostics['global-element'] = -- TODO: need translate!
432-
'Enable diagnostics to warn about global elements.'
435+
config.diagnostics['global-element'] =
436+
'启用诊断以警告全局元素。'
433437
config.typeFormat.config =
434438
'配置输入Lua代码时的格式化行为'
435439
config.typeFormat.config.auto_complete_end =

resources/locale/zh-tw/script.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,7 @@ CLI_DOC_DONE = -- TODO: need translate!
658658
'Document exporting completed!'
659659
CLI_DOC_WORKING =
660660
'正在產生文件...'
661+
661662
TYPE_ERROR_ENUM_GLOBAL_DISMATCH = -- TODO: need translate!
662663
'Type `{child}` cannot match enumeration type of `{parent}`'
663664
TYPE_ERROR_ENUM_GENERIC_UNSUPPORTED = -- TODO: need translate!

resources/locale/zh-tw/setting.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,10 @@ config.misc.parameters =
280280
'VSCode中啟動語言伺服時的[命令列參數](https://luals.github.io/wiki/usage#arguments)。'
281281
config.misc.executablePath = -- TODO: need translate!
282282
'Specify the executable path in VSCode.'
283+
config.language.fixIndent = -- TODO: need translate!
284+
'(VSCode only) Fix incorrect auto-indentation, such as incorrect indentation when line breaks occur within a string containing the word "function."'
285+
config.language.completeAnnotation = -- TODO: need translate!
286+
'(VSCode only) Automatically insert "---@ " after a line break following a annotation.'
283287
config.type.castNumberToInteger =
284288
'允許將 `number` 類型賦值給 `integer` 類型。'
285289
config.type.weakUnionCheck =

resources/meta/Lua 5.4 zh-cn utf8/basic.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ function select(index, ...) end
293293
---
294294
---[查看文档](command:extension.lua.doc?["en-us/54/manual.html/pdf-setfenv"])
295295
---
296-
---@param f async fun(...):...|integer
296+
---@param f (async fun(...):...)|integer
297297
---@param table table
298298
---@return function
299299
function setfenv(f, table) end

resources/meta/LuaJIT zh-cn utf8/basic.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ function select(index, ...) end
293293
---
294294
---[查看文档](command:extension.lua.doc?["en-us/51/manual.html/pdf-setfenv"])
295295
---
296-
---@param f async fun(...):...|integer
296+
---@param f (async fun(...):...)|integer
297297
---@param table table
298298
---@return function
299299
function setfenv(f, table) end

0 commit comments

Comments
 (0)