From 69bbe79c5037eb3cd00744593d1836e45a6f56e1 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 22 Aug 2019 14:44:16 +0300 Subject: implement feature flags --- crates/ra_ide_api/src/completion/presentation.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'crates/ra_ide_api/src/completion') diff --git a/crates/ra_ide_api/src/completion/presentation.rs b/crates/ra_ide_api/src/completion/presentation.rs index 6878008d3..2b3f98482 100644 --- a/crates/ra_ide_api/src/completion/presentation.rs +++ b/crates/ra_ide_api/src/completion/presentation.rs @@ -118,7 +118,10 @@ impl Completions { .set_documentation(func.docs(ctx.db)) .detail(detail); // If not an import, add parenthesis automatically. - if ctx.use_item_syntax.is_none() && !ctx.is_call { + if ctx.use_item_syntax.is_none() + && !ctx.is_call + && ctx.db.feature_flags.get("completion.insertion.add-call-parenthesis") + { tested_by!(inserts_parens_for_function_calls); let snippet = if data.params().is_empty() || data.has_self_param() && data.params().len() == 1 { -- cgit v1.2.3