brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · c8a7df8 Raw
41 lines · plain
1# We specify a custom path in XDG_CONFIG_HOME, which only works on some systems.2# UNSUPPORTED: system-windows3# UNSUPPORTED: system-darwin4 5# RUN: mkdir -p %t/clangd6 7# Create a config file that configures to use CommentFormat Markdown.8# RUN: echo 'Documentation:' > %t/clangd/config.yaml9# RUN: echo '  CommentFormat: Markdown' >> %t/clangd/config.yaml10# RUN: env XDG_CONFIG_HOME=%t clangd -lit-test -enable-config < %s | FileCheck -strict-whitespace %s11# Start a session.12{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{"textDocument": {"signatureHelp": {"signatureInformation": {"documentationFormat": ["markdown", "plaintext"]}}}},"trace":"off"}}13---14{"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("}}}15---16{"jsonrpc":"2.0","id":1,"method":"textDocument/signatureHelp","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":3,"character":2}}}17#      CHECK: "id": 1,18# CHECK-NEXT: "jsonrpc": "2.0",19# CHECK-NEXT: "result": {20# CHECK-NEXT:   "activeParameter": 0,21# CHECK-NEXT:   "activeSignature": 0,22# CHECK-NEXT:   "signatures": [23# CHECK-NEXT:     {24# CHECK-NEXT:       "documentation": {25# CHECK-NEXT:         "kind": "markdown",26# CHECK-NEXT:         "value": "comment `markdown` _noescape_"27# CHECK-NEXT:       },28# CHECK-NEXT:       "label": "x(int) -> void",29# CHECK-NEXT:       "parameters": [30# CHECK-NEXT:         {31# CHECK-NEXT:           "label": "int"32# CHECK-NEXT:         }33# CHECK-NEXT:       ]34# CHECK-NEXT:     }35# CHECK-NEXT:   ]36# CHECK-NEXT: }37---38{"jsonrpc":"2.0","id":100000,"method":"shutdown"}39---40{"jsonrpc":"2.0","method":"exit"}41