diff options
| author | Kitson Kelly <me@kitsonkelly.com> | 2020-12-07 21:46:39 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-07 21:46:39 +1100 |
| commit | 301d3e4b6849d24154ac2d65c00a9b30223d000e (patch) | |
| tree | ab3bc074493e6c9be8d1875233bc141bdc0da3b4 /cli/tests/lsp | |
| parent | c8e9b2654ec0d54c77bb3f49fa31c3986203d517 (diff) | |
feat: add mvp language server (#8515)
Resolves #8400
Diffstat (limited to 'cli/tests/lsp')
| -rw-r--r-- | cli/tests/lsp/did_open_notification.json | 12 | ||||
| -rw-r--r-- | cli/tests/lsp/exit_notification.json | 5 | ||||
| -rw-r--r-- | cli/tests/lsp/hover_request.json | 14 | ||||
| -rw-r--r-- | cli/tests/lsp/initialize_request.json | 23 | ||||
| -rw-r--r-- | cli/tests/lsp/initialized_notification.json | 5 | ||||
| -rw-r--r-- | cli/tests/lsp/shutdown_request.json | 6 |
6 files changed, 65 insertions, 0 deletions
diff --git a/cli/tests/lsp/did_open_notification.json b/cli/tests/lsp/did_open_notification.json new file mode 100644 index 000000000..04f12a7b3 --- /dev/null +++ b/cli/tests/lsp/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": "console.log(Deno.args);\n" + } + } +} diff --git a/cli/tests/lsp/exit_notification.json b/cli/tests/lsp/exit_notification.json new file mode 100644 index 000000000..799a0d1d5 --- /dev/null +++ b/cli/tests/lsp/exit_notification.json @@ -0,0 +1,5 @@ +{ + "jsonrpc": "2.0", + "method": "exit", + "params": null +} diff --git a/cli/tests/lsp/hover_request.json b/cli/tests/lsp/hover_request.json new file mode 100644 index 000000000..f12bd52df --- /dev/null +++ b/cli/tests/lsp/hover_request.json @@ -0,0 +1,14 @@ +{ + "jsonrpc": "2.0", + "id": 2, + "method": "textDocument/hover", + "params": { + "textDocument": { + "uri": "file:///a/file.ts" + }, + "position": { + "line": 0, + "character": 19 + } + } +} diff --git a/cli/tests/lsp/initialize_request.json b/cli/tests/lsp/initialize_request.json new file mode 100644 index 000000000..960420bfd --- /dev/null +++ b/cli/tests/lsp/initialize_request.json @@ -0,0 +1,23 @@ +{ + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "processId": 0, + "clientInfo": { + "name": "test-harness", + "version": "1.0.0" + }, + "rootUri": null, + "capabilities": { + "textDocument": { + "synchronization": { + "dynamicRegistration": true, + "willSave": true, + "willSaveWaitUntil": true, + "didSave": true + } + } + } + } +} diff --git a/cli/tests/lsp/initialized_notification.json b/cli/tests/lsp/initialized_notification.json new file mode 100644 index 000000000..972f8abc8 --- /dev/null +++ b/cli/tests/lsp/initialized_notification.json @@ -0,0 +1,5 @@ +{ + "jsonrpc": "2.0", + "method": "initialized", + "params": {} +} diff --git a/cli/tests/lsp/shutdown_request.json b/cli/tests/lsp/shutdown_request.json new file mode 100644 index 000000000..fd4d78460 --- /dev/null +++ b/cli/tests/lsp/shutdown_request.json @@ -0,0 +1,6 @@ +{ + "jsonrpc": "2.0", + "id": 3, + "method": "shutdown", + "params": null +} |
