Search code examples
luaneovimneovim-plugin

Neovim doesn't load packer.nvim


OS: ArchLinux

NeoVim: 8.3 (current 9.0 bugs when cursor reaches parethesis, so I downgraded it)

I tried to download packer.nvim as in this repo. I just copied the lua/user/plugins.lua to my config and required it from my init.lua. It certainly does clone it from GitHub, but then fails to packadd it. Neovim shows this error:

E5113: Error while calling lua chunk: /home/an/.config/nvim/lua/ledity/plugins.lua:15: Vim(packadd):E919:
 Directory not found in 'packpath': "pack/*/opt/packer.nvim"

If you relaunch nvim the mistake disappears, but packer loads neither automatically, no manually. Putting the package in .local/share/nvim/site/pack/packer/opt/ doesn't help: nvim doesn't see it.

As I have understood, it should automatically load at start, as the package is stored in .local/share/nvim/site/pack/packer/start/, but it's not. Is there something I am missing?


Solution

  • Turned out that I have set up vim.opt.packpath in my config incorrectly. Actually, there was no reason to set it at all. I deleted the line that sets it up and everything worked