From 21adb00f7fed8d7769657ffec7e5596cafeca2f3 Mon Sep 17 00:00:00 2001 From: Evan Pratten Date: Tue, 25 Jul 2023 11:15:24 -0400 Subject: [PATCH] Add support for manpages in neovim --- configs/nvim/init.vim | 3 +++ configs/zsh/.zshrc | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/configs/nvim/init.vim b/configs/nvim/init.vim index fe2a4a1..2215d24 100644 --- a/configs/nvim/init.vim +++ b/configs/nvim/init.vim @@ -69,6 +69,9 @@ if !exists('g:vscode') set spelloptions=camel hi clear SpellCap hi clear SpellRare + + " Disable spellcheck for manpages + autocmd FileType man setlocal nospell endif " Disable the gitgutter background diff --git a/configs/zsh/.zshrc b/configs/zsh/.zshrc index 0990deb..60015ff 100644 --- a/configs/zsh/.zshrc +++ b/configs/zsh/.zshrc @@ -31,6 +31,12 @@ elif type -p nano > /dev/null; then export EDITOR="nano" fi +# If we have neovim, use it as the manpage viewer +if type -p nvim > /dev/null; then + export MANPAGER="nvim +Man!" + export MANWIDTH=80 +fi + # SDKMAN! export SDKMAN_DIR="$HOME/.sdkman" [[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"