LanguageClient: do not auto-assign documents to all clients

Only assign documents to a client if the client was started by a
setting. Programatically started clients should handle assigned
documents manually.

Change-Id: I192c4c011a48e0406f267d3cab3c860f740ddad7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
David Schulz
2021-04-20 11:40:24 +02:00
parent 3d1ad9db60
commit d66b410adb
3 changed files with 13 additions and 2 deletions

View File

@@ -118,6 +118,7 @@ public:
// document synchronization
void setSupportedLanguage(const LanguageFilter &filter);
void setActivateDocumentAutomatically(bool enabled);
bool isSupportedDocument(const TextEditor::TextDocument *document) const;
bool isSupportedFile(const Utils::FilePath &filePath, const QString &mimeType) const;
bool isSupportedUri(const LanguageServerProtocol::DocumentUri &uri) const;
@@ -242,6 +243,7 @@ private:
QSet<TextEditor::IAssistProcessor *> m_runningAssistProcessors;
SymbolSupport m_symbolSupport;
ProgressManager m_progressManager;
bool m_activateDocAutomatically = false;
};
} // namespace LanguageClient