From ea065efb34ad658030335164bc6b2a4266b34347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Sat, 31 Oct 2020 14:13:53 +0800 Subject: =?UTF-8?q?hover=E6=94=AF=E6=8C=81=20overload?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script-beta/core/hover/init.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'script-beta/core/hover') diff --git a/script-beta/core/hover/init.lua b/script-beta/core/hover/init.lua index 5e7a4072..d0873c98 100644 --- a/script-beta/core/hover/init.lua +++ b/script-beta/core/hover/init.lua @@ -8,7 +8,7 @@ local findSource = require 'core.find-source' local lang = require 'language' local function getHoverAsFunction(source) - local values = vm.getInfers(source, 'deep') + local values = vm.getDefs(source, 'deep') local desc = getDesc(source) local labels = {} local defs = 0 @@ -18,8 +18,9 @@ local function getHoverAsFunction(source) or source.type == 'getmethod' or source.type == 'setmethod' for _, value in ipairs(values) do - if value.type == 'function' then - local label = getLabel(value.source, oop) + if value.type == 'function' + or value.type == 'doc.type.function' then + local label = getLabel(value, oop) if label then defs = defs + 1 labels[label] = (labels[label] or 0) + 1 -- cgit v1.2.3