Closed lesurp closed 6 years ago
Nvimpager uses the syntax files from neovim (this is a design decision). I don't really want to add or support custom syntax files.
Currently neovim detects the format of git log
but not git log --graph
. You could open a PR on the neovim repository.
Or you could check out tig. It can also work as a pager but also fails to highlight git log --graph
but it provides it's own graph view that can even be navigated
Just now I also remembered the option --color=always
for git log
. You can try to run git log --color | nvimpager
and nvimpager should highlight the terminal codes git gives you. This forces git log to display the terminal color escapes even though output is to a pipe and it stops nvimpager from detecting git as its parent process (the pager is not started by git so git isn't the parent process).
Is there any way to force nvimpager
to draw the ANSI color codes when run by git
if there isn't a Neovim syntax file for the output?
You can stop git from loading the pager itself so nvimpager will not detect a git parent process: git log --graph --color | nvimpager
Hi, when something such as:
we get something with nice colors (ie with my setup I get yellow commit hashes and red lines for the main branch line).
Doing so with nvimpager won't output any color. I do get colored man pages however so I don't know. Is that maybe a terminal colorscheme configuration?