summaryrefslogtreecommitdiff
path: root/script-beta/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-11-05 17:15:05 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-11-05 17:15:05 +0800
commitcb30a8f68bb18e210a2a2853aaaa583507bdf1b8 (patch)
tree21899cc66fd5375cfe0d38dcb4030bc64c8ea3ba /script-beta/core
parentdbb99f3919751bea59e8ffffcda9bb968c74a8f5 (diff)
downloadlua-language-server-cb30a8f68bb18e210a2a2853aaaa583507bdf1b8.zip
性能相关的选项
Diffstat (limited to 'script-beta/core')
-rw-r--r--script-beta/core/completion.lua7
-rw-r--r--script-beta/core/hover/table.lua2
2 files changed, 7 insertions, 2 deletions
diff --git a/script-beta/core/completion.lua b/script-beta/core/completion.lua
index 4f4f99c7..5dc8d80c 100644
--- a/script-beta/core/completion.lua
+++ b/script-beta/core/completion.lua
@@ -451,7 +451,12 @@ local function checkField(ast, word, start, offset, parent, oop, results)
end
local function checkGlobal(ast, word, start, offset, parent, oop, results)
- local refs = vm.getGlobals('*', 'fast')
+ local refs
+ if config.config.intelliSense.fastGlobal then
+ refs = vm.getGlobals('*', 'fast')
+ else
+ refs = vm.getGlobals('*')
+ end
checkFieldOfRefs(refs, ast, word, start, offset, parent, oop, results)
end
diff --git a/script-beta/core/hover/table.lua b/script-beta/core/hover/table.lua
index 35a5f337..75342925 100644
--- a/script-beta/core/hover/table.lua
+++ b/script-beta/core/hover/table.lua
@@ -240,7 +240,7 @@ return function (source)
if not literals[key] then
literals[key] = {}
end
- if not TEST and os.clock() - clock > 3 then
+ if not TEST and os.clock() - clock > config.config.hover.fieldInfer / 1000.0 then
timeUp = true
end
local class, literal = getField(src, timeUp, mark, key)