aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--book/src/configuration.md1
-rw-r--r--helix-term/src/ui/editor.rs6
-rw-r--r--helix-view/src/editor.rs3
3 files changed, 8 insertions, 2 deletions
diff --git a/book/src/configuration.md b/book/src/configuration.md
index 7d6ff28f..be25441f 100644
--- a/book/src/configuration.md
+++ b/book/src/configuration.md
@@ -22,6 +22,7 @@ To override global configuration parameters, create a `config.toml` file located
| `auto-completion` | Enable automatic pop up of auto-completion. | `true` |
| `idle-timeout` | Time in milliseconds since last keypress before idle timers trigger. Used for autocompletion, set to 0 for instant. | `400` |
| `completion-trigger-len` | The min-length of word under cursor to trigger autocompletion | `2` |
+| `auto-info` | Whether to display infoboxes | `true` |
## LSP
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index 0ffde47b..a7015577 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -1086,8 +1086,10 @@ impl Component for EditorView {
);
}
- if let Some(ref mut info) = self.autoinfo {
- info.render(area, surface, cx);
+ if cx.editor.config.auto_info {
+ if let Some(ref mut info) = self.autoinfo {
+ info.render(area, surface, cx);
+ }
}
let key_width = 15u16; // for showing pending keys
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index 63a4ab29..6aa8b04d 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -58,6 +58,8 @@ pub struct Config {
#[serde(skip_serializing, deserialize_with = "deserialize_duration_millis")]
pub idle_timeout: Duration,
pub completion_trigger_len: u8,
+ /// Whether to display infoboxes. Defaults to true.
+ pub auto_info: bool,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
@@ -88,6 +90,7 @@ impl Default for Config {
auto_completion: true,
idle_timeout: Duration::from_millis(400),
completion_trigger_len: 2,
+ auto_info: true,
}
}
}