Skip to content

Commit 72baf0c

Browse files
authored
Merge branch 'master' into doc/add-spanish-locale
2 parents 451df83 + dc4c9f2 commit 72baf0c

Some content is hidden

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

55 files changed

+1261
-358
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ jobs:
2525
matrix:
2626
include:
2727
- { os: ubuntu-22.04, target: linux, platform: linux-x64, container: 'alpine:latest', libc: musl }
28-
- { os: ubuntu-20.04, target: linux, platform: linux-x64 }
29-
- { os: ubuntu-20.04, target: linux, platform: linux-arm64 }
28+
- { os: ubuntu-22.04, target: linux, platform: linux-x64 }
29+
- { os: ubuntu-22.04, target: linux, platform: linux-arm64 }
3030
- { os: macos-latest, target: darwin, platform: darwin-x64 }
3131
- { os: macos-latest, target: darwin, platform: darwin-arm64 }
3232
- { os: windows-latest, target: windows, platform: win32-ia32 }

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
fail-fast: false
77
matrix:
88
include:
9-
- { os: ubuntu-20.04, target: linux, platform: linux-x64 }
9+
- { os: ubuntu-22.04, target: linux, platform: linux-x64 }
1010
- { os: macos-14, target: darwin, platform: darwin-arm64 }
1111
- { os: windows-latest, target: windows, platform: win32-x64 }
1212
runs-on: ${{ matrix.os }}

changelog.md

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

