diff options
author | Jean Pierre <jeanp413@hotmail.com> | 2021-04-19 20:26:36 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-20 11:26:36 +1000 |
commit | 6d404ec54bab00d9f86c8d69a70dd94e5ab83434 (patch) | |
tree | 5c1d99cc17da1134b9fb728ff8e9689e00a1694c /cli/tests | |
parent | b6203cb4657f8269bf80b135b3c49fb9304895c1 (diff) |
feat(lsp): Implement textDocument/semanticTokens/full (#10233)
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/lsp/semantic_tokens_did_open_notification.json | 12 | ||||
-rw-r--r-- | cli/tests/lsp/semantic_tokens_full_request.json | 10 | ||||
-rw-r--r-- | cli/tests/lsp/semantic_tokens_range_request.json | 20 |
3 files changed, 42 insertions, 0 deletions
diff --git a/cli/tests/lsp/semantic_tokens_did_open_notification.json b/cli/tests/lsp/semantic_tokens_did_open_notification.json new file mode 100644 index 000000000..3bf1f6c44 --- /dev/null +++ b/cli/tests/lsp/semantic_tokens_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": "enum Values { value1, value2 }\n\nasync function baz(s: string): Promise<string> {\n const r = s.slice(0);\n return r;\n}\n\ninterface IFoo {\n readonly x: number;\n foo(): boolean;\n}\n\nclass Bar implements IFoo {\n constructor(public readonly x: number) { }\n foo() { return true; }\n static staticBar = new Bar(0);\n private static getStaticBar() { return Bar.staticBar; }\n}\n" + } + } +} diff --git a/cli/tests/lsp/semantic_tokens_full_request.json b/cli/tests/lsp/semantic_tokens_full_request.json new file mode 100644 index 000000000..748cc4382 --- /dev/null +++ b/cli/tests/lsp/semantic_tokens_full_request.json @@ -0,0 +1,10 @@ +{ + "jsonrpc": "2.0", + "id": 2, + "method": "textDocument/semanticTokens/full", + "params": { + "textDocument": { + "uri": "file:///a/file.ts" + } + } +} diff --git a/cli/tests/lsp/semantic_tokens_range_request.json b/cli/tests/lsp/semantic_tokens_range_request.json new file mode 100644 index 000000000..3b09944a1 --- /dev/null +++ b/cli/tests/lsp/semantic_tokens_range_request.json @@ -0,0 +1,20 @@ +{ + "jsonrpc": "2.0", + "id": 4, + "method": "textDocument/semanticTokens/range", + "params": { + "textDocument": { + "uri": "file:///a/file.ts" + }, + "range": { + "start": { + "line": 0, + "character": 0 + }, + "end": { + "line": 6, + "character": 0 + } + } + } +} |