helix-editor / helix

A post-modern modal text editor.
https://helix-editor.com
Mozilla Public License 2.0
33.29k stars 2.47k forks source link

Render line-width indicator line #8267

Closed lunacd closed 1 year ago

lunacd commented 1 year ago

It would be great to have an option to render a line-width indicator line. Something like vim's :set colorcolumn=80.

This is really helpful for languages whose formatters don't reflow everything, e.g. rustfmt doesn't reflow comments.

gabydd commented 1 year ago

this is already available in helix with rulers: https://docs.helix-editor.com/configuration.html?highlight=rulers#editor-section you can set them for the whole editor or just for a certain language so for rust you could do:

[[language]]
name = "rust"
rulers = [80]

in you languages.toml another thing to note is if you are not seeing the rulers after they are configured some themes might not style the rulers