1 # RUN: clangd -lit-test < %s | FileCheck -strict-whitespace %s
2 # RUN: clangd -lit-test -pch-storage=memory < %s | FileCheck -strict-whitespace %s
6 "method": "initialize",
14 "snippetSupport": true
23 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"int func_with_args(int a, int b);\nint main() {\nfunc_with\n}"}}}
25 {"jsonrpc":"2.0","id":1,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":2,"character":7}}}
27 # CHECK-NEXT: "jsonrpc": "2.0",
28 # CHECK-NEXT: "result": {
29 # CHECK-NEXT: "isIncomplete": {{.*}}
30 # CHECK-NEXT: "items": [
31 # CHECK: "filterText": "func_with_args",
32 # CHECK-NEXT: "insertText": "func_with_args(${1:int a}, ${2:int b})",
33 # CHECK-NEXT: "insertTextFormat": 2,
34 # CHECK-NEXT: "kind": 3,
35 # CHECK-NEXT: "label": " func_with_args(int a, int b)",
36 # CHECK-NEXT: "score": {{[0-9]+.[0-9]+}},
37 # CHECK-NEXT: "sortText": "{{.*}}func_with_args"
38 # CHECK-NEXT: "textEdit": {
39 # CHECK-NEXT: "newText": "func_with_args(${1:int a}, ${2:int b})",
40 # CHECK-NEXT: "range": {
41 # CHECK-NEXT: "end": {
42 # CHECK-NEXT: "character": 7,
43 # CHECK-NEXT: "line": 2
45 # CHECK-NEXT: "start": {
46 # CHECK-NEXT: "character": 0,
47 # CHECK-NEXT: "line": 2
55 {"jsonrpc":"2.0","id":4,"method":"shutdown"}
57 {"jsonrpc":"2.0","method":"exit"}