From fb34a5ba06a747a5705b9be36c75d26cece956e2 Mon Sep 17 00:00:00 2001 From: Avishay Matayev Date: Tue, 3 Mar 2020 23:02:51 +0200 Subject: Support function's completion snippet Note that `detail` was replced with `function_signature` to avoid calling `from` on FunctionSignature twice. I didn't add new tests because the current ones seem enough. --- crates/ra_ide/src/completion/complete_scope.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_ide/src/completion/complete_scope.rs') diff --git a/crates/ra_ide/src/completion/complete_scope.rs b/crates/ra_ide/src/completion/complete_scope.rs index aad016d4a..2b9a0e556 100644 --- a/crates/ra_ide/src/completion/complete_scope.rs +++ b/crates/ra_ide/src/completion/complete_scope.rs @@ -38,7 +38,7 @@ mod tests { label: "quux(…)", source_range: [91; 91), delete: [91; 91), - insert: "quux($0)", + insert: "quux(${1:x})$0", kind: Function, lookup: "quux", detail: "fn quux(x: i32)", -- cgit v1.2.3