From 77cfadf5321df90ea5fd625e2eb9d51b3920b437 Mon Sep 17 00:00:00 2001 From: Jean Pierre Date: Tue, 23 Mar 2021 18:33:25 -0500 Subject: feat(lsp): implement textDocument/selectionRange (#9845) Ref: #8643 --- cli/tests/lsp/selection_range_did_open_notification.json | 12 ++++++++++++ cli/tests/lsp/selection_range_request.json | 16 ++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 cli/tests/lsp/selection_range_did_open_notification.json create mode 100644 cli/tests/lsp/selection_range_request.json (limited to 'cli/tests/lsp') diff --git a/cli/tests/lsp/selection_range_did_open_notification.json b/cli/tests/lsp/selection_range_did_open_notification.json new file mode 100644 index 000000000..a6b3d9d39 --- /dev/null +++ b/cli/tests/lsp/selection_range_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": "class Foo {\n bar(a, b) {\n if (a === b) {\n return true;\n }\n return false;\n }\n}" + } + } +} diff --git a/cli/tests/lsp/selection_range_request.json b/cli/tests/lsp/selection_range_request.json new file mode 100644 index 000000000..5125fa6a0 --- /dev/null +++ b/cli/tests/lsp/selection_range_request.json @@ -0,0 +1,16 @@ +{ + "jsonrpc": "2.0", + "id": 2, + "method": "textDocument/selectionRange", + "params": { + "textDocument": { + "uri": "file:///a/file.ts" + }, + "positions": [ + { + "line": 2, + "character": 8 + } + ] + } +} -- cgit v1.2.3