From fc4e8ef687ad996f96091c664c6a9110dd087a5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Sun, 26 Jun 2022 01:42:35 +0800 Subject: #1207 split `...(param)` and `...(return)` displayed in enums of hover --- script/core/hover/description.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'script') diff --git a/script/core/hover/description.lua b/script/core/hover/description.lua index c96aaae3..a0508cf9 100644 --- a/script/core/hover/description.lua +++ b/script/core/hover/description.lua @@ -206,6 +206,9 @@ local function getBindEnums(source, docGroup) for _, doc in ipairs(docGroup) do if doc.type == 'doc.param' then local name = doc.param[1] + if name == '...' then + name = '...(param)' + end if mark[name] then goto CONTINUE end @@ -215,6 +218,9 @@ local function getBindEnums(source, docGroup) for _, rtn in ipairs(doc.returns) do returnIndex = returnIndex + 1 local name = rtn.name and rtn.name[1] or ('return #%d'):format(returnIndex) + if name == '...' then + name = '...(return)' + end if mark[name] then goto CONTINUE end -- cgit v1.2.3