summaryrefslogtreecommitdiff
path: root/script-beta/parser/guide.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-10-30 15:32:11 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-10-30 15:32:11 +0800
commitaca5d65499c3af0fe0d73cd7ce69e7de2248b1e8 (patch)
tree19c2e6d7cb9e699aaa3e1438c4e12c44d430dbe3 /script-beta/parser/guide.lua
parent705e882703b837e44b1c6689d1fd90c7778f2c0f (diff)
downloadlua-language-server-aca5d65499c3af0fe0d73cd7ce69e7de2248b1e8.zip
优化 table 的hover性能
Diffstat (limited to 'script-beta/parser/guide.lua')
-rw-r--r--script-beta/parser/guide.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/script-beta/parser/guide.lua b/script-beta/parser/guide.lua
index 7144ebbe..e98a5d4d 100644
--- a/script-beta/parser/guide.lua
+++ b/script-beta/parser/guide.lua
@@ -19,13 +19,13 @@ local select = select
local osClock = os.clock
local DEVELOP = _G.DEVELOP
local log = log
-local debug = debug
+local _G = _G
local function logWarn(...)
log.warn(...)
end
-_ENV = nil
+local _ENV = nil
local m = {}
@@ -3529,7 +3529,9 @@ function m.searchInfer(status, obj)
return
end
- m.inferByDef(status, obj)
+ if status.deep then
+ m.inferByDef(status, obj)
+ end
m.inferBySet(status, obj)
m.inferByCall(status, obj)
m.inferByGetTable(status, obj)