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"}}
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
15 # CHECK-NEXT: "completionProvider": {
16 # CHECK-NEXT: "resolveProvider": false,
17 # CHECK-NEXT: "triggerCharacters": [
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
34 # CHECK-NEXT: "documentOnTypeFormattingProvider": {
35 # CHECK-NEXT: "firstTriggerCharacter": "\n",
36 # CHECK-NEXT: "moreTriggerCharacter": []
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"
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
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"
81 # CHECK-NEXT: "tokenTypes": [
82 # CHECK-NEXT: "variable",
85 # CHECK-NEXT: "range": false
87 # CHECK-NEXT: "signatureHelpProvider": {
88 # CHECK-NEXT: "triggerCharacters": [
98 # CHECK-NEXT: "standardTypeHierarchyProvider": true,
99 # CHECK-NEXT: "textDocumentSync": {
100 # CHECK-NEXT: "change": 2,
101 # CHECK-NEXT: "openClose": true,
102 # CHECK-NEXT: "save": true
104 # CHECK-NEXT: "typeDefinitionProvider": true,
105 # CHECK-NEXT: "typeHierarchyProvider": true
106 # CHECK-NEXT: "workspaceSymbolProvider": true
108 # CHECK-NEXT: "serverInfo": {
109 # CHECK-NEXT: "name": "clangd",
110 # CHECK-NEXT: "version": "{{.*}}clangd version {{.*}}"
114 {"jsonrpc":"2.0","id":3,"method":"shutdown"}
116 # CHECK-NEXT: "jsonrpc": "2.0",
117 # CHECK-NEXT: "result": null
119 {"jsonrpc":"2.0","method":"exit"}