diff options
Diffstat (limited to 'script-beta')
-rw-r--r-- | script-beta/core/hover/table.lua | 7 | ||||
-rw-r--r-- | script-beta/provider/provider.lua | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/script-beta/core/hover/table.lua b/script-beta/core/hover/table.lua index 87c3b3e1..0da2a18b 100644 --- a/script-beta/core/hover/table.lua +++ b/script-beta/core/hover/table.lua @@ -227,7 +227,8 @@ return function (source) local clock = os.clock() local timeUp local mark = {} - for _, src in ipairs(vm.getFields(source, 'deep')) do + local fields = vm.getFields(source, 'deep') + for _, src in ipairs(fields) do local key = getKey(src) if not key then goto CONTINUE @@ -238,7 +239,7 @@ return function (source) if not literals[key] then literals[key] = {} end - if not TEST and os.clock() - clock > 5 then + if not TEST and os.clock() - clock > 3 then timeUp = true end local class, literal = getField(src, timeUp, mark, key) @@ -276,7 +277,7 @@ return function (source) end -- TODO if timeUp then - result = '\n-- TODO: Too much time has been spent, type inference has been abandoned. Optimize later.\n' .. result + result = '\n--出于性能考虑,已禁用了部分类型推断。\n' .. result end return result end diff --git a/script-beta/provider/provider.lua b/script-beta/provider/provider.lua index bf584935..c892bfee 100644 --- a/script-beta/provider/provider.lua +++ b/script-beta/provider/provider.lua @@ -85,6 +85,10 @@ proto.on('initialize', function (params) end return { capabilities = cap.initer, + serverInfo = { + name = 'sumneko.lua', + version = 'beta', + }, } end) |