aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-04-24 01:45:34 +0100
committerGitHub <[email protected]>2020-04-24 01:45:34 +0100
commit7410cfad215d7ffe503566f08fce7164218201e2 (patch)
treecb11bd3002dd5bc2ecadb3449d4f5a5eb0d55aad /crates/ra_ide
parent3a0a7081f4db293599bce5fab124cf258a946cb2 (diff)
parent440cd05edbe917ac33d5290fb35aa06f2f90cea2 (diff)
Merge #4117
4117: Honor snippet capability r=matklad a=matklad closes #2518 bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide')
-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: (),