Closed t-scutulatus closed 2 years ago
I can not reproduce this with the available information.
git log
or not? Or is only the highlighting off but nvimpager displays the log in black and white?:setf git
?@p-scvtvlatvs Ensure that you don't have $PAGER
set to something other than nvimpager
as it will overwrite the core.pager
configuration for git iirc.
@lucc:
@cvoges12:
If I unset PAGER
the default pager is used (I think is less
).
if you are in less and press h
it should show to help text of less (it says "SUMMARY OF LESS COMMANDS" at the top). If you are in nvimpager and execute :lua print(nvimpager)
it should print "table: 0x7f4e48937d20" or so, especially not nil
.
Does the highlighting work when you execute git log | nvimpager -c
or git log | nvimpager -p
or nvimpager ./some/file
?
Yes, it highlights with all the three commands.
If these commands work than we can at least conclude that nvimpager works on your machine.
Can you please:
setf git
and see if that activates highlighting :lua print(require('nvimpager')._testable.detect_parent_process())
git log
is run.git
value.git config -l
and git log
still returns black and white. However, git diff
highlights...
That sounds strange. I can currently not reproduce this (in a arch linux container).
Can you try git log > file ; nvim file
?
Yes, I can see the output in nvim
.
The output or also the highlight?
I am at loss here. It seems that neovim and nvimpager are installed and working. You will have to find a way to debug this and give more precise info what is happening behind the scenes.
Just the output.
Ok, my neovim shows highlighting when I open a file that contains git log output. So the problem seems to be with the runtime files of your neovim.
git log
with nvim and then execute :setf git
? which -a nvim
:filter git scriptnames
in nvimpager with git log
and what is it for git diff
(where highlighting seems to work):echo globpath(&rtp, '*/git.vim')
in nvim and nvimpager?pacman
./bin/nvim
and /usr/bin/nvim
git log
is:
/usr/share/nvim/runtime/syntax/git.vim
/usr/share/nvim/runtime/ftplugin/git.vim
For git diff
is the same.nvim
and for nvimpager
, the same as bullet 5.If you installed your neovim with pacman and still have 0.4.4 I assume you did not do a system update in a long time. Mind doing one?
I am really out of ideas by now. It seems that your syntax file is loaded correctly but just not applied. It does not look like you have multible versions of the same file installed. It also looks like the issue is not with nvimpager but already with plain nvim.
You will have to dig around a bit more yourself because it is really difficult for me to do this debugging remotely. If you have any more questions or need help with the debugging please ask but please also provide the info what you have tried and how it went up front.
Closed until further info is available.
If nvimpager is set as:
git config core.pager nvimpager
no highlighting occurs when git log command is used.