From bf582e77d6e5603149b355a5650cd4d15318f776 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 10 Mar 2020 18:47:09 +0100 Subject: Pull completion options up to the rust-analyzer --- crates/ra_ide/src/lib.rs | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'crates/ra_ide/src/lib.rs') 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 { } /// Computes completions at the given position. - pub fn completions(&self, position: FilePosition) -> Cancelable>> { - let opts = CompletionOptions { - enable_postfix_completions: self.feature_flags().get("completion.enable-postfix"), - add_call_parenthesis: self - .feature_flags() - .get("completion.insertion.add-call-parenthesis"), - add_call_argument_snippets: self - .feature_flags() - .get("completion.insertion.add-argument-snippets"), - }; - self.with_db(|db| completion::completions(db, position, &opts).map(Into::into)) + pub fn completions( + &self, + position: FilePosition, + options: &CompletionOptions, + ) -> Cancelable>> { + self.with_db(|db| completion::completions(db, position, options).map(Into::into)) } /// Computes assists (aka code actions aka intentions) for the given -- cgit v1.2.3