diff options
author | Jean Pierre <jeanp413@hotmail.com> | 2021-04-02 01:21:07 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-02 17:21:07 +1100 |
commit | 035f7b0ca037aaff37428d339b5f4abc796320fc (patch) | |
tree | 835ba72b435a64838cbc36e1343904566de67789 /cli/tests | |
parent | f50385b2a5c9bed99709522edc9ab759ce5f07ba (diff) |
feat(lsp): implement textDocument/foldingRange (#9900)
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/lsp/folding_range_did_open_notification.json | 12 | ||||
-rw-r--r-- | cli/tests/lsp/folding_range_request.json | 10 | ||||
-rw-r--r-- | cli/tests/lsp/initialize_request.json | 3 |
3 files changed, 25 insertions, 0 deletions
diff --git a/cli/tests/lsp/folding_range_did_open_notification.json b/cli/tests/lsp/folding_range_did_open_notification.json new file mode 100644 index 000000000..938d99751 --- /dev/null +++ b/cli/tests/lsp/folding_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": "// #region 1\n/*\n * Some comment\n */\nclass Foo {\n bar(a, b) {\n if (a === b) {\n return true;\n }\n return false;\n }\n}\n// #endregion" + } + } +} diff --git a/cli/tests/lsp/folding_range_request.json b/cli/tests/lsp/folding_range_request.json new file mode 100644 index 000000000..e82b6ec0b --- /dev/null +++ b/cli/tests/lsp/folding_range_request.json @@ -0,0 +1,10 @@ +{ + "jsonrpc": "2.0", + "id": 2, + "method": "textDocument/foldingRange", + "params": { + "textDocument": { + "uri": "file:///a/file.ts" + } + } +} diff --git a/cli/tests/lsp/initialize_request.json b/cli/tests/lsp/initialize_request.json index 21e9e3b4f..78679eb55 100644 --- a/cli/tests/lsp/initialize_request.json +++ b/cli/tests/lsp/initialize_request.json @@ -37,6 +37,9 @@ ] } }, + "foldingRange": { + "lineFoldingOnly": true + }, "synchronization": { "dynamicRegistration": true, "willSave": true, |