]> git.lizzy.rs Git - rust.git/blob - crates/completion/src/config.rs
58fc700f33d5c00ce75567fc317b2b1285645b5f
[rust.git] / crates / 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_autoimport_completions: bool,
13     pub add_call_parenthesis: bool,
14     pub add_call_argument_snippets: bool,
15     pub snippet_cap: Option<SnippetCap>,
16     pub insert_use: InsertUseConfig,
17 }