From e368c5d0f9d69e69438cb0a8a8deb49d7b02901a Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Mon, 8 Feb 2021 21:45:10 +1100 Subject: feat(lsp): add implementations code lens (#9441) --- cli/tests/lsp/code_lens_resolve_request_impl.json | 21 +++++++++++++++++++++ cli/tests/lsp/did_open_notification_cl_impl.json | 12 ++++++++++++ cli/tests/lsp/initialize_request.json | 1 + 3 files changed, 34 insertions(+) create mode 100644 cli/tests/lsp/code_lens_resolve_request_impl.json create mode 100644 cli/tests/lsp/did_open_notification_cl_impl.json (limited to 'cli/tests') diff --git a/cli/tests/lsp/code_lens_resolve_request_impl.json b/cli/tests/lsp/code_lens_resolve_request_impl.json new file mode 100644 index 000000000..e44d19675 --- /dev/null +++ b/cli/tests/lsp/code_lens_resolve_request_impl.json @@ -0,0 +1,21 @@ +{ + "jsonrpc": "2.0", + "id": 4, + "method": "codeLens/resolve", + "params": { + "range": { + "start": { + "line": 0, + "character": 10 + }, + "end": { + "line": 0, + "character": 11 + } + }, + "data": { + "specifier": "file:///a/file.ts", + "source": "implementations" + } + } +} diff --git a/cli/tests/lsp/did_open_notification_cl_impl.json b/cli/tests/lsp/did_open_notification_cl_impl.json new file mode 100644 index 000000000..eabcd7ccc --- /dev/null +++ b/cli/tests/lsp/did_open_notification_cl_impl.json @@ -0,0 +1,12 @@ +{ + "jsonrpc": "2.0", + "method": "textDocument/didOpen", + "params": { + "textDocument": { + "uri": "file:///a/file.ts", + "languageId": "typescript", + "version": 1, + "text": "interface A {\n b(): void;\n}\n\nclass B implements A {\n b() {\n console.log(\"b\");\n }\n}\n" + } + } +} diff --git a/cli/tests/lsp/initialize_request.json b/cli/tests/lsp/initialize_request.json index eaea00a18..21e9e3b4f 100644 --- a/cli/tests/lsp/initialize_request.json +++ b/cli/tests/lsp/initialize_request.json @@ -12,6 +12,7 @@ "initializationOptions": { "enable": true, "codeLens": { + "implementations": true, "references": true }, "lint": true, -- cgit v1.2.3