Skip to content
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

Expose line numbers width in config #3953

Closed
wants to merge 1 commit into from
Closed

Expose line numbers width in config #3953

wants to merge 1 commit into from

Conversation

tonijarjour
Copy link

Here is an image of helix running with line numbers limited to 3 digits
image

Copy link
Member

@dead10ck dead10ck left a comment

Choose a reason for hiding this comment

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

What happens when the number of lines is greater than the number of configured digits? Ideally the width should just be adjusted dynamically based on the file in view.

@kirawi
Copy link
Member

kirawi commented Sep 24, 2022

What happens when the number of lines is greater than the number of configured digits? Ideally the width should just be adjusted dynamically based on the file in view.

#3469

@kirawi kirawi added A-helix-term Area: Helix term improvements S-waiting-on-review Status: Awaiting review from a maintainer. labels Sep 24, 2022
@tonijarjour
Copy link
Author

Where can I find total number of lines in the file? And would you want the width to be on a buffer by buffer basis (might cause jarring transitions when moving between buffers)? If not there would need to be a way to look through number of lines of all open files, and then set the width based on the longest.

@kirawi
Copy link
Member

kirawi commented Sep 24, 2022

#3469 implements that feature already. However, to get the number of lines in a file you can do doc.text().len_lines().

@dgkf
Copy link
Contributor

dgkf commented Oct 1, 2022

Hi, author of #3469 here

This PR looks great! I think my PR would dovetail nicely. The maximum and minimum width aren’t yet configurable in that PR, but it lends itself easily to exposing those as options. I think I even mention this as a “next step”. Take a look if you’d like, I think this could extend the behaviors nicely.

@tonijarjour tonijarjour closed this by deleting the head repository Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants