forked from qt-creator/qt-creator
LanguageClient: disable diagnostics after document changes
Calculating new diagnostics after a document change can take a while. The old ClangCodeModel disabled diagnostics (changed the color to gray) that were reported before the last document change after some time. Adapt this behavior to Clangd and other LSP based codemodels. Change-Id: I0589ba0d0c023f6e7ea3e97fc5b45eb156ddcd37 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -918,6 +918,7 @@ void Client::documentContentsChanged(TextEditor::TextDocument *document,
|
||||
{
|
||||
if (!d->m_openedDocument.contains(document) || !reachable())
|
||||
return;
|
||||
d->m_diagnosticManager->disableDiagnostics(document);
|
||||
const QString method(DidChangeTextDocumentNotification::methodName);
|
||||
TextDocumentSyncKind syncKind = d->m_serverCapabilities.textDocumentSyncKindHelper();
|
||||
if (Utils::optional<bool> registered = d->m_dynamicCapabilities.isRegistered(method)) {
|
||||
|
||||
Reference in New Issue
Block a user