I have been a vi user for most of 40 years. Time to upgrade.

One of my problems is trying to get Neovim to properly see the standard shipped tools & data in C:\Program Files\Neovim\share\nvim\runtime

I have tried setting XDG_CONFIG_HOME with not a lot of luck of seeing the contents of runtime. appData/Local/nvim-data contains very little

a second problem is that I am trying to setup init.lua in ~/.config/nvim :

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"

if not (vim.uv or vim.loop).fs_stat(lazypath) then
  local lazyrepo = "https://github.com/folke/lazy.nvim.git"
  vim.fn.system({ "git",

local plugins ={}
local opts={}


If Neovim init.lua and then :source % or if I just start Neovim lazy does not get loaded.

:set runtimepath? gives

runtimepath=C:\Users\fdemi\AppData\Local\nvim,C:\Users\fdemi\AppData\Local\nvim-data\site,C:\Program Files\Neovim\share/nvim/runtime,C:\Program Files\Neovim\share\nvim\runtime\pack\dist\opt\matchit,C:\Program Files\Neovim\lib/nvim,C:\Users\fdemi\AppData\Local\nvim-data\site\after,C:\Users\fdemi\AppData\Local\nvim\after

Of course I think that both problems are related and so is the fact in a git-bash shell nvim doesn't properly load.

Any help would be most helpful.

  • I forgot to add the result from :set runtimepath?
    – FrankieD3
    Commented Jun 25 at 18:50
  • 1
    You forgot to give your question a meaningful, non-nonsensical title. You also forgot to write what you expect and what you observe instead. What does e.g. "contains very little" mean? It's empty? If not: what's there? What did you expect?
    – Friedrich
    Commented Jun 25 at 18:54
  • Could you tell us what is the value of your XDG_CONFIG_HOME environment variable if defined (echo %XDG_CONFIG_HOME% in a shell or :echo $XDG_CONFIG_HOME` Neovim)? Commented Jun 25 at 19:02
  • Thanks very much Vivian. Setting XDG_CONFIG_HOME=~%HOME%\.config XDG_DATA_HOME=%localappdata%\nvim-data Now on to a certain level of complexity. Thanks, Frank
    – FrankieD3
    Commented Jun 25 at 21:16
  • Thanks for the feedback! Welcome to Vim :-) Do you still have something open in your question? How can we help you further? Otherwise maybe could you accept one of the solutions using the v button next to the arrow voting buttons. It allow the question to rest :-) Commented Jun 26 at 12:53

1 Answer 1



The first problem to solve is to make sure Neovim loads your init.lua file.

On Windows Neovim loads by default:

  • ~\AppData\Local\nvim\init.lua (%localappdata%\nvim\init.lua i.e. C:\Users\fdemi\AppData\Local\nvim\init.lua) or
  • %XDG_CONFIG_HOME%\nvim\init.lua if the XDG_CONFIG_HOME is defined.

You can get the init file that Neovim load running the following Neovim command:

:echo $MYVIMRC

Lazy Installation

For the installation of Lazy to be successful with the init.lua you plan to use you need that git is in the path (a good way to to verify that is to run the git command within a shell).

I would try to run in a shell the installation command to verify that it runs smooth:

git  clone --filter=blob:none --branch=stable https://github.com/folke/lazy.nvim.git %localappdata%/nvim-data/lazy/lazy.nvim

If the command run successfully you should have a %localappdata%/nvim-data/lazy/lazy.nvim on your drive (C:\Users\fdemi\AppData\Local\nvim-data\lazy\lazy.vim)

This will help to verify:

  • git is available
  • It has access to Internet
  • It can download the files from the GitHub repository

Remark: If the XDG_DATA_HOME environment variable is defined the command to run is:

git  clone --filter=blob:none --branch=stable https://github.com/folke/lazy.nvim.git %XDG_DATA_HOME%/nvim-data/lazy/lazy.nvim

Remark: Looking at your runtimepath It seems that the XDG_CONFIG_HOME and XDG_DATA_HOME environment variables are not defined.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.