2020-04-23 19:06:12 -05:00
|
|
|
//! Settings for tweaking completion.
|
|
|
|
//!
|
|
|
|
//! The fun thing here is `SnippetCap` -- this type can only be created in this
|
|
|
|
//! module, and we use to statically check that we only produce snippet
|
|
|
|
//! completions if we are allowed to.
|
|
|
|
|
2021-01-16 11:33:36 -06:00
|
|
|
use ide_db::helpers::{insert_use::InsertUseConfig, SnippetCap};
|
2020-11-10 15:40:07 -06:00
|
|
|
|
2020-04-23 19:01:23 -05:00
|
|
|
#[derive(Clone, Debug, PartialEq, Eq)]
|
|
|
|
pub struct CompletionConfig {
|
|
|
|
pub enable_postfix_completions: bool,
|
2021-01-05 02:34:03 -06:00
|
|
|
pub enable_imports_on_the_fly: bool,
|
2021-05-30 09:41:33 -05:00
|
|
|
pub enable_self_on_the_fly: bool,
|
2020-04-23 19:01:23 -05:00
|
|
|
pub add_call_parenthesis: bool,
|
|
|
|
pub add_call_argument_snippets: bool,
|
2020-04-23 19:06:12 -05:00
|
|
|
pub snippet_cap: Option<SnippetCap>,
|
2021-01-16 11:33:36 -06:00
|
|
|
pub insert_use: InsertUseConfig,
|
2020-04-23 19:06:12 -05:00
|
|
|
}
|