From 09d0809e1f74a2f33eed16a3e93ac29f774c87a7 Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Sun, 9 Jun 2024 16:46:14 -0400 Subject: [PATCH] nvim: add nv-man wrapper --- src/.config/neovide | 0 src/.config/vars | 6 ++++-- src/.local/bin/nv-man | 10 ++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 src/.config/neovide create mode 100755 src/.local/bin/nv-man diff --git a/src/.config/neovide b/src/.config/neovide new file mode 100644 index 0000000..e69de29 diff --git a/src/.config/vars b/src/.config/vars index 967901f..f04586b 100644 --- a/src/.config/vars +++ b/src/.config/vars @@ -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" diff --git a/src/.local/bin/nv-man b/src/.local/bin/nv-man new file mode 100755 index 0000000..a49080d --- /dev/null +++ b/src/.local/bin/nv-man @@ -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"