Skip to content

Commit

Permalink
Rename padding to spacer, remove by default
Browse files Browse the repository at this point in the history
  • Loading branch information
archseer committed Jul 26, 2022
1 parent 2f98047 commit 255c173
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion book/src/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand Down
8 changes: 2 additions & 6 deletions helix-view/src/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ pub enum GutterType {
/// Show line numbers
LineNumbers,
/// Show one blank space
Padding,
Spacer,
}

impl std::str::FromStr for GutterType {
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions helix-view/src/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
));
Expand Down

0 comments on commit 255c173

Please sign in to comment.