summaryrefslogtreecommitdiff
path: root/server-beta/src/core/diagnostics/redundant-parameter.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-11-10 22:52:40 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-11-10 22:52:40 +0800
commita36f8786bdf123fdaa894427e3ab2cdfa71da72a (patch)
tree816fa3c35a9af944a7e2070a3daecc3d60a9c7ce /server-beta/src/core/diagnostics/redundant-parameter.lua
parent4cc750f1c150930558bb721b5a73948b33549e42 (diff)
downloadlua-language-server-a36f8786bdf123fdaa894427e3ab2cdfa71da72a.zip
在一些性能热点中断
Diffstat (limited to 'server-beta/src/core/diagnostics/redundant-parameter.lua')
-rw-r--r--server-beta/src/core/diagnostics/redundant-parameter.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/server-beta/src/core/diagnostics/redundant-parameter.lua b/server-beta/src/core/diagnostics/redundant-parameter.lua
index 04012ef4..43bb93ed 100644
--- a/server-beta/src/core/diagnostics/redundant-parameter.lua
+++ b/server-beta/src/core/diagnostics/redundant-parameter.lua
@@ -3,7 +3,7 @@ local guide = require 'parser.guide'
local searcher = require 'searcher'
local lang = require 'language'
local define = require 'proto.define'
-local library = require 'library'
+local await = require 'await'
local function countLibraryArgs(source)
local func = searcher.getLibrary(source)
@@ -60,6 +60,10 @@ return function (uri, callback)
return
end
+ await.delay(function ()
+ return files.globalVersion
+ end)
+
local func = source.node
local funcArgs
searcher.eachRef(func, function (info)