diff options
Diffstat (limited to 'crates/ra_ide/src/completion.rs')
-rw-r--r-- | crates/ra_ide/src/completion.rs | 23 |
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 | ||
3 | mod completion_config; | ||
3 | mod completion_item; | 4 | mod completion_item; |
4 | mod completion_context; | 5 | mod completion_context; |
5 | mod presentation; | 6 | mod presentation; |
@@ -28,27 +29,11 @@ use crate::{ | |||
28 | FilePosition, | 29 | FilePosition, |
29 | }; | 30 | }; |
30 | 31 | ||
31 | pub use crate::completion::completion_item::{ | 32 | pub 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)] | ||
36 | pub struct CompletionConfig { | ||
37 | pub enable_postfix_completions: bool, | ||
38 | pub add_call_parenthesis: bool, | ||
39 | pub add_call_argument_snippets: bool, | ||
40 | } | ||
41 | |||
42 | impl 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. |