Every time I open neovim I need to type in ":source ~/.config/nvim/init.lua"

17 views Asked by At

I'm on windows and whenever I open NeoVim it doesn't keep any of my presets unless I type in :source ~/.config/nvim/init.lua.

When I tried to add vim.cmd("source ~/.config/nvim/init.lua") to my init file it broke and gave me an error. I think it's because I'm using the Unix file location for my init.lua file while I'm on Windows, but I can't figure out how I can change it.

1

There are 1 answers

0
mkrieger1 On

In Windows, place your config file in ~/AppData/Local/nvim/.

See https://neovim.io/doc/user/lua-guide.html#lua-guide-config