Skip to content

feat(view): render soft-wrap indicators in the gutter#14825

Open
matoous wants to merge 1 commit intohelix-editor:masterfrom
matoous:md/14802
Open

feat(view): render soft-wrap indicators in the gutter#14825
matoous wants to merge 1 commit intohelix-editor:masterfrom
matoous:md/14802

Conversation

@matoous
Copy link
Copy Markdown
Contributor

@matoous matoous commented Nov 18, 2025

Moves the soft-wrap indicator into the gutter to keep the text flush and take an advantage of otherwise empty space.

Alternative approach would be to keep the wrap_indicator in TextFormat but use it for only e.g. diagnostics but not soft wraps. Open for suggestions.

Fixes: #14802

Didn't notice that there's already #14818, so this is pretty much the same thing, minus extra configuration options to keep things simple.

Before:

image

After:

image

@matoous matoous force-pushed the md/14802 branch 3 times, most recently from ea55858 to 98f1cca Compare November 18, 2025 18:04
@matoous matoous marked this pull request as ready for review November 27, 2025 14:47
Copy link
Copy Markdown
Member

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

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

I like the look of the wrap indicator in the gutter. Do you have an opinion on this @pascalkuthe

pub tab_width: u16,
pub max_wrap: u16,
pub max_indent_retain: u16,
pub wrap_indicator: Box<str>,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I wonder if we would want to keep this field and just set it to "" for now? I'm not sure what we would use it for in the future but the document formatter is meant to be flexible enough to be used for reflowing and other uses than rendering

@matoous
Copy link
Copy Markdown
Contributor Author

matoous commented Mar 26, 2026

@pascalkuthe if you please find a few minutes, your thoughts on this change would be greatly appreciated 🙇

Moves the soft-wrap indicator into the gutter to keep the text flush
and take an advantage of otherwise empty space.

Fixes: helix-editor#14802
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.

Soft-wrap icon should be in line number gutter

2 participants