diff --git a/crates/ra_ide/src/completion.rs b/crates/ra_ide/src/completion.rs index 19bc4321c18..f0e02180b50 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 @@ 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. diff --git a/crates/ra_ide/src/completion/completion_config.rs b/crates/ra_ide/src/completion/completion_config.rs new file mode 100644 index 00000000000..c01a8f60817 --- /dev/null +++ b/crates/ra_ide/src/completion/completion_config.rs @@ -0,0 +1,16 @@ +#[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, + } + } +}