5

My current config file is at

C:\Users\User\AppData\Local\nvim

But I set up a new config setup in C:\Users\User\.config\nvim

How can I change it so that the config directory reflects this change? Thanks!

romainl
  • 186,200
  • 21
  • 280
  • 313
Revise
  • 229
  • 4
  • 11

2 Answers2

5

As far as I know, neovim looks for init.vim in $XDG_CONFIG_HOME/nvim directory

(which in windows is at ~/AppData/Local/nvim) so the $XDG_CONFIG_HOME variable is responsible for that.

In my opinion, if all you want to do is change neovim's config specifically a symbolic link will do the job:)

Noam E
  • 121
  • 1
  • 1
  • 4
5

In neovim 0.9.0 it was included support for environment variable NVIM_APPNAME that allows configuring the config file location

For instance, by setting NVIM_APPNAME=nvim-v2, config files will be in C:\Users\User\AppData\Local\nvim-v2

Reference: https://github.com/neovim/neovim/pull/22128

Gonzalo Matheu
  • 8,984
  • 5
  • 35
  • 58