From 4832a22b6b8156230696a1b467b0ebf41953662a Mon Sep 17 00:00:00 2001 From: David Schulz Date: Wed, 24 Apr 2019 10:54:06 +0200 Subject: LSP: set completion trigger characters to assist provider Change-Id: I39bd9aca77d824b6533ea8e4c3aa704b9112be45 Reviewed-by: Nikolai Kosjar --- src/plugins/languageclient/client.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/plugins/languageclient') diff --git a/src/plugins/languageclient/client.cpp b/src/plugins/languageclient/client.cpp index 6484c6441d..12c8f86531 100644 --- a/src/plugins/languageclient/client.cpp +++ b/src/plugins/languageclient/client.cpp @@ -289,6 +289,11 @@ bool Client::openDocument(Core::IDocument *document) if (textDocument) { textDocument->completionAssistProvider(); m_resetAssistProvider << textDocument; + m_completionProvider.setTriggerCharacters( + m_serverCapabilities.completionProvider() + .value_or(ServerCapabilities::CompletionOptions()) + .triggerCharacters() + .value_or(QList())); textDocument->setCompletionAssistProvider(&m_completionProvider); textDocument->setQuickFixAssistProvider(&m_quickFixProvider); connect(textDocument, &QObject::destroyed, this, [this, textDocument]{ -- cgit v1.2.1