diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-23 17:38:38 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-23 17:38:38 +0800 |
commit | 61d9a99cb32487defbf72486d079e9c7324e4e51 (patch) | |
tree | dc1f81dfb50ac5e0254ededb101611f8bf48c6ac /script/provider | |
parent | 5d46db21e707be3b23655ef7fc1dfc41c36464a2 (diff) | |
download | lua-language-server-61d9a99cb32487defbf72486d079e9c7324e4e51.zip |
update
Diffstat (limited to 'script/provider')
-rw-r--r-- | script/provider/diagnostic.lua | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/script/provider/diagnostic.lua b/script/provider/diagnostic.lua index 90421c3e..713d4f48 100644 --- a/script/provider/diagnostic.lua +++ b/script/provider/diagnostic.lua @@ -275,12 +275,7 @@ function m.doDiagnostic(uri, isScopeDiag) local diags = {} local lastDiag = copyDiagsWithoutSyntax(m.cache[uri]) - local function pushResult(isComplete) - -- Disable incremental diagnosis. - -- The current diagnosis speed is good. - if not isComplete then - return - end + local function pushResult() tracy.ZoneBeginN 'mergeSyntaxAndDiags' local _ <close> = tracy.ZoneEnd local full = mergeDiags(syntax, lastDiag, diags) @@ -310,7 +305,7 @@ function m.doDiagnostic(uri, isScopeDiag) xpcall(core, log.error, uri, isScopeDiag, function (result) diags[#diags+1] = buildDiagnostic(uri, result) - if not isScopeDiag and time.time() - lastPushClock >= 200 then + if not isScopeDiag and time.time() - lastPushClock >= 1000 then lastPushClock = time.time() pushResult() end @@ -327,7 +322,7 @@ function m.doDiagnostic(uri, isScopeDiag) end) lastDiag = nil - pushResult(true) + pushResult() end ---@param uri uri |