Closed spikespaz closed 11 months ago
In your script you have the options -p -c
which are both parsed by nvimpager. Nvim options can only be given after --
or after a file argument.
If they're parsed by nvimpager why do they need to be after --
?
Oh I see, I need to end the arguments parsed by nvimpager
with --
.
Nope, that doesn't work.
#! /nix/store/ir0j7zqlw9dc49grmwplppc7gh0s40yf-bash-5.2-p15/bin/bash -e
exec -a "$0" "/nix/store/14qsc1x1i7wwqr6kn2vdxk4wy100dwgi-nvimpager-0.12.0/bin/.nvimpager-wrapped" -p -c "lua nvimpager.maps = false; lua nvimpager.git_colors = true" -- "$@"
You need nvimpager -p -- -c "lua nvimpager.maps ..."
because you want to use the -c
option of nvim but are actually using the -c option of nvimpager (with a file nameof "lua nvimpager.maps = ..." which probably does not exist).
Alright, I've got that. Now what is the correct way to set multiple attributes with Lua?
Error detected while processing command line:
E5107: Error loading lua [string ":lua"]:1: '=' expected near 'nvimpager'
You are mixing vim script and lua. You need lua nvimpager.maps = false; nvimpager.git_colors = true
I have the following Nix derivation, which will replace the
nvimpager
command with a wrapper script:This is the content of the script:
When I use the pager for anything from STDIN, it always just prints out the content (syntax highlighted) to my terminal.