I’m in the process of migrating existing Neovim plugins managed by Packer to a new plugin manager called ‘Lazy’.

While setting the nvim-treesitter plugin, I came across this issue that nvim-treesitter keeps reinstalling all language parsers every time Neovim is started.

[nvim-treesitter] [5/5] Treesitter parse for vim has been installed

What happened? Well, it turns out this is is pretty much a common issue when you switching from Packer to Lazy plugin manager without cleaning up files and directories created by Packer according to this [1].

To confirm this, run: :checkhealth lazy. Here is what shown up on my Neovim:

==============================================================================
lazy: require("lazy.health").check()

lazy.nvim ~
- OK Git installed
- WARNING found existing packages at `/home/kenno/.local/share/nvim/site/pack/packer`
- ERROR please remove the file `/home/kenno/.config/nvim/plugin/packer_compiled.lua`

What I had to do to fix this was the following 2 steps:

  1. Remove these file or dir location
  • ~/.local/share/nvim/site/pack
  • ~/.config/nvim/plugin/packer_compiled.lua
  1. Reinstall all the plugins managed by Lazy by running: :Lazy, and update all the plugins with U.

References: