Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NeoVim not loading init.vim file

Tags:

neovim

I just installed Neovim and created a simple init.vim file (located at HOME/.config/nvim/init.vim), and when I do :source % the script works, but when I exit and reopen Neovim, the file doesn't get loaded and I get the normal Neovim without the configurations I added to the file... How can I let Neovim load init.vim?

like image 747
dumb_ptr Avatar asked Jul 19 '26 17:07

dumb_ptr


1 Answers

Try to run Neovim with -V option, which will dump the startup log to the given file:

nvim -V/tmp/nvim.log

Then open the created log file and carefully read the lines. It's hard to say what could be wrong there, but you may see which configuration files were loaded and, perhaps, the warnings when reading some files.

For example, my log file contains the following line:

continuing in /home/jubnzv/.config/nvim/init.vim

Which mean that init.vim was loaded.

Try to find the similar line in your log. If you don't see it, please check the filepath and permissions for the configuration file.

like image 68
jubnzv Avatar answered Jul 25 '26 12:07

jubnzv



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!