]> git.lizzy.rs Git - rust.git/blob - crates/ide_completion/src/config.rs
Merge #9765
[rust.git] / crates / ide_completion / src / config.rs
1 //! Settings for tweaking completion.
2 //!
3 //! The fun thing here is `SnippetCap` -- this type can only be created in this
4 //! module, and we use to statically check that we only produce snippet
5 //! completions if we are allowed to.
6
7 use ide_db::helpers::{insert_use::InsertUseConfig, SnippetCap};
8
9 #[derive(Clone, Debug, PartialEq, Eq)]
10 pub struct CompletionConfig {
11     pub enable_postfix_completions: bool,
12     pub enable_imports_on_the_fly: bool,
13     pub enable_self_on_the_fly: bool,
14     pub add_call_parenthesis: bool,
15     pub add_call_argument_snippets: bool,
16     pub snippet_cap: Option<SnippetCap>,
17     pub insert_use: InsertUseConfig,
18 }