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.applyTweak"
46 # CHECK-NEXT: "foldingRangeProvider": true,
47 # CHECK-NEXT: "hoverProvider": true,
48 # CHECK-NEXT: "implementationProvider": true,
49 # CHECK-NEXT: "inactiveRegionsProvider": true,
50 # CHECK-NEXT: "inlayHintProvider": true,
51 # CHECK-NEXT: "memoryUsageProvider": true,
52 # CHECK-NEXT: "referencesProvider": true,
53 # CHECK-NEXT: "renameProvider": true,
54 # CHECK-NEXT: "selectionRangeProvider": true,
55 # CHECK-NEXT: "semanticTokensProvider": {
56 # CHECK-NEXT: "full": {
57 # CHECK-NEXT: "delta": true
59 # CHECK-NEXT: "legend": {
60 # CHECK-NEXT: "tokenModifiers": [
61 # CHECK-NEXT: "declaration",
62 # CHECK-NEXT: "definition",
63 # CHECK-NEXT: "deprecated",
64 # CHECK-NEXT: "deduced",
65 # CHECK-NEXT: "readonly",
66 # CHECK-NEXT: "static",
67 # CHECK-NEXT: "abstract",
68 # CHECK-NEXT: "virtual",
69 # CHECK-NEXT: "dependentName",
70 # CHECK-NEXT: "defaultLibrary",
71 # CHECK-NEXT: "usedAsMutableReference",
72 # CHECK-NEXT: "usedAsMutablePointer",
73 # CHECK-NEXT: "constructorOrDestructor",
74 # CHECK-NEXT: "userDefined",
75 # CHECK-NEXT: "functionScope",
76 # CHECK-NEXT: "classScope",
77 # CHECK-NEXT: "fileScope",
78 # CHECK-NEXT: "globalScope"
80 # CHECK-NEXT: "tokenTypes": [
81 # CHECK-NEXT: "variable",
84 # CHECK-NEXT: "range": false
86 # CHECK-NEXT: "signatureHelpProvider": {
87 # CHECK-NEXT: "triggerCharacters": [
97 # CHECK-NEXT: "standardTypeHierarchyProvider": true,
98 # CHECK-NEXT: "textDocumentSync": {
99 # CHECK-NEXT: "change": 2,
100 # CHECK-NEXT: "openClose": true,
101 # CHECK-NEXT: "save": true
103 # CHECK-NEXT: "typeDefinitionProvider": true,
104 # CHECK-NEXT: "typeHierarchyProvider": true
105 # CHECK-NEXT: "workspaceSymbolProvider": true
107 # CHECK-NEXT: "serverInfo": {
108 # CHECK-NEXT: "name": "clangd",
109 # CHECK-NEXT: "version": "{{.*}}clangd version {{.*}}"
113 {"jsonrpc":"2.0","id":3,"method":"shutdown"}
115 # CHECK-NEXT: "jsonrpc": "2.0",
116 # CHECK-NEXT: "result": null
118 {"jsonrpc":"2.0","method":"exit"}