on master help sign in
Rename padding to spacer, remove by default
commit255c1734cfc46964e8faa21756ede2badd7b3813 authorBlaž Hrastnik <blaz@mxxn.io> dateTue 26 Jul 2022, 10:10 (4 years ago) parent2f98047
3 files changed+5−9
book/src/configuration.md+1−1 helix-view/src/editor.rs+2−6 helix-view/src/view.rs+2−2
book/src/configuration.md+1−1
@@ -38,7 +38,7 @@ hidden = false
3838| `shell` | Shell to use when running external commands. | Unix: `["sh", "-c"]`<br/>Windows: `["cmd", "/C"]` |
3939| `line-number` | Line number display: `absolute` simply shows each line's number, while `relative` shows the distance from the current line. When unfocused or in insert mode, `relative` will still show absolute line numbers. | `absolute` |
4040| `cursorline` | Highlight all lines with a cursor. | `false` |
41−| `gutters` | Gutters to display: Available are `diagnostics` and `line-numbers` and `padding`, note that `diagnostics` also includes other features like breakpoints, 1-width padding will be inserted if gutters is non-empty | `["diagnostics", "line-numbers", "padding"]` |
41+| `gutters` | Gutters to display: Available are `diagnostics` and `line-numbers` and `spacer`, note that `diagnostics` also includes other features like breakpoints, 1-width padding will be inserted if gutters is non-empty | `["diagnostics", "line-numbers"]` |
4242| `auto-completion` | Enable automatic pop up of auto-completion. | `true` |
4343| `auto-format` | Enable automatic formatting on save. | `true` |
4444| `idle-timeout` | Time in milliseconds since last keypress before idle timers trigger. Used for autocompletion, set to 0 for instant. | `400` |
helix-view/src/editor.rs+2−6
@@ -336,7 +336,7 @@ pub enum GutterType {
336336 /// Show line numbers
337337 LineNumbers,
338338 /// Show one blank space
339− Padding,
339+ Spacer,
340340}
341341
342342impl std::str::FromStr for GutterType {
@@ -473,11 +473,7 @@ impl Default for Config {
473473 },
474474 line_number: LineNumber::Absolute,
475475 cursorline: false,
476− gutters: vec![
477− GutterType::Diagnostics,
478− GutterType::LineNumbers,
479− GutterType::Padding,
480− ],
476+ gutters: vec![GutterType::Diagnostics, GutterType::LineNumbers],
481477 middle_click_paste: true,
482478 auto_pairs: AutoPairConfig::default(),
483479 auto_completion: true,
helix-view/src/view.rs+2−2
@@ -106,14 +106,14 @@ impl View {
106106 let width = match gutter_type {
107107 GutterType::Diagnostics => 1,
108108 GutterType::LineNumbers => 5,
109− GutterType::Padding => 1,
109+ GutterType::Spacer => 1,
110110 };
111111 gutter_offset += width;
112112 gutters.push((
113113 match gutter_type {
114114 GutterType::Diagnostics => gutter::diagnostics_or_breakpoints,
115115 GutterType::LineNumbers => gutter::line_numbers,
116− GutterType::Padding => gutter::padding,
116+ GutterType::Spacer => gutter::padding,
117117 },
118118 width as usize,
119119 ));