summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-11-27 15:34:00 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-11-27 15:34:00 +0800
commit11b3e32e8340d6d7974fa81918760b9ea065f1e0 (patch)
treeb3344cd1391658bdb80b4cc0491b7c9e16878fd9
parentcbde92feafae9807e20acf8bb10e438e27e24c39 (diff)
downloadlua-language-server-11b3e32e8340d6d7974fa81918760b9ea065f1e0.zip
change format
-rw-r--r--script/core/hover/description.lua2
-rw-r--r--test/crossfile/hover.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/script/core/hover/description.lua b/script/core/hover/description.lua
index 936d3ba3..73300f1d 100644
--- a/script/core/hover/description.lua
+++ b/script/core/hover/description.lua
@@ -138,7 +138,7 @@ local function getBindEnums(docGroup)
elseif doc.type == 'doc.return' then
for _, rtn in ipairs(doc.returns) do
returnIndex = returnIndex + 1
- local name = rtn.name and rtn.name[1] or ('(return %d)'):format(returnIndex)
+ local name = rtn.name and rtn.name[1] or ('return #%d'):format(returnIndex)
if mark[name] then
goto CONTINUE
end
diff --git a/test/crossfile/hover.lua b/test/crossfile/hover.lua
index edc029a2..cbd06bd2 100644
--- a/test/crossfile/hover.lua
+++ b/test/crossfile/hover.lua
@@ -415,7 +415,7 @@ function f()
name = 'f',
description = [[
```lua
-(return 1): option
+return #1: option
| '选项1' -- 注释1
-> '选项2' -- 注释2
```]]