Change visudo editor
sudo update-alternatives --config editor
sudo update-alternatives --install <link> <name> <path> <priority>
sudo update-alternatives --install /usr/bin/editor editor /usr/bin/nvim 0
Sources
https://askubuntu.com/a/539244
https://unix.stackexchange.com/a/335162
https://www.baeldung.com/linux/update-alternatives-command