From 423474caa88f658477ed9f2df1099b7037166c3a Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 20 Dec 2022 15:19:35 -0500 Subject: fix(lsp/format): language formatter used should be based on language id (#17148) Closes #11897 --- cli/tests/lsp_tests.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cli/tests') diff --git a/cli/tests/lsp_tests.rs b/cli/tests/lsp_tests.rs index 066f3efa8..8ed6a67d7 100644 --- a/cli/tests/lsp_tests.rs +++ b/cli/tests/lsp_tests.rs @@ -5339,7 +5339,9 @@ mod lsp { "textDocument/didOpen", json!({ "textDocument": { - "uri": "file:///a/file.json", + // Also test out using a non-json file extension here. + // What should matter is the language identifier. + "uri": "file:///a/file.lock", "languageId": "json", "version": 1, "text": "{\"key\":\"value\"}" @@ -5353,7 +5355,7 @@ mod lsp { "textDocument/formatting", json!({ "textDocument": { - "uri": "file:///a/file.json" + "uri": "file:///a/file.lock" }, "options": { "tabSize": 2, -- cgit v1.2.3