nvim: add nv-man wrapper

This commit is contained in:
dogeystamp 2024-06-09 16:46:14 -04:00
parent 9fbc579684
commit 09d0809e1f
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38
3 changed files with 14 additions and 2 deletions

0
src/.config/neovide Normal file
View File

View File

@ -54,9 +54,8 @@ export REM_FILE="$HOME/dox/not/rem"
# Set default programs
export EDITOR="nv"
export MANPAGER='nv-man'
export BROWSER="qutebrowser"
# man pager (neovide doesn't support this yet https://github.com/neovide/neovide/issues/1865)
export MANPAGER='nvim +Man!'
export MANWIDTH=165
# Soundboard
@ -91,3 +90,6 @@ export PATH="$PATH":"$XDG_DATA_HOME"/cargo/bin
# cppman can't set it itself for some reason
export MANPATH="$MANPATH":~/.cache/cppman/
# preferences for FZF
export FZF_DEFAULT_OPTS="--color=pointer:cyan"

10
src/.local/bin/nv-man Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
# Wrapper over neovide for man pages
# see https://github.com/neovide/neovide/issues/1865
TEMPF=$(mktemp)
cat > "$TEMPF"
nv +Man! "$TEMPF"
rm "$TEMPF"