aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-04-24 01:39:07 +0100
committerAleksey Kladov <[email protected]>2020-04-24 01:41:07 +0100
commit440cd05edbe917ac33d5290fb35aa06f2f90cea2 (patch)
treecb11bd3002dd5bc2ecadb3449d4f5a5eb0d55aad /crates/ra_ide/src
parent5fd5de4061362aa1066cb9a47aa9cb79eab38e47 (diff)
Honor snippet capability
closes #2518
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r--crates/ra_ide/src/completion/completion_config.rs6
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
15impl 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)]
16pub struct SnippetCap { 22pub struct SnippetCap {
17 _private: (), 23 _private: (),