I want to use Nix as a package manager for managing my Neovim plugins and configurations instead of using traditional methods like Vim-Plug or Packer. I’m looking for guidance on the following points:
- Basic Setup: How do I set up Nix to work with Neovim? Do I need any specific configurations or files to start managing plugins?
- Managing Plugins: How can I install and manage Neovim plugins with Nix? Is there a standard way to define plugins in my configuration.nix or flake.nix?
- Best Practices: Are there any best practices or common pitfalls to avoid when using Nix for this purpose?
- Performance Considerations: Does using Nix for managing Neovim plugins have any impact on performance or startup times compared to traditional methods?
Any examples or a step-by-step guide would be greatly appreciated! I’m fairly new to both Nix and Neovim, so detailed explanations would be helpful.
I have installed Nix and set up a basic configuration file to manage Neovim. I was expecting to be able to specify and install plugins using Nix expressions, but I am unsure how to define them correctly. Instead of loading plugins, Neovim still starts without the desired plugins, and I’m not sure what I am missing in my configuration. I expected Nix to handle the plugins seamlessly, similar to other package managers, but I might have made a mistake in the setup process.
Any guidance on correctly setting up Nix to manage Neovim plugins would be helpful.
1
You can check out nixvim, there are plenty of samples using it. You can also check out my config.