2020-04-24 00:06:12 +00: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-06 17:43:46 +00:00
|
|
|
use ide_db::helpers::{insert_use::MergeBehavior, SnippetCap};
|
2020-11-10 21:40:07 +00:00
|
|
|
|
2020-04-24 00:01:23 +00:00
|
|
|
#[derive(Clone, Debug, PartialEq, Eq)]
|
|
|
|
pub struct CompletionConfig {
|
|
|
|
pub enable_postfix_completions: bool,
|
2020-12-08 12:27:18 +00:00
|
|
|
pub enable_autoimport_completions: bool,
|
2020-04-24 00:01:23 +00:00
|
|
|
pub add_call_parenthesis: bool,
|
|
|
|
pub add_call_argument_snippets: bool,
|
2020-04-24 00:06:12 +00:00
|
|
|
pub snippet_cap: Option<SnippetCap>,
|
2020-12-10 14:41:57 +00:00
|
|
|
pub merge: Option<MergeBehavior>,
|
2020-04-24 00:06:12 +00:00
|
|
|
}
|