diff options
Diffstat (limited to 'crates/ra_ide/src/lib.rs')
-rw-r--r-- | crates/ra_ide/src/lib.rs | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/crates/ra_ide/src/lib.rs b/crates/ra_ide/src/lib.rs index 0d91ea749..d888bb745 100644 --- a/crates/ra_ide/src/lib.rs +++ b/crates/ra_ide/src/lib.rs | |||
@@ -450,17 +450,12 @@ impl Analysis { | |||
450 | } | 450 | } |
451 | 451 | ||
452 | /// Computes completions at the given position. | 452 | /// Computes completions at the given position. |
453 | pub fn completions(&self, position: FilePosition) -> Cancelable<Option<Vec<CompletionItem>>> { | 453 | pub fn completions( |
454 | let opts = CompletionOptions { | 454 | &self, |
455 | enable_postfix_completions: self.feature_flags().get("completion.enable-postfix"), | 455 | position: FilePosition, |
456 | add_call_parenthesis: self | 456 | options: &CompletionOptions, |
457 | .feature_flags() | 457 | ) -> Cancelable<Option<Vec<CompletionItem>>> { |
458 | .get("completion.insertion.add-call-parenthesis"), | 458 | self.with_db(|db| completion::completions(db, position, options).map(Into::into)) |
459 | add_call_argument_snippets: self | ||
460 | .feature_flags() | ||
461 | .get("completion.insertion.add-argument-snippets"), | ||
462 | }; | ||
463 | self.with_db(|db| completion::completions(db, position, &opts).map(Into::into)) | ||
464 | } | 459 | } |
465 | 460 | ||
466 | /// Computes assists (aka code actions aka intentions) for the given | 461 | /// Computes assists (aka code actions aka intentions) for the given |