Skip to content
ar-at-localhostPublic

About

Opinionated Nixvim Configuration

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Nixvim Configuration

This is my personal, modular Nixvim configuration. It aims to provide a fluid editing experience with a rich set of features.

Built on a solid base configuration, it also includes several language modules (langs) and extra modules (xtra) for enabling optional features. Feel free to use it if it fits your needs. Contributions are also welcome.

Note

This is an opinionated configuration and may not suit everyone's taste. It prioritizes a fluid editing experience and a rich feature set.

Quick run

To run without installing (e.g., for a demo), run the following:

NIXPKGS_ALLOW_UNFREE=1 nix run --impure git+https://github.com/ar-at-localhost/nv.git

Usage / Installation

Add to flake

You can add nv as an input to your flake. By default, it follows the Nix master branch, but you can override inputs.nixpkgs.follows to use your own nixpkgs input and follow whichever channel you prefer.

{
  inputs = {
    # nixpkgs...
    # other inputs...
    nv = {
      url = "github:ar-at-localhost/nv";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };
}

Apply the overlay

Some features require the nv overlay, which is also necessary when using the provided package directly.

pkgs = import inputs.nixpkgs {
  inherit system;
  overlays = [
    inputs.nv.overlays.default
  ];
};

Modules

Generally, you will want to import the modules into your configuration. Simply import the default module:

{
  imports = [
    # rest of imports
    inputs.nv.nixvimModules.default
  ];
}

Important

Using the default module will load the default configuration. You'll need to override it to reset the configuration.

Built Nixvim package

If you want to use the base configuration as-is, you can add the overlay provided by the flake and include its package in your package set. With the appropriate wiring, it should work with both Home Manager and NixOS.

A common use case is adding it to development flakes for a personalized editing experience.

# Apply overlay
{
  pkgs = import nixpkgs {
    overlays = [
      # other overlays...
      inputs.nv.overlays.default
    ];
  };
}

# Add package to your relevant package set
{
  packages = with pkgs; [ nv ];
}

Languages

Several languages are supported. You can enable them by setting the nv.langs.<lang-name>.enable option to true.

{
  # ...
  nv.langs.xml.enable = true;
}

Tip

Nix, Lua, Markdown, and Bash are supported by default.

Available Languages

Extras

A few extra features are also supported. You can enable them by setting the nv.xtras.<lang-name>.enable option to true.

{
  # ...
  nv.xtras.orgmode.enable = true;
}

Available Extras

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.## License

About

Opinionated Nixvim Configuration

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages