I am trying to configure neovim by adding plugins via lazy in my C:\User\{username}\AppData\local\nvim folder. However when I try to use neovim it only works in the nvim folder and no where else. I have checked the runtime path for neovim and I see the directory C:\User\{username}\AppData\local\nvim mentioned. I am also not specifying anywhere in my configuration to change where neovim looks for configs. Please help me out.

Here is the error:

    Error detected while processing C:\Users\kamal\AppData\Local\nvim\init.lua:
E5113: Error while calling lua chunk: C:\Users\kamal\AppData\Local\nvim\init.lua:1: module 'lua.init' not found:
        no field package.preload['lua.init']
        no file '.\lua\init.lua'
        no file 'C:\Program Files\Neovim\bin\lua\lua\init.lua'
        no file 'C:\Program Files\Neovim\bin\lua\lua\init\init.lua'
        no file '.\lua\init.dll'
        no file 'C:\Program Files\Neovim\bin\lua\init.dll'
        no file 'C:\Program Files\Neovim\bin\loadall.dll'
        no file '.\lua.dll'
        no file 'C:\Program Files\Neovim\bin\lua.dll'
        no file 'C:\Program Files\Neovim\bin\loadall.dll'
stack traceback:
        [C]: in function 'require'
        C:\Users\kamal\AppData\Local\nvim\init.lua:1: in main chunk

Here is the runtime var:

runtimepath=~\AppData\Local\nvim,~\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,~\AppData\Local\nvim-data\site\after,~\AppData\Local\nvim\after

I used the Neovim installer from the neovim github page (nvim-win64.msi).

My config files are located in C:\Users\kamal\AppData\Local\nvim.

What I meant by "it only works in the nvim folder" is that the configs that I have made are only used when I am in the config folder(C:\Users\kamal\AppData\Local\nvim). If I am in any other directory it launches the base version of nvim without my configs.

My neovim Config: https://github.com/kamal-hamza/neoivm_config.git

  • Please don’t post images of text. Please edit to replace images of text with code-blocks of the relevant text.
    – D. Ben Knoble
    Feb 16 at 3:09
  • 1
    sorry first question ever, i have updated with code blocks
    – Hello
    Feb 16 at 4:16
  • I believe we would need more information about your installation. How did you installed Neovim (standalone, installer). Where is Neovim installed? What do you mean "it only work in the nvim folder" (When the current working directory is the Neovim installation directory)? What is the content of your init.vim or init.lua and where these files are on you disk? Sorry to ask so many question but in order to reproduce your problem I'm afraid we need more information :-| Feb 16 at 6:04
  • I used the Neovim installer from the neovim github page (nvim-win64.msi).
    – Hello
    Feb 16 at 19:54
  • Neovim is installed in C:\Program Files\Neovim
    – Hello
    Feb 16 at 19:55

1 Answer 1


The error was that my lazy.lua was in my C:\Users\{username}\AppData\Local\nvim\lua folder. However, you need to create a config folder inside your lua folder and put lazy.lua inside that config folder. Make sure you connect your init.lua to it by saying something like require("config.lazy").

  • I'm glad you solved your problem :-) An alternative would have been to: requier(lazy.lua) but your solution is more 'standard'. Feb 17 at 16:08
  • 1
    Thanks so much for the help btw
    – Hello
    Feb 18 at 21:50
  • If your solution adress your need you can accept it 2 days after posting it. It allow the question to rest :-) Feb 19 at 4:13

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.