Does NeoVim have it's own config file just like vim's .vimrc
? If so where can I get that file in the home directory to make my own custom changes.

- 6,016
- 12
- 41
- 84
6 Answers
Both VIm 8.0 and Neovim have their own built-in package manager.
In VIm 8.0, create the following directories:
~/.vim/pack/*/start
(where*
may be any name e.g.~/.vim/pack/jimmy/start
): Clone your required plugin into thestart
directory just as you would if you were installing it for Pathogen. You need nothing more and no commands in your.vimrc
file.~/.vim/pack/*/opt
(e.g.~/.vim/pack/jimmy/opt
) for plugins that only need to be loaded as required. For colours, add a directory to theopt
directory and then your colours e.g.~/.vim/pack/jimmy/opt/mycolors/colors/dracula.vim
.
In Neovim, the directory structure follows the freedesktop's XDG Base Directory Specification. Your configuration file is in ~/.config/nvim/init.vim
, but your plugins go into:
~/.local/share/nvim/site/pack/*/start
See :h packages
(VIm 8.0 and Neovim) for more information.

- 1,383
- 10
- 9
-
17Neovim's directory structure is a little more longwinded because neovim follows the freedesktop's [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) – Peter Benjamin Apr 22 '19 at 23:38
-
1These directories are also specified in the Neovim documentation at [plugins](https://neovim.io/doc/user/usr_05.html#05.6) and [packages](https://neovim.io/doc/user/usr_05.html#05.5). – Concrete_Buddha Nov 14 '19 at 11:21
-
It's missing the *plugin* folder: `~/.local/share/nvim/site/pack/plugin/*/start`. – blmayer Aug 12 '21 at 15:42
-
5Why is there so much advice out there to install a plugin manager for Neovim if Neovim supports plugins out of the box? – Flimm Jan 04 '22 at 20:11
-
@Flimm Old habits die hard. Everybody should read `:help packload-two-steps` (and note that dir `pack` is relative to the dirs listed in `set packpath?`). – Jonathan Komar Jun 22 '22 at 07:07
-
1@blmayer That is not mentioned in the nvim documentation. Specifically * is allowed, so you can have any number of nested folders presumably, but they wont do anything – Jonathon Jun 26 '22 at 23:31
-
2Wow, that is some really bad documentation on (n)vims part. To find out how to install plugins you need to read up on packages, which are defined as bundles of plugins, and extrapolate from their that you can just install single plugins in the same way. – Jonathon Jun 26 '22 at 23:33
-
Note: the plugin files do not go directly into start, but in a folder in start. So in most cases you will extract an archive or `git clone` into start and will end up with something like `~/.local/share/nvim/site/pack/PLUGA/start/PLUGA/`. Which is where all the files go. – Jonathon Jun 27 '22 at 01:10
Neovim config file is named init.vim
[^1] and its location varies depending on your system:
- *nix and macOS:
$HOME/.config/nvim/init.vim
- Windows:
~/AppData/Local/nvim/init.vim
You can also use the command :echo stdpath('config')
inside neovim to find the config directory.
All your settings can be put into this file if you want to. However, it is often advised to split your config to various files, and then either source those files manually or let Nvim do it for you. An excellent article on how to split your config is from .vimrc to .vim. You can find my example configuration here for a reference.
As for installing plugins, it is easy for beginners to use a plugin manager to do all the chores for you. vim-plug is a good choice. You can use it both on Windows, Linux, and Mac. It is fast and reliable. Follow the documentation of vim-plug to learn how to use it.
Another great plugin manager is packer.nvim, which is written in Lua and has all the fancy features (lazy loading, pint commits, etc.) you will ever want.
Other plugin managers you may want to try: dein, minpac.
[1]: for nvim v0.5+, you can also use init.lua
as your config entry point, see here.
-
Note: [plugpac.vim](https://github.com/bennyyip/plugpac.vim) layers a `vim-plug`-style interface on top of the built-in package manager for better performance than `vim-plug` – ssokolow Nov 06 '19 at 05:59
-
@ssokolow Updated! Though there is no benchmark about plugin manager performance for those plugin managers. – jdhao Nov 06 '19 at 06:19
-
I was going by the plugpac author's claim in the README that "In my case, it takes 18ms to start up with 53 out 87 plugins loaded(the rest will be load on demand). While vim-plug takes 35ms." – ssokolow Nov 06 '19 at 07:00
-
For windows, I could potentially drop/clone the plugins into the same kind of path for the `init.vim` for NeoVim? `:echo stdpath('config')/pack/name/start/`? – FilBot3 Jan 06 '20 at 21:34
-
@Pred, I think you can. For more information, you can read about `:h package` and `:h add-package`. – jdhao Jan 07 '20 at 02:04
After two days working on this, dozens of websites gone through, numbing confusion, pulling my hair out, I finally managed to get plug.vim
working.
The whole secret (buried deep, believe me) is that autoload files in the missing autoload directory load before the ill-named 'init' file. So, in ~/.config/nvim/
you put init.vim
, then create an autoload
directory right beside it in the same directory, i.e.:
~/.config/nvim/autoload/
That is where plug.vim
goes. That's right, the autoload
directory and its contents plug.vim
does NOT go where the documentation says it should, in ~/local/nvim/site/
.
Then you create some deep hole well away from any of the aforementioned, for instance, ~/.neovim-plugins
, to use for your private, vim-plug-ins directory. Put the path to that that private directory in single quotes '
inside the parentheses of plug#begin()
in your init file ~/.config/nvim/init.vim
.
Make sure you uncomment both it as well as plug#end()
by removing the initial doublequote "
from their lines. This works on Ubuntu 20.04.
Now, erase the plugins that you have been given (after PLUG) in your init file. According to the author of vim-plug, these plugins were just 'examples' and you should come up with your own to put after PLUG. I won't go into that, you will be working on that for quite a while. Try the Rust plugin by the Rust language team, for instance. Man, that is one great language, even better than Java.

- 16,715
- 16
- 63
- 81

- 159
- 1
- 2
try :h init.vim
or :h vimrc
. You'll see there all the info you're looking for.
Assuming you're on unix machine: If you still wish this file in you home directory than you may symlink it there with:
ln
Creates links to files and folders.
- Create a symbolic link to a file (or folder):
ln -s path/to/file path/to/symlink
optionally you may start nvim with the -u flag and tell it what you wish to use as your initialization file, so you can just nvim -u ~/.vimrc
.
Finally you may add the following in your terminal initialization file(.bashrc/.zshrc or whatever terminal you're using) alias vim='nvim -u ~/.vimrc'
if you really really want to use this file in your home directory without symlinking it but I wouldn't advice to work this way

- 1,081
- 6
- 14
I will explain it with itchy/calendar example.
Make a folder in: ~/.config/nvim/pack/
Can be like this: mkdir ~/.config/nvim/pack/calendar/start/
go to the folder: cd ~/.config/nvim/pack/calendar/start/
Then clone the repo: git clone https://github.com/itchyny/calendar.vim.git
Do the config on your init.vim file if needed and it is done!

- 51
- 3
Neovim uses either vim or lua plugins.
Init config files are located under the ~/.config/nvim directory as:
init.lua (holds the 'requires ')
init.vim (can reference ~/.vimrc)
Lua config files (*.lua) are usually found in:
~/.config/nvim/lua
Ex. ~/.config/nvim/lua/plugins.lua holds the references to plugins
Vim and lua plugins can be added into the ~/.local directory tree.
From h: add-global-plugin
mkdir -p ~/.local/share/nvim/site/plugin
cp /tmp/yourplugin.vim ~/.local/share/nvim/site/plugin
Ex. cp ./termdebug.vim ~/.local/share/nvim/site/plugin/
Restart nvim and termdebug should be available from the command prompt:
:Termdebug
:Termdebugcommand

- 13
- 3