Personal Neovim configuration flake using Nixvim.
Find a file
2024-09-09 22:49:04 -07:00
config feat: add obsidian.nvim 2024-09-09 22:49:04 -07:00
.gitignore init gitignore 2024-09-02 18:25:03 -07:00
flake.lock flake.lock: Update 2024-09-04 10:54:01 -07:00
flake.nix chore: switch to nixfmt-rfc-style 2024-09-02 18:28:53 -07:00
LICENSE add Unlicense 2024-08-24 22:23:23 -07:00
README.md docs: update one-line command 2024-08-25 00:10:31 -07:00

Neovim Configuration Flake

This is the Neovim configuration for all my NixOS and Nix enabled systems (such as with nix-darwin on macOS). It aims to be minimal and utilitarian; it forgoes many blingful features like status lines, sidebars, or fancy UI enhancements in favor of native (neo)Vim, while still having everything useful you'd expect, like LSPs, file explorer (yazi), completions, advanced language tools, and QoL enhancements.

It uses the Nixvim project under the hood to declaratively configure Neovim and its plugins, and installs some LSPs and other tools needed by it (like yazi, fd, etc).

It simply outputs a package which provides the binary nvim. It can be called just like the regular nvim binary, except it bundles all of my custom configuration and their dependencies with the power of Nix. An entirely self-contained, reproducible, purely functional text editor. Amazing.

Feel free to fork or copy the config to use yourself. It's free in the public domain.

Thanks to this gist for showing me how to build a Nixvim configuration as a standalone Nix package.

Usage

You can test drive my config in just one line (if you have Nix, of course):

nix run 'github:youwen5/neovim-flake' --extra-experimental-features flakes --extra-experimental-features nix-command

If for some reason, you want to install it permanently, add it to your flake inputs, and install the package in the usual way:

# flake.nix
{
  description = "Your system configuration flake.";

  inputs = {
    # -- snip --
    custom-neovim.url = "github:youwen5/neovim-flake";
  };
    # -- snip --
  };
  # -- snip --
}
# Wherever you install packages for your system or user:

{inputs, system, ...}:
{
  environment.systemPackages = [
    inputs.custom-neovim.packages.${system}.default
    # supported systems: x86_64-linux, aarch64-linux, x86_64-darwin, aarch64-darwin
  ];
}

Warning

This package will add the symlinks vim -> nvim and vi -> nvim so it will conflict with pkgs.vim and any programs installing binaries called vim or vi. You must remove existing Neovim and Vim packages to install this.