Skip to content

Commit ffc1c68

Browse files
authored
Merge branch 'LuaLS:master' into master
2 parents aa2bcb0 + 759e8fb commit ffc1c68

40 files changed

+3177
-88
lines changed

changelog.md

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

33
## Unreleased
44
<!-- Add all new changes here. They will be moved under a version at release -->
5+
* `FIX` cannot debug in Linux due to lua-debug expecting host process to have lua54 symbols available
6+
* `FIX` support hex color codes with `#` in `textDocument/documentColor`
7+
8+
## 3.14.0
9+
`2025-4-7`
10+
* `NEW` locale `es-419`, thanks [Felipe Lema](https://codeberg.org/FelipeLema)
11+
* `FIX` prevent unnecessary edits by LSP formatting when content did not change
12+
* `FIX` return no completions if completion is disabled
13+
* `FIX` optimized the performance of large literal tables (e.g., configuration tables)
14+
15+
## 3.13.9
16+
`2025-3-13`
17+
* `CHG` remove the limit for analyzing the literal table
18+
19+
## 3.13.8
20+
`2025-3-12`
21+
* `CHG` when analyzing the literal table, only the first 100 items are analyzed at most
22+
* `CHG` when checking type matching for union types, only the first 100 items are checked at most
23+
* `FIX` Update `--help` message.
24+
* `FIX` --check now respects ignoreDir setting
525
* `FIX` incorrect argument skip pattern for `--check_out_path=`, which incorrectly skips the next argument
626

27+
## 3.13.7
28+
`2025-3-10`
29+
* `NEW` CLI: added `--help`.
30+
* `CHG` default path for `--doc_out_path` is the current directory
31+
* `FIX` incorrect argument skip pattern for `--check_out_path=`, which incorrectly skips the next argument
32+
* `FIX` incorrect error message for `--doc_update`.
33+
* `FIX` reimplement section `luals.config` in file doc.json
34+
* `FIX` incorrect file names in file doc.json
35+
* `FIX` remove extra `./` path prefix in the check report when using `--check=.`
36+
* `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)
37+
* `FIX` correct lua version of `math.ult` and `math.type`
38+
* `FIX` incorrect links for `pattern` in `string` methods
39+
* `FIX` fix type annotations for bit module
40+
* `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)
41+
742
## 3.13.6
843
`2025-2-6`
944
* `NEW` `---@class` supports attribute `partial`, which will not check missing inherited fields [#3023](https://github.com/LuaLS/lua-language-server/issues/3023)

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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ DIAG_OVER_MAX_ARGS =
3636
'This function expects a maximum of {:d} argument(s) but instead it is receiving {:d}.'
3737
DIAG_MISS_ARGS =
3838
'This function requires {:d} argument(s) but instead it is receiving {:d}.'
39+
DIAG_UNNECESSARY_ASSERT =
40+
'Unnecessary assert: this expression is always truthy.'
3941
DIAG_OVER_MAX_VALUES =
4042
'Only has {} variables, but you set {} values.'
4143
DIAG_AMBIGUITY_1 =

locale/en-us/setting.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,8 @@ config.diagnostics['missing-return-value'] =
406406
'Enable diagnostics for return statements without values although the containing function declares returns.'
407407
config.diagnostics['need-check-nil'] =
408408
'Enable diagnostics for variable usages if `nil` or an optional (potentially `nil`) value was assigned to the variable before.'
409+
config.diagnostics['unnecessary-assert'] =
410+
'Enable diagnostics for redundant assertions on truthy values.'
409411
config.diagnostics['no-unknown'] =
410412
'Enable diagnostics for cases in which the type cannot be inferred.'
411413
config.diagnostics['not-yieldable'] =

0 commit comments

Comments
 (0)