Skip to content

Commit 9e8efd2

Browse files
authored
Merge branch 'master' into bug/2977-lua-autodoc-includes-global-table
2 parents 125a6cf + afe4e01 commit 9e8efd2

File tree

14 files changed

+249
-14
lines changed

14 files changed

+249
-14
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,18 @@ jobs:
3838

3939
- uses: actboy168/setup-luamake@master
4040

41+
- name: Install zig
42+
if: matrix.target == 'linux'
43+
run:
44+
sudo snap install zig --classic --beta
45+
46+
- name: Prepare zig wrapper
47+
if: matrix.target == 'linux'
48+
run: chmod +x zig-cc-wrapper.sh
49+
4150
- name: Build
51+
env:
52+
USE_ZIG: ${{ matrix.target == 'linux' && '1' || '0' }}
4253
run: luamake -platform ${{ matrix.platform }}
4354

4455
- name: Setting up workflow variables

3rd/json.lua

Submodule json.lua updated 1 file

changelog.md

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

33
## Unreleased
44
<!-- Add all new changes here. They will be moved under a version at release -->
5+
* `New` Omit parameter hints when the argument name matches
6+
* `FIX` Fix a typo in `no-unknown` diagnostic message
57
* `FIX` Autodoc generation so it does not include documentation for builtin Lua language features
68

9+
## 3.16.1
10+
`2025-12-8`
11+
* `FIX` Broken in Linux
12+
* `FIX` Fix diagnostic completions incorrect textEdit.finish
13+
* `FIX` Comparison crash in doc export CLI [#3111](https://github.com/LuaLS/lua-language-server/issues/3111)
14+
715
## 3.16.0
816
`2025-12-2`
917
* `NEW` Support Lua 5.5

locale/en-us/script.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ DIAG_COSE_NON_OBJECT =
8989
DIAG_COUNT_DOWN_LOOP =
9090
'Do you mean `{}` ?'
9191
DIAG_UNKNOWN =
92-
'Can not infer type.'
92+
'Cannot infer type.'
9393
DIAG_DEPRECATED =
9494
'Deprecated.'
9595
DIAG_DIFFERENT_REQUIRES =

make/detect_platform.lua

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,37 @@ elseif platform.os == 'windows' then
2121
error "unknown platform"
2222
end
2323
elseif platform.os == 'linux' then
24-
if lm.platform == nil then
25-
elseif lm.platform == "linux-x64" then
26-
elseif lm.platform == "linux-arm64" then
27-
lm.cc = 'aarch64-linux-gnu-gcc'
24+
-- Use Zig for Linux builds to ensure glibc 2.17 compatibility
25+
local use_zig = os.getenv("USE_ZIG")
26+
if use_zig and use_zig ~= "0" and use_zig ~= "false" then
27+
-- Set compiler to zig wrapper script that filters out -lstdc++fs
28+
-- The wrapper is needed because bee.lua requires stdc++fs but Zig's libc++ already includes it
29+
local wrapper = lm.workdir .. '/zig-cc-wrapper.sh'
30+
lm.cc = wrapper
31+
lm.ar = 'zig ar'
32+
33+
if lm.platform == nil then
34+
-- Auto-detect and set target
35+
elseif lm.platform == "linux-x64" then
36+
-- Target glibc 2.17 for x86_64
37+
lm.flags = { '-target', 'x86_64-linux-gnu.2.17' }
38+
lm.ldflags = { '-target', 'x86_64-linux-gnu.2.17', '-lc++' }
39+
elseif lm.platform == "linux-arm64" then
40+
-- Target glibc 2.17 for aarch64
41+
lm.flags = { '-target', 'aarch64-linux-gnu.2.17' }
42+
lm.ldflags = { '-target', 'aarch64-linux-gnu.2.17', '-lc++' }
43+
else
44+
error "unknown platform"
45+
end
2846
else
29-
error "unknown platform"
47+
-- Use default GCC
48+
if lm.platform == nil then
49+
elseif lm.platform == "linux-x64" then
50+
elseif lm.platform == "linux-arm64" then
51+
lm.cc = 'aarch64-linux-gnu-gcc'
52+
else
53+
error "unknown platform"
54+
end
3055
end
3156
end
3257

script/cli/doc/export.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ function export.positionOf(rowcol)
7272
end
7373

7474
function export.sortDoc(a,b)
75-
if a.name ~= b.name then
75+
if a.name and b.name and a.name ~= b.name then
7676
return a.name < b.name
7777
end
7878

79-
if a.file ~= b.file then
79+
if a.file and b.file and a.file ~= b.file then
8080
return a.file < b.file
8181
end
8282

script/core/completion/completion.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1925,7 +1925,7 @@ local function tryluaDocBySource(state, position, source, results)
19251925
kind = define.CompletionItemKind.Enum,
19261926
textEdit = {
19271927
start = source.start,
1928-
finish = source.start + #source.mode - 1,
1928+
finish = source.start + #source.mode,
19291929
newText = mode,
19301930
},
19311931
}
@@ -1940,7 +1940,7 @@ local function tryluaDocBySource(state, position, source, results)
19401940
kind = define.CompletionItemKind.Value,
19411941
textEdit = {
19421942
start = source.start,
1943-
finish = source.start + #source[1] - 1,
1943+
finish = source.start + #source[1],
19441944
newText = name,
19451945
},
19461946
}

script/core/hint.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ local function paramName(uri, results, start, finish)
145145
and (paramConfig ~= 'Literal' or guide.isLiteral(arg)) then
146146
mark[arg] = true
147147
local param = params[i]
148-
if param and param[1] then
148+
if param and param[1] and param[1] ~= arg[1] then
149149
results[#results+1] = {
150150
text = param[1] .. ':',
151151
offset = arg.start,

0 commit comments

Comments
 (0)