summaryrefslogtreecommitdiff
path: root/script/core/hover/name.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-08 17:26:18 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-08 17:26:18 +0800
commit7c29a6012bf5fe2cc1ff79598f8be6f80528e767 (patch)
tree6afee29f52c8862bfe7d6e780022bfb6d4ecabd5 /script/core/hover/name.lua
parent4c71c56f925246618cce854ab9773311a7812055 (diff)
downloadlua-language-server-7c29a6012bf5fe2cc1ff79598f8be6f80528e767.zip
cleanup
Diffstat (limited to 'script/core/hover/name.lua')
-rw-r--r--script/core/hover/name.lua10
1 files changed, 4 insertions, 6 deletions
diff --git a/script/core/hover/name.lua b/script/core/hover/name.lua
index 1e1f733e..3fabfb89 100644
--- a/script/core/hover/name.lua
+++ b/script/core/hover/name.lua
@@ -50,14 +50,12 @@ end
local function asDocFunction(source, oop)
local doc = guide.getParentType(source, 'doc.type')
or guide.getParentType(source, 'doc.overload')
- if not doc or not doc.bindSources then
+ if not doc or not doc.bindSource then
return ''
end
- for _, src in ipairs(doc.bindSources) do
- local name = buildName(src, oop)
- if name ~= '' then
- return name
- end
+ local name = buildName(doc.bindSource, oop)
+ if name ~= '' then
+ return name
end
return ''
end