U can try to use: sudo nvim <file_name> . I was in the same situation and this worked for me.
sudo nvim <file_name>