aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/completion.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/completion.rs')
-rw-r--r--crates/ra_ide/src/completion.rs23
1 files changed, 4 insertions, 19 deletions
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 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2 2
3mod completion_config;
3mod completion_item; 4mod completion_item;
4mod completion_context; 5mod completion_context;
5mod presentation; 6mod presentation;
@@ -28,27 +29,11 @@ use crate::{
28 FilePosition, 29 FilePosition,
29}; 30};
30 31
31pub use crate::completion::completion_item::{ 32pub use crate::completion::{
32 CompletionItem, CompletionItemKind, CompletionScore, InsertTextFormat, 33 completion_config::CompletionConfig,
34 completion_item::{CompletionItem, CompletionItemKind, CompletionScore, InsertTextFormat},
33}; 35};
34 36
35#[derive(Clone, Debug, PartialEq, Eq)]
36pub struct CompletionConfig {
37 pub enable_postfix_completions: bool,
38 pub add_call_parenthesis: bool,
39 pub add_call_argument_snippets: bool,
40}
41
42impl Default for CompletionConfig {
43 fn default() -> Self {
44 CompletionConfig {
45 enable_postfix_completions: true,
46 add_call_parenthesis: true,
47 add_call_argument_snippets: true,
48 }
49 }
50}
51
52/// Main entry point for completion. We run completion as a two-phase process. 37/// Main entry point for completion. We run completion as a two-phase process.
53/// 38///
54/// First, we look at the position and collect a so-called `CompletionContext. 39/// First, we look at the position and collect a so-called `CompletionContext.