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

Disabling line numbers #12

Closed
injust opened this issue Aug 30, 2024 · 2 comments
Closed

Disabling line numbers #12

injust opened this issue Aug 30, 2024 · 2 comments

Comments

@injust
Copy link
Contributor

injust commented Aug 30, 2024

Catppuccin sets line-numbers = true in delta by default. This is non-trivial to disable, as there is no flag like --no-line-numbers (at least until clap-rs/clap#815).

After reading dandavison/delta#307, the best way I found1 was to add a delta "feature" to your gitconfig2:

[delta "no-line-numbers"]
	line-numbers = false

Then either export DELTA_FEATURES=+no-line-numbers, or prefix it to your delta and git commands.

Since Catppuccin's theme is a delta "feature" itself, using another "feature" to override it is a bit of an edge case. I think we should either:

  1. Document this in the README, or
  2. Stop enabling line numbers by default.

Footnotes

  1. Another way is to run git with git -c delta.line-numbers=false, but that only works when running delta via git.

  2. https://github.com/dandavison/delta/issues/446 doesn't apply in this case, maybe because Catppuccin sets line-numbers = true in a "feature".

@Anomalocaridid
Copy link
Collaborator

I opted to stop enabling line numbers by default. This seems much simpler for users to change themselves and the theme should minimize assumptions about user preferences anyways.

@injust
Copy link
Contributor Author

injust commented Sep 1, 2024

This is weird: When you pass --line-numbers to delta, it gives you non-Catppuccin-styled line numbers.

dandavison/delta#1837

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

No branches or pull requests

2 participants