Bump version to 19.1.0git
[llvm-project.git] / clang-tools-extra / clangd / test / initialize-params.test
blob7c96eb9835b713c61a7dad6658becb623172109e
1 # RUN: clangd -lit-test < %s | FileCheck -strict-whitespace %s
2 # Test initialize request parameters with rootUri
3 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootUri":"test:///workspace","capabilities":{},"trace":"off"}}
4 #      CHECK:  "id": 0,
5 # CHECK-NEXT:  "jsonrpc": "2.0",
6 # CHECK-NEXT:  "result": {
7 # CHECK-NEXT:    "capabilities": {
8 # CHECK-NEXT:      "astProvider": true,
9 # CHECK-NEXT:      "callHierarchyProvider": true,
10 # CHECK-NEXT:      "clangdInlayHintsProvider": true,
11 # CHECK-NEXT:      "codeActionProvider": true,
12 # CHECK-NEXT:      "compilationDatabase": {
13 # CHECK-NEXT:        "automaticReload": true
14 # CHECK-NEXT:      },
15 # CHECK-NEXT:      "completionProvider": {
16 # CHECK-NEXT:        "resolveProvider": false,
17 # CHECK-NEXT:        "triggerCharacters": [
18 # CHECK-NEXT:          ".",
19 # CHECK-NEXT:          "<",
20 # CHECK-NEXT:          ">",
21 # CHECK-NEXT:          ":",
22 # CHECK-NEXT:          "\"",
23 # CHECK-NEXT:          "/",
24 # CHECK-NEXT:          "*"
25 # CHECK-NEXT:        ]
26 # CHECK-NEXT:      },
27 # CHECK-NEXT:      "declarationProvider": true,
28 # CHECK-NEXT:      "definitionProvider": true,
29 # CHECK-NEXT:      "documentFormattingProvider": true,
30 # CHECK-NEXT:      "documentHighlightProvider": true,
31 # CHECK-NEXT:      "documentLinkProvider": {
32 # CHECK-NEXT:        "resolveProvider": false
33 # CHECK-NEXT:      }
34 # CHECK-NEXT:      "documentOnTypeFormattingProvider": {
35 # CHECK-NEXT:        "firstTriggerCharacter": "\n",
36 # CHECK-NEXT:        "moreTriggerCharacter": []
37 # CHECK-NEXT:      },
38 # CHECK-NEXT:      "documentRangeFormattingProvider": true,
39 # CHECK-NEXT:      "documentSymbolProvider": true,
40 # CHECK-NEXT:      "executeCommandProvider": {
41 # CHECK-NEXT:        "commands": [
42 # CHECK-NEXT:          "clangd.applyFix",
43 # CHECK-NEXT:          "clangd.applyRename"
44 # CHECK-NEXT:          "clangd.applyTweak"
45 # CHECK-NEXT:        ]
46 # CHECK-NEXT:      },
47 # CHECK-NEXT:      "foldingRangeProvider": true,
48 # CHECK-NEXT:      "hoverProvider": true,
49 # CHECK-NEXT:      "implementationProvider": true,
50 # CHECK-NEXT:      "inactiveRegionsProvider": true,
51 # CHECK-NEXT:      "inlayHintProvider": true,
52 # CHECK-NEXT:      "memoryUsageProvider": true,
53 # CHECK-NEXT:      "referencesProvider": true,
54 # CHECK-NEXT:      "renameProvider": true,
55 # CHECK-NEXT:      "selectionRangeProvider": true,
56 # CHECK-NEXT:      "semanticTokensProvider": {
57 # CHECK-NEXT:        "full": {
58 # CHECK-NEXT:          "delta": true
59 # CHECK-NEXT:        },
60 # CHECK-NEXT:        "legend": {
61 # CHECK-NEXT:          "tokenModifiers": [
62 # CHECK-NEXT:            "declaration",
63 # CHECK-NEXT:            "definition",
64 # CHECK-NEXT:            "deprecated",
65 # CHECK-NEXT:            "deduced",
66 # CHECK-NEXT:            "readonly",
67 # CHECK-NEXT:            "static",
68 # CHECK-NEXT:            "abstract",
69 # CHECK-NEXT:            "virtual",
70 # CHECK-NEXT:            "dependentName",
71 # CHECK-NEXT:            "defaultLibrary",
72 # CHECK-NEXT:            "usedAsMutableReference",
73 # CHECK-NEXT:            "usedAsMutablePointer",
74 # CHECK-NEXT:            "constructorOrDestructor",
75 # CHECK-NEXT:            "userDefined",
76 # CHECK-NEXT:            "functionScope",
77 # CHECK-NEXT:            "classScope",
78 # CHECK-NEXT:            "fileScope",
79 # CHECK-NEXT:            "globalScope"
80 # CHECK-NEXT:          ],
81 # CHECK-NEXT:          "tokenTypes": [
82 # CHECK-NEXT:            "variable",
83 # CHECK:               ]
84 # CHECK-NEXT:        },
85 # CHECK-NEXT:        "range": false
86 # CHECK-NEXT:      },
87 # CHECK-NEXT:      "signatureHelpProvider": {
88 # CHECK-NEXT:        "triggerCharacters": [
89 # CHECK-NEXT:          "(",
90 # CHECK-NEXT:          ")",
91 # CHECK-NEXT:          "{",
92 # CHECK-NEXT:          "}",
93 # CHECK-NEXT:          "<",
94 # CHECK-NEXT:          ">"
95 # CHECK-NEXT:          ","
96 # CHECK-NEXT:        ]
97 # CHECK-NEXT:      },
98 # CHECK-NEXT:      "standardTypeHierarchyProvider": true,
99 # CHECK-NEXT:      "textDocumentSync": {
100 # CHECK-NEXT:        "change": 2,
101 # CHECK-NEXT:        "openClose": true,
102 # CHECK-NEXT:        "save": true
103 # CHECK-NEXT:      },
104 # CHECK-NEXT:      "typeDefinitionProvider": true,
105 # CHECK-NEXT:      "typeHierarchyProvider": true
106 # CHECK-NEXT:      "workspaceSymbolProvider": true
107 # CHECK-NEXT:    },
108 # CHECK-NEXT:    "serverInfo": {
109 # CHECK-NEXT:      "name": "clangd",
110 # CHECK-NEXT:      "version": "{{.*}}clangd version {{.*}}"
111 # CHECK-NEXT:    }
112 # CHECK-NEXT:  }
114 {"jsonrpc":"2.0","id":3,"method":"shutdown"}
115 #      CHECK:  "id": 3,
116 # CHECK-NEXT:  "jsonrpc": "2.0",
117 # CHECK-NEXT:  "result": null
119 {"jsonrpc":"2.0","method":"exit"}