on master help sign in
Allow infoboxes to be disabled (#972)
cfc8285Omnikar
book/src/configuration.md+1
@@ -22,6 +22,7 @@ To override global configuration parameters, create a `config.toml` file located
22| `auto-completion` | Enable automatic pop up of auto-completion. | `true` |
22| `auto-completion` | Enable automatic pop up of auto-completion. | `true` |
23| `idle-timeout` | Time in milliseconds since last keypress before idle timers trigger. Used for autocompletion, set to 0 for instant. | `400` |
23| `idle-timeout` | Time in milliseconds since last keypress before idle timers trigger. Used for autocompletion, set to 0 for instant. | `400` |
24| `completion-trigger-len` | The min-length of word under cursor to trigger autocompletion | `2` |
24| `completion-trigger-len` | The min-length of word under cursor to trigger autocompletion | `2` |
25+| `auto-info` | Whether to display infoboxes | `true` |
25
26
26## LSP
27## LSP
27
28
helix-term/src/ui/editor.rs+4−2
@@ -1086,8 +1086,10 @@ impl Component for EditorView {
1086 );
1086 );
1087 }
1087 }
1088
1088
1089+ if cx.editor.config.auto_info {
1089− if let Some(ref mut info) = self.autoinfo {
1090+ if let Some(ref mut info) = self.autoinfo {
1090− info.render(area, surface, cx);
1091+ info.render(area, surface, cx);
1092+ }
1091 }
1093 }
1092
1094
1093 let key_width = 15u16; // for showing pending keys
1095 let key_width = 15u16; // for showing pending keys
helix-view/src/editor.rs+3
@@ -58,6 +58,8 @@ pub struct Config {
58 #[serde(skip_serializing, deserialize_with = "deserialize_duration_millis")]
58 #[serde(skip_serializing, deserialize_with = "deserialize_duration_millis")]
59 pub idle_timeout: Duration,
59 pub idle_timeout: Duration,
60 pub completion_trigger_len: u8,
60 pub completion_trigger_len: u8,
61+ /// Whether to display infoboxes. Defaults to true.
62+ pub auto_info: bool,
61}
63}
62
64
63#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
65#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
@@ -88,6 +90,7 @@ impl Default for Config {
88 auto_completion: true,
90 auto_completion: true,
89 idle_timeout: Duration::from_millis(400),
91 idle_timeout: Duration::from_millis(400),
90 completion_trigger_len: 2,
92 completion_trigger_len: 2,
93+ auto_info: true,
91 }
94 }
92 }
95 }
93}
96}