diff options
Diffstat (limited to 'crates/ra_ide')
-rw-r--r-- | crates/ra_ide/src/completion/completion_config.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/ra_ide/src/completion/completion_config.rs b/crates/ra_ide/src/completion/completion_config.rs index 6cf7ed6e4..71b49ace8 100644 --- a/crates/ra_ide/src/completion/completion_config.rs +++ b/crates/ra_ide/src/completion/completion_config.rs | |||
@@ -12,6 +12,12 @@ pub struct CompletionConfig { | |||
12 | pub snippet_cap: Option<SnippetCap>, | 12 | pub snippet_cap: Option<SnippetCap>, |
13 | } | 13 | } |
14 | 14 | ||
15 | impl CompletionConfig { | ||
16 | pub fn allow_snippets(&mut self, yes: bool) { | ||
17 | self.snippet_cap = if yes { Some(SnippetCap { _private: () }) } else { None } | ||
18 | } | ||
19 | } | ||
20 | |||
15 | #[derive(Clone, Copy, Debug, PartialEq, Eq)] | 21 | #[derive(Clone, Copy, Debug, PartialEq, Eq)] |
16 | pub struct SnippetCap { | 22 | pub struct SnippetCap { |
17 | _private: (), | 23 | _private: (), |