aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlaž Hrastnik2022-07-26 01:10:06 +0000
committerBlaž Hrastnik2022-07-26 01:10:06 +0000
commit255c1734cfc46964e8faa21756ede2badd7b3813 (patch)
tree058ac0792e88a7676046d42441e1a2aa42c77a69
parent2f980471f816e841628cf2b75d8d8e689b3fe9d5 (diff)
Rename padding to spacer, remove by default
-rw-r--r--book/src/configuration.md2
-rw-r--r--helix-view/src/editor.rs8
-rw-r--r--helix-view/src/view.rs4
3 files changed, 5 insertions, 9 deletions
diff --git a/book/src/configuration.md b/book/src/configuration.md
index 1b3d3aee..c7334af4 100644
--- a/book/src/configuration.md
+++ b/book/src/configuration.md
@@ -38,7 +38,7 @@ hidden = false
| `shell` | Shell to use when running external commands. | Unix: `["sh", "-c"]`<br/>Windows: `["cmd", "/C"]` |
| `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` |
| `cursorline` | Highlight all lines with a cursor. | `false` |
-| `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"]` |
+| `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"]` |
| `auto-completion` | Enable automatic pop up of auto-completion. | `true` |
| `auto-format` | Enable automatic formatting on save. | `true` |
| `idle-timeout` | Time in milliseconds since last keypress before idle timers trigger. Used for autocompletion, set to 0 for instant. | `400` |
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index 53c664b1..5d82e0d4 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -336,7 +336,7 @@ pub enum GutterType {
/// Show line numbers
LineNumbers,
/// Show one blank space
- Padding,
+ Spacer,
}
impl std::str::FromStr for GutterType {
@@ -473,11 +473,7 @@ impl Default for Config {
},
line_number: LineNumber::Absolute,
cursorline: false,
- gutters: vec![
- GutterType::Diagnostics,
- GutterType::LineNumbers,
- GutterType::Padding,
- ],
+ gutters: vec![GutterType::Diagnostics, GutterType::LineNumbers],
middle_click_paste: true,
auto_pairs: AutoPairConfig::default(),
auto_completion: true,
diff --git a/helix-view/src/view.rs b/helix-view/src/view.rs
index 6bdd5be4..3df533df 100644
--- a/helix-view/src/view.rs
+++ b/helix-view/src/view.rs
@@ -106,14 +106,14 @@ impl View {
let width = match gutter_type {
GutterType::Diagnostics => 1,
GutterType::LineNumbers => 5,
- GutterType::Padding => 1,
+ GutterType::Spacer => 1,
};
gutter_offset += width;
gutters.push((
match gutter_type {
GutterType::Diagnostics => gutter::diagnostics_or_breakpoints,
GutterType::LineNumbers => gutter::line_numbers,
- GutterType::Padding => gutter::padding,
+ GutterType::Spacer => gutter::padding,
},
width as usize,
));