From afcea6c233dad9b1c3e8202b950d38bf0c472c40 Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Fri, 14 Oct 2022 23:04:38 +1100 Subject: fix(lsp): properly handle snippets on completions (#16274) Fixes #15367 --- cli/tests/testdata/lsp/initialize_params.json | 5 ++ .../testdata/lsp/initialize_params_no_snippet.json | 77 ++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 cli/tests/testdata/lsp/initialize_params_no_snippet.json (limited to 'cli/tests/testdata/lsp') diff --git a/cli/tests/testdata/lsp/initialize_params.json b/cli/tests/testdata/lsp/initialize_params.json index b076f3b17..68735b06d 100644 --- a/cli/tests/testdata/lsp/initialize_params.json +++ b/cli/tests/testdata/lsp/initialize_params.json @@ -56,6 +56,11 @@ ] } }, + "completion": { + "completionItem": { + "snippetSupport": true + } + }, "foldingRange": { "lineFoldingOnly": true }, diff --git a/cli/tests/testdata/lsp/initialize_params_no_snippet.json b/cli/tests/testdata/lsp/initialize_params_no_snippet.json new file mode 100644 index 000000000..b076f3b17 --- /dev/null +++ b/cli/tests/testdata/lsp/initialize_params_no_snippet.json @@ -0,0 +1,77 @@ +{ + "processId": 0, + "clientInfo": { + "name": "test-harness", + "version": "1.0.0" + }, + "rootUri": null, + "initializationOptions": { + "enable": true, + "cache": null, + "certificateStores": null, + "codeLens": { + "implementations": true, + "references": true, + "test": true + }, + "config": null, + "importMap": null, + "lint": true, + "suggest": { + "autoImports": true, + "completeFunctionCalls": false, + "names": true, + "paths": true, + "imports": { + "hosts": {} + } + }, + "testing": { + "args": [ + "--allow-all" + ], + "enable": true + }, + "tlsCertificate": null, + "unsafelyIgnoreCertificateErrors": null, + "unstable": false + }, + "capabilities": { + "textDocument": { + "codeAction": { + "codeActionLiteralSupport": { + "codeActionKind": { + "valueSet": [ + "quickfix", + "refactor" + ] + } + }, + "isPreferredSupport": true, + "dataSupport": true, + "disabledSupport": true, + "resolveSupport": { + "properties": [ + "edit" + ] + } + }, + "foldingRange": { + "lineFoldingOnly": true + }, + "synchronization": { + "dynamicRegistration": true, + "willSave": true, + "willSaveWaitUntil": true, + "didSave": true + } + }, + "workspace": { + "configuration": true, + "workspaceFolders": true + }, + "experimental": { + "testingApi": true + } + } +} -- cgit v1.2.3