diff options
| author | Yuki Tanaka <uki00a@gmail.com> | 2021-02-16 11:34:09 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-16 13:34:09 +1100 |
| commit | ccd6ee5c2394418c078f1a1be9e5cc1012829cbc (patch) | |
| tree | 34d289fd504a89493de295ae9cd9a1cc771fede6 /cli/tests | |
| parent | 3f5265b21ec578e543d09cdc9d8b19d9655aebd9 (diff) | |
feat(lsp): Implement `textDocument/signatureHelp` (#9330)
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
Diffstat (limited to 'cli/tests')
| -rw-r--r-- | cli/tests/lsp/signature_help_did_change_notification.json | 25 | ||||
| -rw-r--r-- | cli/tests/lsp/signature_help_did_open_notification.json | 12 | ||||
| -rw-r--r-- | cli/tests/lsp/signature_help_request_01.json | 19 | ||||
| -rw-r--r-- | cli/tests/lsp/signature_help_request_02.json | 14 |
4 files changed, 70 insertions, 0 deletions
diff --git a/cli/tests/lsp/signature_help_did_change_notification.json b/cli/tests/lsp/signature_help_did_change_notification.json new file mode 100644 index 000000000..f88eaa9ff --- /dev/null +++ b/cli/tests/lsp/signature_help_did_change_notification.json @@ -0,0 +1,25 @@ +{ + "jsonrpc": "2.0", + "method": "textDocument/didChange", + "params": { + "textDocument": { + "uri": "file:///a/file.ts", + "version": 2 + }, + "contentChanges": [ + { + "range": { + "start": { + "line": 9, + "character": 4 + }, + "end": { + "line": 9, + "character": 4 + } + }, + "text": "123, " + } + ] + } +} diff --git a/cli/tests/lsp/signature_help_did_open_notification.json b/cli/tests/lsp/signature_help_did_open_notification.json new file mode 100644 index 000000000..1ba1f7586 --- /dev/null +++ b/cli/tests/lsp/signature_help_did_open_notification.json @@ -0,0 +1,12 @@ +{ + "jsonrpc": "2.0", + "method": "textDocument/didOpen", + "params": { + "textDocument": { + "uri": "file:///a/file.ts", + "languageId": "typescript", + "version": 1, + "text": "/**\n * Adds two numbers.\n * @param a This is a first number.\n * @param b This is a second number.\n */\nfunction add(a: number, b: number) {\n return a + b;\n}\n\nadd(" + } + } +} diff --git a/cli/tests/lsp/signature_help_request_01.json b/cli/tests/lsp/signature_help_request_01.json new file mode 100644 index 000000000..c3e185e08 --- /dev/null +++ b/cli/tests/lsp/signature_help_request_01.json @@ -0,0 +1,19 @@ +{ + "jsonrpc": "2.0", + "id": 1, + "method": "textDocument/signatureHelp", + "params": { + "textDocument": { + "uri": "file:///a/file.ts" + }, + "position": { + "character": 4, + "line": 9 + }, + "context": { + "triggerKind": 2, + "triggerCharacter": "(", + "isRetrigger": false + } + } +} diff --git a/cli/tests/lsp/signature_help_request_02.json b/cli/tests/lsp/signature_help_request_02.json new file mode 100644 index 000000000..c2a6e0abb --- /dev/null +++ b/cli/tests/lsp/signature_help_request_02.json @@ -0,0 +1,14 @@ +{ + "id": 2, + "jsonrpc": "2.0", + "method": "textDocument/signatureHelp", + "params": { + "textDocument": { + "uri": "file:///a/file.ts" + }, + "position": { + "character": 8, + "line": 9 + } + } +} |
