[clang-tools-extra] 517f1d9 - [clangd] Add ) to signature-help triggers

Kadir Cetinkaya via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 15 05:56:55 PST 2021


Author: Kadir Cetinkaya
Date: 2021-12-15T14:56:27+01:00
New Revision: 517f1d9e5cd0b78b37eda83f58ed531f73b7a15c

URL: https://github.com/llvm/llvm-project/commit/517f1d9e5cd0b78b37eda83f58ed531f73b7a15c
DIFF: https://github.com/llvm/llvm-project/commit/517f1d9e5cd0b78b37eda83f58ed531f73b7a15c.diff

LOG: [clangd] Add ) to signature-help triggers

It is important for nested function calls.

Differential Revision: https://reviews.llvm.org/D115799

Added: 
    

Modified: 
    clang-tools-extra/clangd/ClangdLSPServer.cpp
    clang-tools-extra/clangd/test/initialize-params.test

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/ClangdLSPServer.cpp b/clang-tools-extra/clangd/ClangdLSPServer.cpp
index 3f0bff6e00032..93382466160c8 100644
--- a/clang-tools-extra/clangd/ClangdLSPServer.cpp
+++ b/clang-tools-extra/clangd/ClangdLSPServer.cpp
@@ -555,7 +555,7 @@ void ClangdLSPServer::onInitialize(const InitializeParams &Params,
        }},
       {"signatureHelpProvider",
        llvm::json::Object{
-           {"triggerCharacters", {"(", ","}},
+           {"triggerCharacters", {"(", ",", ")"}},
        }},
       {"declarationProvider", true},
       {"definitionProvider", true},

diff  --git a/clang-tools-extra/clangd/test/initialize-params.test b/clang-tools-extra/clangd/test/initialize-params.test
index 0e33bcd74903d..a79f1075118ac 100644
--- a/clang-tools-extra/clangd/test/initialize-params.test
+++ b/clang-tools-extra/clangd/test/initialize-params.test
@@ -107,7 +107,8 @@
 # CHECK-NEXT:      "signatureHelpProvider": {
 # CHECK-NEXT:        "triggerCharacters": [
 # CHECK-NEXT:          "(",
-# CHECK-NEXT:          ","
+# CHECK-NEXT:          ",",
+# CHECK-NEXT:          ")"
 # CHECK-NEXT:        ]
 # CHECK-NEXT:      },
 # CHECK-NEXT:      "textDocumentSync": {


        


More information about the cfe-commits mailing list