6+
## 3.13.9
7+
`2025-3-13`
8+
* `CHG` remove the limit for analyzing the literal table
9+
10+
## 3.13.8
11+
`2025-3-12`
12+
* `CHG` when analyzing the literal table, only the first 100 items are analyzed at most
13+
* `CHG` when checking type matching for union types, only the first 100 items are checked at most
14+
* `FIX` Update `--help` message.
15+
* `FIX` --check now respects ignoreDir setting
16+
* `FIX` incorrect argument skip pattern for `--check_out_path=`, which incorrectly skips the next argument
17+
18+
## 3.13.7
19+
`2025-3-10`
20+
* `NEW` CLI: added `--help`.
21+
* `CHG` default path for `--doc_out_path` is the current directory
22+
* `FIX` incorrect argument skip pattern for `--check_out_path=`, which incorrectly skips the next argument
23+
* `FIX` incorrect error message for `--doc_update`.
24+
* `FIX` reimplement section `luals.config` in file doc.json
25+
* `FIX` incorrect file names in file doc.json
26+
* `FIX` remove extra `./` path prefix in the check report when using `--check=.`
27+
* `FIX` Narrowing of types with literal fields: [#3056](https://github.com/LuaLS/lua-language-server/issues/3056), [#3089](https://github.com/LuaLS/lua-language-server/issues/3089)
28+
* `FIX` correct lua version of `math.ult` and `math.type`
29+
* `FIX` incorrect links for `pattern` in `string` methods
30+
* `FIX` fix type annotations for bit module
31+
* `FIX` Another regression related to type narrow and generic param introduced since `v3.10.1` [#3087](https://github.com/LuaLS/lua-language-server/issues/3087)
32+
33+
## 3.13.6
34+
`2025-2-6`
35+
* `NEW` `---@class` supports attribute `partial`, which will not check missing inherited fields [#3023](https://github.com/LuaLS/lua-language-server/issues/3023)
36+
```lua
37+
---@class Config
38+
---@field a number
39+
40+
---@class (partial) Config.P: Config
41+
---@field b number
42+
43+
---@type Config.P[]
44+
local cfgs = {}
45+
cfgs[1] = { b = 1 } -- no warning
46+
cfgs[2] = {} -- only warns missing `b`
47+
```
48+
This enables the previous missing field check behavior before [#2970](https://github.com/LuaLS/lua-language-server/issues/2970)
49+
* `NEW` Added variable substitution support for vscode's `${workspaceFolder:x}` when resolving path placeholders [#2987](https://github.com/LuaLS/lua-language-server/issues/2987)
50+
* `NEW` Added `--check_format=json|pretty` for use with `--check` to output diagnostics in a human readable format.
51+
* `NEW` Test CLI: `--name=<testname>` `-n=<testname>`: run specify unit test
52+
* `CHG` Generic pattern now supports definition after capture and optional, union, array [#3014](https://github.com/LuaLS/lua-language-server/issues/3014) [#3031](https://github.com/LuaLS/lua-language-server/pull/3031)
53+
```lua
54+
---@generic T
55+
---@param t `T`.Cat?
56+
---@return T?
57+
local function f(t) end
58+
59+
local t = f('Smile') --> t is `(Smile.Cat)?`
60+
```
61+
* `FIX` Fixed the error that the configuration file pointed to by the `--configpath` option was not read and loaded.
62+
* `FIX` Don't truncate any output when running in `--doc` mode [#3049](https://github.com/LuaLS/lua-language-server/issues/3049)
63+
* `FIX` Generic return can be optional.
64+
* `FIX` Fixed the comment calculating in docs `---@param a string?Comment` - now its `Comment` instead of `omment` [#3028](https://github.com/LuaLS/lua-language-server/pull/3028)
65+
* `FIX` Fixed cannot bind variables using tail comment `@class` [#2673](https://github.com/LuaLS/lua-language-server/issues/2673)
66+
* `FIX` Fixed missing field completion for generic class object [#2196](https://github.com/LuaLS/lua-language-server/issues/2196) [#2945](https://github.com/LuaLS/lua-language-server/issues/2945) [#3041](https://github.com/LuaLS/lua-language-server/issues/3041)
67+
68+
## 3.13.5
69+
`2024-12-20`
70+
* `NEW` Setting: `Lua.hint.awaitPropagate`: When enabled, `--@async` propagates to the caller.
71+
* `CHG` Add server version information to `initialize` response [#2996](https://github.com/LuaLS/lua-language-server/pull/2996)
72+
* `CHG` If the `---@field` of the same name has a type of `fun`, the `duplicate-doc-field` check will not be performed.
73+
* `FIX` Incorrect infer for function array annotation on tables [#2367](https://github.com/LuaLS/lua-language-server/issues/2367)
74+
675
## 3.13.4
776
`2024-12-13`
877
* `CHG` Can adjust the level of detail of Hover (VSCode)

locale/en-us/meta.lua

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -647,11 +647,13 @@ string.char =
647647
'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.'
648648
string.dump =
649649
'Returns a string containing a binary representation (a *binary chunk*) of the given function.'
650-
string.find =
650+
string.find['>5.2'] =
651651
'Looks for the first match of `pattern` (see §6.4.1) in the string.'
652+
string.find['=5.1'] =
653+
'Looks for the first match of `pattern` (see §5.4.1) in the string.'
652654
string.format =
653655
'Returns a formatted version of its variable number of arguments following the description given in its first argument.'
654-
string.gmatch =
656+
string.gmatch['>5.2'] =
655657
[[
656658
Returns an iterator function that, each time it is called, returns the next captures from `pattern` (see §6.4.1) over the string s.
657659
@@ -664,17 +666,34 @@ As an example, the following loop will iterate over all the words from string s,
664666
end
665667
```
666668
]]
667-
string.gsub =
669+
string.gmatch['=5.1'] =
670+
[[
671+
Returns an iterator function that, each time it is called, returns the next captures from `pattern` (see §5.4.1) over the string s.
672+
673+
As an example, the following loop will iterate over all the words from string s, printing one per line:
674+
```lua
675+
s =
676+
"hello world from Lua"
677+
for w in string.gmatch(s, "%a+") do
678+
print(w)
679+
end
680+
```
681+
]]
682+
string.gsub['>5.2'] =
668683
'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`.'
684+
string.gsub['=5.1'] =
685+
'Returns a copy of s in which all (or the first `n`, if given) occurrences of the `pattern` (see §5.4.1) have been replaced by a replacement string specified by `repl`.'
669686
string.len =
670687
'Returns its length.'
671688
string.lower =
672689
'Returns a copy of this string with all uppercase letters changed to lowercase.'
673-
string.match =
690+
string.match['>5.2'] =
674691
'Looks for the first match of `pattern` (see §6.4.1) in the string.'
675-
string.pack =
692+
string.match['=5.1'] =
693+
'Looks for the first match of `pattern` (see §5.4.1) in the string.'
694+
string.pack['>5.2'] =
676695
'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) .'
677-
string.packsize =
696+
string.packsize['>5.2'] =
678697
'Returns the size of a string resulting from `string.pack` with the given format string `fmt` (see §6.4.2) .'
679698
string.rep['>5.2'] =
680699
'Returns a string that is the concatenation of `n` copies of the string `s` separated by the string `sep`.'

locale/en-us/script.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,8 +648,10 @@ CLI_CHECK_SUCCESS =
648648
'Diagnosis completed, no problems found'
649649
CLI_CHECK_PROGRESS =
650650
'Found {} problems in {} files'
651-
CLI_CHECK_RESULTS =
651+
CLI_CHECK_RESULTS_OUTPATH =
652652
'Diagnosis complete, {} problems found, see {}'
653+
CLI_CHECK_RESULTS_PRETTY =
654+
'Diagnosis complete, {} problems found'
653655
CLI_CHECK_MULTIPLE_WORKERS =
654656
'Starting {} worker tasks, progress output will be disabled. This may take a few minutes.'
655657
CLI_DOC_INITING =

locale/en-us/setting.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,9 @@ config.hint.arrayIndex.Disable =
256256
'Disable hints of array index.'
257257
config.hint.await =
258258
'If the called function is marked `---@async`, prompt `await` at the call.'
259+
config.hint.awaitPropagate =
260+
'Enable the propagation of `await`. When a function calls a function marked `---@async`,\z
261+
it will be automatically marked as `---@async`.'
259262
config.hint.semicolon =
260263
'If there is no semicolon at the end of the statement, display a virtual semicolon.'
261264
config.hint.semicolon.All =
@@ -455,6 +458,6 @@ command.addon_manager.open =
455458
command.reloadFFIMeta =
456459
'Lua: Reload luajit ffi meta'
457460
command.startServer =
458-
'Lua: (debug) Start Language Server'
461+
'Lua: Restart Language Server'
459462
command.stopServer =
460-
'Lua: (debug) Stop Language Server'
463+
'Lua: Stop Language Server'

locale/ja-jp/script.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,8 +649,10 @@ CLI_CHECK_SUCCESS =
649649
'診断が完了しました。問題は見つかりませんでした'
650650
CLI_CHECK_PROGRESS =
651651
'{} ファイルに渡り、{} 個の問題が発見されました'
652-
CLI_CHECK_RESULTS =
652+
CLI_CHECK_RESULTS_OUTPATH =
653653
'診断が完了しました。{} 個の問題が発見されました。詳しくは {} をご確認ください'
654+
CLI_CHECK_RESULTS_PRETTY =
655+
'診断が完了しました。{} 個の問題が発見されました'
654656
CLI_CHECK_MULTIPLE_WORKERS =
655657
'{} 個のワーカータスクを開始しているため、進行状況の出力が無効になります。完了まで数分かかることがあります。'
656658
CLI_DOC_INITING =

locale/ja-jp/setting.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,9 @@ config.hint.arrayIndex.Disable = -- TODO: need translate!
256256
'Disable hints of array index.'
257257
config.hint.await = -- TODO: need translate!
258258
'If the called function is marked `---@async`, prompt `await` at the call.'
259+
config.hint.awaitPropagate = -- TODO: need translate!
260+
'Enable the propagation of `await`. When a function calls a function marked `---@async`,\z
261+
it will be automatically marked as `---@async`.'
259262
config.hint.semicolon = -- TODO: need translate!
260263
'If there is no semicolon at the end of the statement, display a virtual semicolon.'
261264
config.hint.semicolon.All = -- TODO: need translate!
@@ -455,6 +458,6 @@ command.addon_manager.open = -- TODO: need translate!
455458
command.reloadFFIMeta = -- TODO: need translate!
456459
'Lua: Reload luajit ffi meta'
457460
command.startServer = -- TODO: need translate!
458-
'Lua: (debug) Start Language Server'
461+
'Lua: Restart Language Server'
459462
command.stopServer = -- TODO: need translate!
460-
'Lua: (debug) Stop Language Server'
463+
'Lua: Stop Language Server'

locale/pt-br/script.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,8 +648,10 @@ CLI_CHECK_SUCCESS =
648648
'Diagnóstico completo, nenhum problema encontrado'
649649
CLI_CHECK_PROGRESS = -- TODO: need translate!
650650
'Found {} problems in {} files'
651-
CLI_CHECK_RESULTS =
651+
CLI_CHECK_RESULTS_OUTPATH =
652652
'Diagnóstico completo, {} problemas encontrados, veja {}'
653+
CLI_CHECK_RESULTS_PRETTY =
654+
'Diagnóstico completo, {} problemas encontrados'
653655
CLI_CHECK_MULTIPLE_WORKERS = -- TODO: need translate!
654656
'Starting {} worker tasks, progress output will be disabled. This may take a few minutes.'
655657
CLI_DOC_INITING = -- TODO: need translate!

locale/pt-br/setting.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,9 @@ config.hint.arrayIndex.Disable = -- TODO: need translate!
256256
'Disable hints of array index.'
257257
config.hint.await = -- TODO: need translate!
258258
'If the called function is marked `---@async`, prompt `await` at the call.'
259+
config.hint.awaitPropagate = -- TODO: need translate!
260+
'Enable the propagation of `await`. When a function calls a function marked `---@async`,\z
261+
it will be automatically marked as `---@async`.'
259262
config.hint.semicolon = -- TODO: need translate!
260263
'If there is no semicolon at the end of the statement, display a virtual semicolon.'
261264
config.hint.semicolon.All = -- TODO: need translate!
@@ -455,6 +458,6 @@ command.addon_manager.open = -- TODO: need translate!
455458
command.reloadFFIMeta = -- TODO: need translate!
456459
'Lua: Reload luajit ffi meta'
457460
command.startServer = -- TODO: need translate!
458-
'Lua: (debug) Start Language Server'
461+
'Lua: Restart Language Server'
459462
command.stopServer = -- TODO: need translate!
460-
'Lua: (debug) Stop Language Server'
463+
'Lua: Stop Language Server'

0 commit comments

Comments
 (0)