diff options
author | Aleksey Kladov <[email protected]> | 2019-08-22 12:44:16 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-08-22 13:07:31 +0100 |
commit | 69bbe79c5037eb3cd00744593d1836e45a6f56e1 (patch) | |
tree | fc48327d9d70b320c60e6c9fc19fdc5bdbff88f9 /crates/ra_ide_api/src/completion | |
parent | 4dd5afb7fe2eb20748ade9141e74b04f5dd2f922 (diff) |
implement feature flags
Diffstat (limited to 'crates/ra_ide_api/src/completion')
-rw-r--r-- | crates/ra_ide_api/src/completion/presentation.rs | 5 |
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 { |