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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 syntax-theme should be honored in a custom feature in gitconfig #252

Closed
dandavison opened this issue Jul 14, 2020 · 9 comments
Closed

Comments

@dandavison
Copy link
Owner

With this config, the syntax-theme should be activated, but is not. side-by-side is activated however, as expected. cc @amanjitsk ref #251

[delta]
    features = my-feature

[delta "my-feature"]
    syntax-theme = Nord
    side-by-side = true
@amanjitsk
Copy link

I have also noticed that the paging = always option does not take effect for diffs shorter than the height of the terminal (which is really my sole usecase for paging=always). Don't know if this is how its meant to be or if I have something weird going on.

@dandavison
Copy link
Owner Author

Hi @amanjitsk, I think that's working for me. What do you get if you do these?

env | grep -iE '(pager|less)'
echo hello | delta --paging=always

I get this:

image

@amanjitsk
Copy link

For the first command, I get a huge list, but the relevant portion is
image
For the second command, I get something weird. I get
image

but then on pressing any other key, I proceed to get the paged output as expected (with the pager)

@dandavison
Copy link
Owner Author

For the second command, I get something weird. I get

OK, that's because you have navigate active. I've added a section in the README now describing this problem, pasted below. Incidentally, I'm finding git config --global really useful for toggling certain delta settings on-the-fly.


The recommended way to use navigate is to activate it only when needed, for example by doing

git config --global delta.navigate true

The reason is the following: Delta uses less as its pager, and the navigate feature works by doing less --pattern <regex-matching-file-and-commit-lines>. When the git output does not contain file/commit diff lines, less --pattern behaves unhelpfully (see #234, #237).

@amanjitsk
Copy link

Ah I see, thanks for the pointer, makes sense!

@amanjitsk
Copy link

One more question; I currently have paging = always set in my git config, but it doesn't seem to work unless I specify it at the command line. Is this also expected ? That's what I had originally meant!

@dandavison
Copy link
Owner Author

I currently have paging = always set in my git config, but it doesn't seem to work unless I specify it at the command line. Is this also expected ?

Hm, I think that's a bug. I can reproduce it. Thanks!

@dandavison
Copy link
Owner Author

@amanjitsk the bugs you reported with syntax-theme and paging not respecting (custom features in) git config have both been fixed on master. I'll aim to release them in the next few days and will probably mention on this ticket when released.

@amanjitsk
Copy link

Thanks for the quick update! I'll wait for the binary release as I don't have rust installed

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