aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion/presentation.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-08-22 13:17:21 +0100
committerGitHub <[email protected]>2019-08-22 13:17:21 +0100
commit0a612fad026df7c270226822e239f8d3137cf31c (patch)
treee14c62250a13f39860965b15d4e3d7e48d022d67 /crates/ra_ide_api/src/completion/presentation.rs
parent2d0931b9ba7aabdc634c799b32957cc6f057e875 (diff)
parent69bbe79c5037eb3cd00744593d1836e45a6f56e1 (diff)
Merge #1715
1715: Feature flags r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/completion/presentation.rs')
-rw-r--r--crates/ra_ide_api/src/completion/presentation.rs5
1 files changed, 4 insertions, 1 deletions
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 {
118 .set_documentation(func.docs(ctx.db)) 118 .set_documentation(func.docs(ctx.db))
119 .detail(detail); 119 .detail(detail);
120 // If not an import, add parenthesis automatically. 120 // If not an import, add parenthesis automatically.
121 if ctx.use_item_syntax.is_none() && !ctx.is_call { 121 if ctx.use_item_syntax.is_none()
122 && !ctx.is_call
123 && ctx.db.feature_flags.get("completion.insertion.add-call-parenthesis")
124 {
122 tested_by!(inserts_parens_for_function_calls); 125 tested_by!(inserts_parens_for_function_calls);
123 let snippet = 126 let snippet =
124 if data.params().is_empty() || data.has_self_param() && data.params().len() == 1 { 127 if data.params().is_empty() || data.has_self_param() && data.params().len() == 1 {