|
| 1 | +# RUN: mkdir -p %t/clangd |
| 2 | + |
| 3 | +# Create a config file that configures to use CommentFormat Markdown. |
| 4 | +# RUN: echo 'Documentation:' > %t/clangd/config.yaml |
| 5 | +# RUN: echo ' CommentFormat: Markdown' >> %t/clangd/config.yaml |
| 6 | +# RUN: env XDG_CONFIG_HOME=%t clangd -lit-test -enable-config < %s | FileCheck -strict-whitespace %s |
| 7 | +# Start a session. |
| 8 | +{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{"textDocument": {"signatureHelp": {"signatureInformation": {"documentationFormat": ["markdown", "plaintext"]}}}},"trace":"off"}} |
| 9 | +--- |
| 10 | +{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"// comment `markdown` _noescape_\nvoid x(int);\nint main(){\nx("}}} |
| 11 | +--- |
| 12 | +{"jsonrpc":"2.0","id":1,"method":"textDocument/signatureHelp","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":3,"character":2}}} |
| 13 | +# CHECK: "id": 1, |
| 14 | +# CHECK-NEXT: "jsonrpc": "2.0", |
| 15 | +# CHECK-NEXT: "result": { |
| 16 | +# CHECK-NEXT: "activeParameter": 0, |
| 17 | +# CHECK-NEXT: "activeSignature": 0, |
| 18 | +# CHECK-NEXT: "signatures": [ |
| 19 | +# CHECK-NEXT: { |
| 20 | +# CHECK-NEXT: "documentation": { |
| 21 | +# CHECK-NEXT: "kind": "markdown", |
| 22 | +# CHECK-NEXT: "value": "comment `markdown` _noescape_" |
| 23 | +# CHECK-NEXT: }, |
| 24 | +# CHECK-NEXT: "label": "x(int) -> void", |
| 25 | +# CHECK-NEXT: "parameters": [ |
| 26 | +# CHECK-NEXT: { |
| 27 | +# CHECK-NEXT: "label": "int" |
| 28 | +# CHECK-NEXT: } |
| 29 | +# CHECK-NEXT: ] |
| 30 | +# CHECK-NEXT: } |
| 31 | +# CHECK-NEXT: ] |
| 32 | +# CHECK-NEXT: } |
| 33 | +--- |
| 34 | +{"jsonrpc":"2.0","id":100000,"method":"shutdown"} |
| 35 | +--- |
| 36 | +{"jsonrpc":"2.0","method":"exit"} |
0 commit comments