redyf / Neve

Neve is a Neovim configuration built with Nixvim, it allows you to use Nix language to manage Neovim plugins/options.
MIT License
152 stars 61 forks source link

Allow Neve to be used as a Nixvim module #113

Open Shyrogan opened 9 hours ago

Shyrogan commented 9 hours ago

Context

Currently, Neve is being installed as a package by Nix. While it's easy to install, it forces users to clone the project and make their own configuration.

The goal of this PR is to provide an alternative that allows us to modify Neve's configuration without touching the flake sources directly.

Example

programs.nixvim = {
  enable = true;
  imports = [ inputs.Neve.nixvimModule ];
  # Then configure Nixvim as usual, you might have to lib.mkForce some of the settings
  colorschemes.catppuccin.enable = lib.mkForce false;
  colorschemes.nord.enable = true;
};

This keeps the default Neve configuration while allowing users to disable the catppuccin theme and enabling Nord. The code for this is fairly straightforward.

For now, we only use nixvim configuration options but you could define your own to allow for some extra configuration