summaryrefslogtreecommitdiff
path: root/script-beta/core/hover/description.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-11-04 14:36:59 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-11-04 14:36:59 +0800
commita57f43a4a892f591bf2a6974a07be6c4b89dd161 (patch)
tree89186724f8b6da30ec4be8020ff3b039dfe7410d /script-beta/core/hover/description.lua
parent2584309c9bb6de817ab1f785945a02bfe98b3e45 (diff)
downloadlua-language-server-a57f43a4a892f591bf2a6974a07be6c4b89dd161.zip
修正 hover 的一个bug
Diffstat (limited to 'script-beta/core/hover/description.lua')
-rw-r--r--script-beta/core/hover/description.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/script-beta/core/hover/description.lua b/script-beta/core/hover/description.lua
index ea2486a1..dfb260b0 100644
--- a/script-beta/core/hover/description.lua
+++ b/script-beta/core/hover/description.lua
@@ -181,6 +181,10 @@ local function tryLibrary(source)
end
local function tryDocComment(source)
+ if source.type == 'field'
+ or source.type == 'method' then
+ source = source.parent
+ end
if not source.bindDocs then
return
end