Skip to content

Conversation

@the-mikedavis
Copy link
Member

This is a continuation of #11798 / #9256. Before this patch rulers are drawn by theming the ruler's cell. With this patch ¦ characters (by default) are drawn on any cells without other text.

Before this patch the guidance for themes is to set ui.virtual.ruler as a background color so that a vertical bar of cells have a noticeable color. With this this change it's the opposite: you should set ui.virtual.ruler as a foreground color to theme the ¦s. Recommending setting background colors prior to this patch is awkward because all other keys in ui.virtual.* typically theme the foreground. And it's easy to forget to theme it if you don't often use rulers.

This change updates all current themes to use foreground rulers. It's a naive change though. I expect that some themes will need follow-up changes to the colors.

Screenshot 2025-09-14 at 19 29 38 Screenshot 2025-09-14 at 19 30 06

@the-mikedavis the-mikedavis added the A-theme Area: Theme and appearence related label Sep 14, 2025
Copy link
Member

@archseer archseer left a comment

Choose a reason for hiding this comment

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

Hmm so how do I retain the original behaviour on my personal config? I prefer no character and theming the background color so that I can see the ruler across all lines, including those that overlap text. e.g. if I'm looking at unformatted text then with this new change the ruler will barely be visible

@the-mikedavis
Copy link
Member Author

You can get the old ruler style back by setting the ruler char to space and using a background color in a theme. Setting it to background in the default theme would be a bit unfortunate though since it would mean that the default char ¦ wouldn't work well for the default theme.

Could you try out this branch for a while and see how it feels? I like that ¦ is less bulky and in practice I don't think it's very problematic that it doesn't cover all lines. For unformatted files the ruler is as visible as a background ruler, but in unformatted files you would probably ignore the ruler anyways

@RoloEdits
Copy link
Contributor

As part of #12369 I have been using . The issue I had with ¦ was that it has vertical gaps between the char itself (as seen in the screenshot provided).

With :
image

@the-mikedavis
Copy link
Member Author

the-mikedavis commented Sep 16, 2025

I'll give a try locally for a while. With the font I use (JetBrains Mono) I don't think the gaps are very noticeable but I bet it varies with the font quite a bit.

@the-mikedavis the-mikedavis changed the title Render foreground rulers (¦) by default Render foreground rulers () by default Sep 21, 2025
@the-mikedavis
Copy link
Member Author

Ok after trying it for a while I agree, is nice for the default char

iniw added a commit to iniw/helix that referenced this pull request Oct 26, 2025
Make ruler char configurable, default to `┊`

Use foreground rulers in all current themes
iniw added a commit to iniw/helix that referenced this pull request Oct 27, 2025
Make ruler char configurable, default to `┊`

Use foreground rulers in all current themes
iniw pushed a commit to iniw/helix that referenced this pull request Oct 27, 2025
Make ruler char configurable, default to `┊`

Use foreground rulers in all current themes
iniw pushed a commit to iniw/helix that referenced this pull request Nov 3, 2025
Make ruler char configurable, default to `┊`

Use foreground rulers in all current themes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-theme Area: Theme and appearence related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants