initialize-params.test
3.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# RUN: clangd -lit-test < %s | FileCheck -strict-whitespace %s
# Test initialize request parameters with rootUri
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootUri":"test:///workspace","capabilities":{},"trace":"off"}}
# CHECK: "id": 0,
# CHECK-NEXT: "jsonrpc": "2.0",
# CHECK-NEXT: "result": {
# CHECK-NEXT: "capabilities": {
# CHECK-NEXT: "codeActionProvider": true,
# CHECK-NEXT: "completionProvider": {
# CHECK-NEXT: "allCommitCharacters": [
# CHECK-NEXT: " ",
# CHECK-NEXT: "\t",
# CHECK-NEXT: "(",
# CHECK-NEXT: ")",
# CHECK-NEXT: "[",
# CHECK-NEXT: "]",
# CHECK-NEXT: "{",
# CHECK-NEXT: "}",
# CHECK-NEXT: "<",
# CHECK-NEXT: ">",
# CHECK-NEXT: ":",
# CHECK-NEXT: ";",
# CHECK-NEXT: ",",
# CHECK-NEXT: "+",
# CHECK-NEXT: "-",
# CHECK-NEXT: "/",
# CHECK-NEXT: "*",
# CHECK-NEXT: "%",
# CHECK-NEXT: "^",
# CHECK-NEXT: "&",
# CHECK-NEXT: "#",
# CHECK-NEXT: "?",
# CHECK-NEXT: ".",
# CHECK-NEXT: "=",
# CHECK-NEXT: "\"",
# CHECK-NEXT: "'",
# CHECK-NEXT: "|"
# CHECK-NEXT: ],
# CHECK-NEXT: "resolveProvider": false,
# CHECK-NEXT: "triggerCharacters": [
# CHECK-NEXT: ".",
# CHECK-NEXT: "<",
# CHECK-NEXT: ">",
# CHECK-NEXT: ":",
# CHECK-NEXT: "\"",
# CHECK-NEXT: "/"
# CHECK-NEXT: ]
# CHECK-NEXT: },
# CHECK-NEXT: "declarationProvider": true,
# CHECK-NEXT: "definitionProvider": true,
# CHECK-NEXT: "documentFormattingProvider": true,
# CHECK-NEXT: "documentHighlightProvider": true,
# CHECK-NEXT: "documentLinkProvider": {
# CHECK-NEXT: "resolveProvider": false
# CHECK-NEXT: }
# CHECK-NEXT: "documentOnTypeFormattingProvider": {
# CHECK-NEXT: "firstTriggerCharacter": "\n",
# CHECK-NEXT: "moreTriggerCharacter": []
# CHECK-NEXT: },
# CHECK-NEXT: "documentRangeFormattingProvider": true,
# CHECK-NEXT: "documentSymbolProvider": true,
# CHECK-NEXT: "executeCommandProvider": {
# CHECK-NEXT: "commands": [
# CHECK-NEXT: "clangd.applyFix",
# CHECK-NEXT: "clangd.applyTweak"
# CHECK-NEXT: ]
# CHECK-NEXT: },
# CHECK-NEXT: "hoverProvider": true,
# CHECK-NEXT: "referencesProvider": true,
# CHECK-NEXT: "renameProvider": true,
# CHECK-NEXT: "selectionRangeProvider": true,
# CHECK-NEXT: "semanticTokensProvider": {
# CHECK-NEXT: "full": {
# CHECK-NEXT: "delta": true
# CHECK-NEXT: },
# CHECK-NEXT: "legend": {
# CHECK-NEXT: "tokenModifiers": [],
# CHECK-NEXT: "tokenTypes": [
# CHECK-NEXT: "variable",
# CHECK: ]
# CHECK-NEXT: },
# CHECK-NEXT: "range": false
# CHECK-NEXT: },
# CHECK-NEXT: "signatureHelpProvider": {
# CHECK-NEXT: "triggerCharacters": [
# CHECK-NEXT: "(",
# CHECK-NEXT: ","
# CHECK-NEXT: ]
# CHECK-NEXT: },
# CHECK-NEXT: "textDocumentSync": {
# CHECK-NEXT: "change": 2,
# CHECK-NEXT: "openClose": true,
# CHECK-NEXT: "save": true
# CHECK-NEXT: },
# CHECK-NEXT: "typeHierarchyProvider": true
# CHECK-NEXT: "workspaceSymbolProvider": true
# CHECK-NEXT: },
# CHECK-NEXT: "serverInfo": {
# CHECK-NEXT: "name": "clangd",
# CHECK-NEXT: "version": "{{.*}}clangd version {{.*}}"
# CHECK-NEXT: }
# CHECK-NEXT: }
---
{"jsonrpc":"2.0","id":3,"method":"shutdown"}
# CHECK: "id": 3,
# CHECK-NEXT: "jsonrpc": "2.0",
# CHECK-NEXT: "result": null
---
{"jsonrpc":"2.0","method":"exit"}