From 281a534973be7d66dd0d99b100b639fd137e205a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 5 Nov 2020 17:38:26 +0800 Subject: =?UTF-8?q?hover=E6=94=AF=E6=8C=81=E5=BF=AB=E9=80=9F=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E5=8F=98=E8=84=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script-beta/core/hover/table.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'script-beta/core/hover/table.lua') diff --git a/script-beta/core/hover/table.lua b/script-beta/core/hover/table.lua index 75342925..899306dc 100644 --- a/script-beta/core/hover/table.lua +++ b/script-beta/core/hover/table.lua @@ -73,12 +73,12 @@ end local function getFieldFull(src) local tp = vm.getInferType(src) - local class = vm.getClass(src) + --local class = vm.getClass(src) local literal = vm.getInferLiteral(src) if type(literal) == 'string' and #literal >= 50 then literal = literal:sub(1, 47) .. '...' end - return class or tp, literal + return tp, literal end local function getField(src, timeUp, mark, key) @@ -228,7 +228,13 @@ return function (source) local clock = os.clock() local timeUp local mark = {} - local fields = vm.getFields(source, 'deep') + local fields + if source.special == '_G' + and config.config.intelliSense.fastGlobal then + fields = vm.getGlobals('*', 'fast') + else + fields = vm.getFields(source, 'deep') + end for _, src in ipairs(fields) do local key = getKey(src) if not key then -- cgit v1.2.3