diff options
author | Seivan Heidari <[email protected]> | 2019-11-12 08:46:35 +0000 |
---|---|---|
committer | Seivan Heidari <[email protected]> | 2019-11-12 08:46:35 +0000 |
commit | 11755f3eff87cd8ee0af7961377e0ae3ffea5050 (patch) | |
tree | 5b271a7c45f4e56e4f4b5c030b71080515e0e208 | |
parent | e847822cec025e483109cddee9c5dadc91ce1eab (diff) | |
parent | aa0646be29e80db3d8ab3a797b9fadd6c8b2c6e1 (diff) |
Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into feature/themes
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_postfix.rs | 4 | ||||
-rw-r--r-- | crates/ra_ide_api/src/feature_flags.rs | 1 | ||||
-rw-r--r-- | docs/user/README.md | 2 |
3 files changed, 7 insertions, 0 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_postfix.rs b/crates/ra_ide_api/src/completion/complete_postfix.rs index 4f9565441..99fed8689 100644 --- a/crates/ra_ide_api/src/completion/complete_postfix.rs +++ b/crates/ra_ide_api/src/completion/complete_postfix.rs | |||
@@ -13,6 +13,10 @@ use crate::{ | |||
13 | }; | 13 | }; |
14 | 14 | ||
15 | pub(super) fn complete_postfix(acc: &mut Completions, ctx: &CompletionContext) { | 15 | pub(super) fn complete_postfix(acc: &mut Completions, ctx: &CompletionContext) { |
16 | if ctx.db.feature_flags.get("completion.enable-postfix") == false { | ||
17 | return; | ||
18 | } | ||
19 | |||
16 | let dot_receiver = match &ctx.dot_receiver { | 20 | let dot_receiver = match &ctx.dot_receiver { |
17 | Some(it) => it, | 21 | Some(it) => it, |
18 | None => return, | 22 | None => return, |
diff --git a/crates/ra_ide_api/src/feature_flags.rs b/crates/ra_ide_api/src/feature_flags.rs index d3ca7be03..de4ae513d 100644 --- a/crates/ra_ide_api/src/feature_flags.rs +++ b/crates/ra_ide_api/src/feature_flags.rs | |||
@@ -54,6 +54,7 @@ impl Default for FeatureFlags { | |||
54 | FeatureFlags::new(&[ | 54 | FeatureFlags::new(&[ |
55 | ("lsp.diagnostics", true), | 55 | ("lsp.diagnostics", true), |
56 | ("completion.insertion.add-call-parenthesis", true), | 56 | ("completion.insertion.add-call-parenthesis", true), |
57 | ("completion.enable-postfix", true), | ||
57 | ("notifications.workspace-loaded", true), | 58 | ("notifications.workspace-loaded", true), |
58 | ]) | 59 | ]) |
59 | } | 60 | } |
diff --git a/docs/user/README.md b/docs/user/README.md index 909e574d0..eac9c50d2 100644 --- a/docs/user/README.md +++ b/docs/user/README.md | |||
@@ -116,6 +116,8 @@ host. | |||
116 | "lsp.diagnostics": true, | 116 | "lsp.diagnostics": true, |
117 | // Automatically insert `()` and `<>` when completing functions and types. | 117 | // Automatically insert `()` and `<>` when completing functions and types. |
118 | "completion.insertion.add-call-parenthesis": true, | 118 | "completion.insertion.add-call-parenthesis": true, |
119 | // Enable completions like `.if`, `.match`, etc. | ||
120 | "completion.enable-postfix": true, | ||
119 | // Show notification when workspace is fully loaded | 121 | // Show notification when workspace is fully loaded |
120 | "notifications.workspace-loaded": true, | 122 | "notifications.workspace-loaded": true, |
121 | } | 123 | } |