aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion/src/config.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-02-17 14:53:31 +0000
committerAleksey Kladov <[email protected]>2021-02-17 14:53:31 +0000
commit3db64a400c78bbd2708e67ddc07df1001fff3f29 (patch)
tree5386aab9c452981be09bc3e4362643a34e6e3617 /crates/ide_completion/src/config.rs
parent6334ce866ab095215381c4b72692b20a84d26e96 (diff)
rename completion -> ide_completion
We don't have completion-related PRs in flight, so lets do it
Diffstat (limited to 'crates/ide_completion/src/config.rs')
-rw-r--r--crates/ide_completion/src/config.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/ide_completion/src/config.rs b/crates/ide_completion/src/config.rs
new file mode 100644
index 000000000..d70ed6c1c
--- /dev/null
+++ b/crates/ide_completion/src/config.rs
@@ -0,0 +1,17 @@
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
7use ide_db::helpers::{insert_use::InsertUseConfig, SnippetCap};
8
9#[derive(Clone, Debug, PartialEq, Eq)]
10pub struct CompletionConfig {
11 pub enable_postfix_completions: bool,
12 pub enable_imports_on_the_fly: 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}