summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-11-30 10:30:55 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-11-30 10:30:55 +0800
commitbf19cd77d0104a7d181c4fd3331f869c2cd4cea3 (patch)
tree2d7949573bba265af32f67e8679b52467fcca2e3
parentb40bd51dea3d6fb603cc437c17041938e985d29f (diff)
downloadlua-language-server-bf19cd77d0104a7d181c4fd3331f869c2cd4cea3.zip
fix unexpect diagnostic
-rw-r--r--script/provider/diagnostic.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/script/provider/diagnostic.lua b/script/provider/diagnostic.lua
index 496b06fc..bd8be8b1 100644
--- a/script/provider/diagnostic.lua
+++ b/script/provider/diagnostic.lua
@@ -124,6 +124,7 @@ function m.clear(uri)
uri = files.getOriginUri(luri) or uri,
diagnostics = {},
})
+ log.debug('clearDiagnostics', files.getOriginUri(uri))
end
function m.clearAll()
@@ -198,7 +199,9 @@ function m.doDiagnostic(uri)
uri = files.getOriginUri(uri),
diagnostics = full,
})
- log.debug('publishDiagnostics', uri, #full)
+ if #full > 0 then
+ log.debug('publishDiagnostics', files.getOriginUri(uri), #full)
+ end
end
if await.hasID 'diagnosticsAll' then
@@ -215,6 +218,7 @@ function m.doDiagnostic(uri)
m.diagnostics(uri, diags)
pushResult()
+ m.checkStepResult = nil
end
function m.refresh(uri)