summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changelog.md1
-rw-r--r--script/core/signature.lua3
-rw-r--r--test/signature/init.lua16
3 files changed, 20 insertions, 0 deletions
diff --git a/changelog.md b/changelog.md
index e2a1203b..64c78f80 100644
--- a/changelog.md
+++ b/changelog.md
@@ -6,6 +6,7 @@
* `FIX` `diagnostics.workspaceDelay` can not prevent first workspace diagnostic
* `FIX` [#1476](https://github.com/sumneko/lua-language-server/issues/1476)
* `FIX` [#1493](https://github.com/sumneko/lua-language-server/issues/1493)
+* `FIX` [#1499](https://github.com/sumneko/lua-language-server/issues/1499)
## 3.5.3
`2022-8-13`
diff --git a/script/core/signature.lua b/script/core/signature.lua
index 21e954bf..c411d787 100644
--- a/script/core/signature.lua
+++ b/script/core/signature.lua
@@ -60,6 +60,9 @@ local function makeOneSignature(source, oop, index)
: gsub('%b()', function (str)
return ('_'):rep(#str)
end)
+ : gsub('%b{}', function (str)
+ return ('_'):rep(#str)
+ end)
: gsub('[%[%]%(%)]', '_')
for start, finish in converted:gmatch '%s*()[^,]+()' do
i = i + 1
diff --git a/test/signature/init.lua b/test/signature/init.lua
index 9c05f7c5..18a0fc30 100644
--- a/test/signature/init.lua
+++ b/test/signature/init.lua
@@ -300,3 +300,19 @@ X(1, <?2?>)
{
'function X(a: number, <!b: number!>)',
}
+
+TEST [[
+---@alias A { x:number, y:number, z:number }
+
+---comment
+---@param a A
+---@param b string
+function X(a, b)
+
+end
+
+X({}, <??>)
+]]
+{
+'function X(a: { x: number, y: number, z: number }, <!b: string!>)'
+}