diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-11-30 10:30:55 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-11-30 10:30:55 +0800 |
commit | bf19cd77d0104a7d181c4fd3331f869c2cd4cea3 (patch) | |
tree | 2d7949573bba265af32f67e8679b52467fcca2e3 | |
parent | b40bd51dea3d6fb603cc437c17041938e985d29f (diff) | |
download | lua-language-server-bf19cd77d0104a7d181c4fd3331f869c2cd4cea3.zip |
fix unexpect diagnostic
-rw-r--r-- | script/provider/diagnostic.lua | 6 |
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) |