Config option for pager mode always
It would be great if there were a configuration option for forcing pager mode rather than having to use the -p flag. Setting the PAGER variable with a flag isn't possible and you also can set an environment variable to a custom function. The workaround I have in place is a script like this:
#!/bin/bash
nvimpager -p <&0
And setting PAGER to that script which is not desirable.
Something like:
lua nvimpager.force_pager_mode = true
and maybe an equivalent command for cat mode would be great.
Thanks for nvimpager!
This is not possible with the current design of nvimpager:
In pager mode nvim is started normally with a TUI, in cat mode nvim is started with the --headless flag. But when you set an option in lua or vimscript (wither by --cmd, -c or -u) it will only be available after the nvim process has started. We can not change the headless mode after starting nvim.
I hope to change the architecture after https://github.com/neovim/neovim/issues/7438 is fixed (the first step is https://github.com/neovim/neovim/pull/18375). It might be possible then.
I'm actually putting together a janky PR right now. Let me know what you think once it's up.