From bd3b2393903de2fc98a50426f36d14dc7e86d8da Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 24 Apr 2020 02:01:23 +0200 Subject: Move CompletionConfig to a separate module --- crates/ra_ide/src/completion.rs | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) (limited to 'crates/ra_ide/src/completion.rs') diff --git a/crates/ra_ide/src/completion.rs b/crates/ra_ide/src/completion.rs index 19bc4321c..f0e02180b 100644 --- a/crates/ra_ide/src/completion.rs +++ b/crates/ra_ide/src/completion.rs @@ -1,5 +1,6 @@ //! FIXME: write short doc here +mod completion_config; mod completion_item; mod completion_context; mod presentation; @@ -28,27 +29,11 @@ use crate::{ FilePosition, }; -pub use crate::completion::completion_item::{ - CompletionItem, CompletionItemKind, CompletionScore, InsertTextFormat, +pub use crate::completion::{ + completion_config::CompletionConfig, + completion_item::{CompletionItem, CompletionItemKind, CompletionScore, InsertTextFormat}, }; -#[derive(Clone, Debug, PartialEq, Eq)] -pub struct CompletionConfig { - pub enable_postfix_completions: bool, - pub add_call_parenthesis: bool, - pub add_call_argument_snippets: bool, -} - -impl Default for CompletionConfig { - fn default() -> Self { - CompletionConfig { - enable_postfix_completions: true, - add_call_parenthesis: true, - add_call_argument_snippets: true, - } - } -} - /// Main entry point for completion. We run completion as a two-phase process. /// /// First, we look at the position and collect a so-called `CompletionContext. -- cgit v1.2.3