Skip to content

add spacer element to statusline #3165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 26, 2022
Merged

add spacer element to statusline #3165

merged 2 commits into from
Jul 26, 2022

Conversation

sbromberger
Copy link
Contributor

Addresses #3106 and associated other comments. Multiple "spacer" elements may be specified in each statusline section.

@A-Walrus
Copy link
Contributor

This would probably need to be added to the documentation (book/src/configuration.md:80)

@sbromberger
Copy link
Contributor Author

This would probably need to be added to the documentation (book/src/configuration.md:80)

Of course. Sorry for the oversight. Will update.

@sbromberger
Copy link
Contributor Author

Ready for review.

@AceofSpades5757
Copy link
Contributor

Currently, gutters uses "padding", would that not be more appropriate terminology compared to "spacing"?

Helix Master Docs

@@ -246,6 +246,9 @@ pub enum StatusLineElement {

/// The cursor position
Position,

/// A single space
Spacer,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GutterType uses Padding terminology.
helix-view/src/editor.rs on line 330.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gutters should also use the spacer terminology, I'll rename there

@@ -78,6 +78,7 @@ The following elements can be configured:
| `diagnostics` | The number of warnings and/or errors |
| `selections` | The number of active selections |
| `position` | The cursor position |
| `spacer` | Inserts a space between elements (multiple/contiguous spacers may be specified) |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gutters uses "padding".

/book/src/configuration.md on line 41.

| `gutters` | Gutters to display: Available are `diagnostics` and `line-numbers` and `padding`, note that `diagnostics` also includes other features like breakpoints | `["diagnostics", "line-numbers", "padding"]` |

@sbromberger
Copy link
Contributor Author

sbromberger commented Jul 25, 2022

To me, "padding" implies inserting spaces at the front (or back) of strings to align them to columns. That's not what these do, but I'm happy to change the name if there's a consensus.

c.f.. #3106 (comment)

@archseer archseer merged commit bfdcfec into helix-editor:master Jul 26, 2022
thomasskk pushed a commit to thomasskk/helix that referenced this pull request Sep 9, 2022
* add spacer element to statusline

* docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants