Skip to content

Commit efffa22

Browse files
committed
check client ability before diagnostic/refresh
1 parent e136cf1 commit efffa22

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

script/provider/diagnostic.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,12 @@ function m.pullDiagnosticScope(callback)
642642
end
643643

644644
function m.refreshClient()
645+
if not client.isReady() then
646+
return
647+
end
648+
if not client.getAbility 'workspace.diagnostics.refreshSupport' then
649+
return
650+
end
645651
log.debug('Refresh client diagnostics')
646652
proto.request('workspace/diagnostic/refresh', json.null)
647653
end

0 commit comments

Comments
 (0)