From a2e7ca99e046920b6fb46096dd10a0ab89ae0235 Mon Sep 17 00:00:00 2001 From: Ilya Biryukov Date: Mon, 31 Jul 2017 09:27:52 +0000 Subject: [PATCH] [clangd] Add ':' to completion trigger characters. Summary: Without it we don't get completion requests from VSCode after nested name qualifiers (e.g. after 'std::'). Reviewers: krasimir, bkramer Reviewed By: krasimir Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D35986 llvm-svn: 309550 --- clang-tools-extra/clangd/ClangdLSPServer.cpp | 2 +- clang-tools-extra/test/clangd/formatting.test | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/clang-tools-extra/clangd/ClangdLSPServer.cpp b/clang-tools-extra/clangd/ClangdLSPServer.cpp index 6577a6d3b48d..160a3320b569 100644 --- a/clang-tools-extra/clangd/ClangdLSPServer.cpp +++ b/clang-tools-extra/clangd/ClangdLSPServer.cpp @@ -86,7 +86,7 @@ void ClangdLSPServer::LSPProtocolCallbacks::onInitialize(StringRef ID, "documentRangeFormattingProvider": true, "documentOnTypeFormattingProvider": {"firstTriggerCharacter":"}","moreTriggerCharacter":[]}, "codeActionProvider": true, - "completionProvider": {"resolveProvider": false, "triggerCharacters": [".",">"]}, + "completionProvider": {"resolveProvider": false, "triggerCharacters": [".",">",":"]}, "definitionProvider": true }}})"); } diff --git a/clang-tools-extra/test/clangd/formatting.test b/clang-tools-extra/test/clangd/formatting.test index 08be62937dba..d1a8cd7f08e5 100644 --- a/clang-tools-extra/test/clangd/formatting.test +++ b/clang-tools-extra/test/clangd/formatting.test @@ -4,14 +4,14 @@ Content-Length: 125 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}} -# CHECK: Content-Length: 462 +# CHECK: Content-Length: 466 # CHECK: {"jsonrpc":"2.0","id":0,"result":{"capabilities":{ # CHECK: "textDocumentSync": 1, # CHECK: "documentFormattingProvider": true, # CHECK: "documentRangeFormattingProvider": true, # CHECK: "documentOnTypeFormattingProvider": {"firstTriggerCharacter":"}","moreTriggerCharacter":[]}, # CHECK: "codeActionProvider": true, -# CHECK: "completionProvider": {"resolveProvider": false, "triggerCharacters": [".",">"]}, +# CHECK: "completionProvider": {"resolveProvider": false, "triggerCharacters": [".",">",":"]}, # CHECK: "definitionProvider": true # CHECK: }}} #