WindowsmacOSLinux

Where Is the Neovim Config File?

Neovim init.lua under ~/.config/nvim on Mac and Linux, AppData Local on Windows, plus data and state dirs.

Last updated

Neovim reads init.lua (or legacy init.vim) from an nvim folder: .config on Mac and Linux, Local AppData on Windows. Plugins, swaps and shada live in sibling data and state dirs.

The checkhealth command plus the config path echo settle location fights. Lazy plugin managers add their own subtrees under data, not config.

Where Neovim stores this, by platform

Windows
%LOCALAPPDATA%\nvim\init.lua

Data under %LOCALAPPDATA%\nvim-data. XDG_CONFIG_HOME overrides the config root when set.

macOS
~/.config/nvim/init.lua

Data under ~/.local/share/nvim, state under ~/.local/state/nvim. Homebrew versus release builds agree on these.

Linux
~/.config/nvim/init.lua

Same XDG layout. Distro packages and AppImages share it; check stdpath output inside nvim when unsure.

Frequently asked questions

init.vim versus init.lua: which loads?

init.lua wins when both exist. Migrate fully or delete the loser to stop split brain settings.

Where do Neovim plugins actually install?

Under the data dir (site/pack or the manager folder), not beside init.lua. Wiping data re downloads plugins; wiping config loses your setup.

Notice an outdated path? Let us know.