Skip to content

Commit 2c3cea5

Browse files
committed
update to 3.13
1 parent e76a64b commit 2c3cea5

File tree

22 files changed

+309
-52
lines changed

22 files changed

+309
-52
lines changed

changelog.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,59 @@
33
## Unreleased
44
<!-- Add all new changes here. They will be moved under a version at release -->
55

6+
## 3.13.1
7+
`2024-11-13`
8+
* `FIX` Incorrect type check in some case
9+
10+
## 3.13.0
11+
`2024-11-13`
12+
* `NEW` Setting: `Lua.type.inferTableSize`: A Small Table array can be infered
13+
* `NEW` Add custom repository support for addonManager. New configuration setting: `Lua.addonManager.repositoryBranch` and `Lua.addonManager.repositoryPath`
14+
* `NEW` Infer function parameter types when the function is used as an callback argument and that argument has a `fun()` annotation. Enable with `Lua.type.inferParamType` setting. [#2695](https://github.com/LuaLS/lua-language-server/pull/2695)
15+
```lua
16+
---@param callback fun(a: integer)
17+
function register(callback) end
18+
19+
local function callback(a) end --> a: integer
20+
register(callback)
21+
```
22+
* `CHG` Basic types allow contravariance
23+
```lua
24+
---@class int32: integer
25+
26+
---@type integer
27+
local n
28+
29+
---@type int32
30+
local a = n
31+
```
32+
* `FIX` Improve type narrow with **literal alias type** during completion and signature help
33+
34+
## 3.12.0
35+
`2024-10-30`
36+
* `NEW` Support importing `enum` through class name suffix matching in quick fixes, allowing the import of `enum` from `table.table.enum; return table`.
37+
* `NEW` Support limited multiline annotations
38+
```lua
39+
---@type {
40+
--- x: number,
41+
--- y: number,
42+
--- z: number,
43+
---}
44+
local point --> local point: { x: number, y: number, z: number }
45+
```
46+
* `FIX` A regression related to type narrow and generic param introduced since `v3.10.1`
47+
* `FIX` Parse storagePath to improve reliability of resolving ${addons} placeholder
48+
* `FIX` Reference should also look in tablefield
49+
* `FIX` Determine that the index of `{...}` is an integer when iterating
50+
51+
## 3.11.1
52+
`2024-10-9`
53+
* `FIX` Fixed an issue preventing to set the locale to Japanese
54+
* `FIX` Preserve newlines between function comment and @see
55+
* `FIX` Accept storagePath option from client to resolve addon directory not found
56+
657
## 3.11.0
58+
`2024-9-30`
759
* `NEW` Added support for Japanese locale
860
* `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)
961
* `NEW` Types with literal fields can be narrowed.

locale/en-us/setting.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
config.addonManager.enable =
44
"Whether the addon manager is enabled or not."
5+
config.addonManager.repositoryBranch =
6+
"Specifies the git branch used by the addon manager."
7+
config.addonManager.repositoryPath =
8+
"Specifies the git path used by the addon manager."
59
config.runtime.version =
610
"Lua runtime version."
711
config.runtime.path =

locale/ja-jp/meta.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,6 @@ string.lower =
665665
'文字列内のすべての大文字を小文字に取り換えた文字列を返す。'
666666
string.match =
667667
'文字列の中から `pattern` に最初にマッチした部分を返す(§6.4.1 を参照)。マッチしたものがない場合、`nil` を返す。'
668-
'文字列 `s` の中で `pattern`(§6.4.1 を参照)に一致する最初の部分を見つける。見つかった場合、そのキャプチャされた値を返す。見つからなければ `nil` を返す。'
669668
string.pack =
670669
'第一引数で指定されたフォーマットに沿って、可変数の引数をバイナリ文字列にシリアライズしたものを返す(§6.4.2 を参照)。'
671670
string.packsize =
@@ -744,7 +743,7 @@ utf8 =
744743
utf8.char =
745744
'0個以上の整数を受け取り、それぞれを対応するUTF-8文字に変換し、これらの文字を連結した文字列を返す。'
746745
utf8.charpattern =
747-
'1つのUTF-8文字にマッチするパターンを返す。このパターンを用いる際には、対象の文字列が有効なUTF-8文字列である必要がある。
746+
'1つのUTF-8文字にマッチするパターンを返す。このパターンを用いる際には、対象の文字列が有効なUTF-8文字列である必要がある。'
748747
utf8.codes =
749748
[[
750749
次の構文において`p`が各UTF-8文字のバイト位置、`c`が各UTF-8文字の文字コードとなるような値を返す。無効なバイトシーケンスが文字列に含まれた場合にはエラーを出す。

locale/ja-jp/script.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,6 @@ COMMAND_MARK_GLOBAL =
465465
'グローバル変数として指定します'
466466
COMMAND_REMOVE_SPACE =
467467
'すべての行末スペースを削除します'
468-
'Clear all postemptive spaces'
469468
COMMAND_ADD_BRACKETS =
470469
'括弧を追加します。'
471470
COMMAND_RUNTIME_VERSION =

locale/ja-jp/setting.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
config.addonManager.enable = -- TODO: need translate!
44
"Whether the addon manager is enabled or not."
5+
config.addonManager.repositoryBranch = -- TODO: need translate!
6+
"Specifies the git branch used by the addon manager."
7+
config.addonManager.repositoryPath = -- TODO: need translate!
8+
"Specifies the git path used by the addon manager."
59
config.runtime.version = -- TODO: need translate!
610
"Lua runtime version."
711
config.runtime.path = -- TODO: need translate!

locale/pt-br/setting.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
config.addonManager.enable = -- TODO: need translate!
44
"Whether the addon manager is enabled or not."
5+
config.addonManager.repositoryBranch = -- TODO: need translate!
6+
"Specifies the git branch used by the addon manager."
7+
config.addonManager.repositoryPath = -- TODO: need translate!
8+
"Specifies the git path used by the addon manager."
59
config.runtime.version = -- TODO: need translate!
610
"Lua runtime version."
711
config.runtime.path = -- TODO: need translate!

locale/zh-cn/setting.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
config.addonManager.enable =
44
"是否启用扩展的附加插件管理器(Addon Manager)"
5+
config.addonManager.repositoryBranch =
6+
"指定插件管理器(Addon Manager)使用的git仓库分支"
7+
config.addonManager.repositoryPath =
8+
"指定插件管理器(Addon Manager)使用的git仓库路径"
59
config.runtime.version =
610
"Lua运行版本。"
711
config.runtime.path =

locale/zh-tw/setting.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
config.addonManager.enable = -- TODO: need translate!
44
"Whether the addon manager is enabled or not."
5+
config.addonManager.repositoryBranch = -- TODO: need translate!
6+
"Specifies the git branch used by the addon manager."
7+
config.addonManager.repositoryPath = -- TODO: need translate!
8+
"Specifies the git path used by the addon manager."
59
config.runtime.version =
610
"Lua執行版本。"
711
config.runtime.path =

main.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
local fs = require 'bee.filesystem'
22
local util = require 'utility'
33
local version = require 'version'
4+
45
require 'config.env'
56

67
local function getValue(value)
@@ -52,7 +53,6 @@ ROOT = fs.absolute(util.expandPath(rootPath))
5253
LOGPATH = LOGPATH and util.expandPath(LOGPATH) or (ROOT:string() .. '/log')
5354
METAPATH = METAPATH and util.expandPath(METAPATH) or (ROOT:string() .. '/meta')
5455

55-
5656
---@diagnostic disable-next-line: deprecated
5757
debug.setcstacklimit(200)
5858
collectgarbage('generational', 10, 50)

meta/template/basic.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ function setfenv(f, table) end
246246
---@field __newindex table|fun(t,k,v)|nil
247247
---@field __call (fun(t,...):...)|nil
248248
---#if VERSION > 5.1 or VERSION == JIT then
249-
---@field __pairs (fun(t):(fun(t,k,v):any,any))|nil
249+
---@field __pairs (fun(t):((fun(t,k,v):any,any),any,any))|nil
250250
---#end
251251
---#if VERSION == JIT or VERSION == 5.2 then
252252
---@field __ipairs (fun(t):(fun(t,k,v):(integer|nil),any))|nil

0 commit comments

Comments
 (0)