[NVIM] Link /home/root (snap bug workaround)

This commit is contained in:
Fabian Ising
2025-12-27 14:34:54 +01:00
parent c0837f157d
commit dc9ed93732

View File

@@ -12,6 +12,15 @@ else
shared_config=0
fi
# Workaround for HOME directory in sudo nvim (caused by snap)
if [[ "$USER" == "root" ]]; then
if [[ ! -e /home/root ]]; then
ln -s /root/ /home/root
elif [[ ! -e /home/root/.config ]]; then
ln -s /root/.config /home/root/.config
fi
fi
if [[ -f ~/.zsh/.shared_config ]] ; then
touch ~/.config/nvim/.shared_config
fi