diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-11-24 23:40:05 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-11-24 23:40:05 +0000 |
commit | 9b512f8569dda32fe2d12114adeed2f612d0190f (patch) | |
tree | de4a605a37481f12db88ae8fc9dc00cd2bc801b0 /crates/completion/src/config.rs | |
parent | 5478aaebfe4d9d2ad7745702932bf40b2cad226b (diff) | |
parent | 9812150047ea5f53631762e83ed25177e821857f (diff) |
Merge #6631
6631: Gate autoimports begind experimental completions flag r=kjeremy a=SomeoneToIgnore
Part of https://github.com/rust-analyzer/rust-analyzer/issues/6612
Adds a possibility to disable autoimports:
<img width="598" alt="image" src="https://user-images.githubusercontent.com/2690773/100156673-f8037f80-2eb1-11eb-8e74-59ebe4260ba3.png">
and other experimental completions we might want to add later.
Co-authored-by: Kirill Bulatov <[email protected]>
Diffstat (limited to 'crates/completion/src/config.rs')
-rw-r--r-- | crates/completion/src/config.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/completion/src/config.rs b/crates/completion/src/config.rs index 82874ff25..f50735372 100644 --- a/crates/completion/src/config.rs +++ b/crates/completion/src/config.rs | |||
@@ -9,6 +9,7 @@ use assists::utils::MergeBehaviour; | |||
9 | #[derive(Clone, Debug, PartialEq, Eq)] | 9 | #[derive(Clone, Debug, PartialEq, Eq)] |
10 | pub struct CompletionConfig { | 10 | pub struct CompletionConfig { |
11 | pub enable_postfix_completions: bool, | 11 | pub enable_postfix_completions: bool, |
12 | pub enable_experimental_completions: bool, | ||
12 | pub add_call_parenthesis: bool, | 13 | pub add_call_parenthesis: bool, |
13 | pub add_call_argument_snippets: bool, | 14 | pub add_call_argument_snippets: bool, |
14 | pub snippet_cap: Option<SnippetCap>, | 15 | pub snippet_cap: Option<SnippetCap>, |
@@ -30,6 +31,7 @@ impl Default for CompletionConfig { | |||
30 | fn default() -> Self { | 31 | fn default() -> Self { |
31 | CompletionConfig { | 32 | CompletionConfig { |
32 | enable_postfix_completions: true, | 33 | enable_postfix_completions: true, |
34 | enable_experimental_completions: true, | ||
33 | add_call_parenthesis: true, | 35 | add_call_parenthesis: true, |
34 | add_call_argument_snippets: true, | 36 | add_call_argument_snippets: true, |
35 | snippet_cap: Some(SnippetCap { _private: () }), | 37 | snippet_cap: Some(SnippetCap { _private: () }), |