summaryrefslogtreecommitdiff
path: root/script/provider/diagnostic.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-23 16:56:13 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-23 16:56:13 +0800
commit5d46db21e707be3b23655ef7fc1dfc41c36464a2 (patch)
tree3fa78dac7b5c9c78341e70db937367a3d3a694f0 /script/provider/diagnostic.lua
parentca632b4bbc66eea45e9cd90dccd6b7f895cac018 (diff)
downloadlua-language-server-5d46db21e707be3b23655ef7fc1dfc41c36464a2.zip
update
Diffstat (limited to 'script/provider/diagnostic.lua')
-rw-r--r--script/provider/diagnostic.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/script/provider/diagnostic.lua b/script/provider/diagnostic.lua
index 8085713e..90421c3e 100644
--- a/script/provider/diagnostic.lua
+++ b/script/provider/diagnostic.lua
@@ -275,7 +275,12 @@ function m.doDiagnostic(uri, isScopeDiag)
local diags = {}
local lastDiag = copyDiagsWithoutSyntax(m.cache[uri])
- local function pushResult()
+ local function pushResult(isComplete)
+ -- Disable incremental diagnosis.
+ -- The current diagnosis speed is good.
+ if not isComplete then
+ return
+ end
tracy.ZoneBeginN 'mergeSyntaxAndDiags'
local _ <close> = tracy.ZoneEnd
local full = mergeDiags(syntax, lastDiag, diags)
@@ -322,7 +327,7 @@ function m.doDiagnostic(uri, isScopeDiag)
end)
lastDiag = nil
- pushResult()
+ pushResult(true)
end
---@param uri uri