From c0af6e3569ac7893450d7aae08c6b38de5c976d0 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 24 Jul 2023 12:27:24 +0200 Subject: [PATCH] Fix for loop (with key) autocompletion The special-case for loop syntax does not exist anymore, but the pattern syntax covers the use case. Fixes #1778. --- crates/typst/src/ide/complete.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/typst/src/ide/complete.rs b/crates/typst/src/ide/complete.rs index 099454ef9..c633731cb 100644 --- a/crates/typst/src/ide/complete.rs +++ b/crates/typst/src/ide/complete.rs @@ -849,7 +849,7 @@ fn code_completions(ctx: &mut CompletionContext, hashtag: bool) { ctx.snippet_completion( "for loop (with key)", - "for ${key}, ${value} in ${(a: 1, b: 2)} {\n\t${}\n}", + "for (${key}, ${value}) in ${(a: 1, b: 2)} {\n\t${}\n}", "Computes or inserts something for each key and value in a collection.", );