Note
npis NeoVim, NixVim, _Next_Vimnpis NeoVim Pod, NixVim Pod, NextVim Podnpis NeoPod, for Project Oriented Developmentnpis No Pollution - Setting up Neovim for project? No problem.npis No Problem - when Setting up Neovim for a project.
Thanks to Nvim, NixVim, Nix, LazyVim and many all plugin authors
Warning
I'm just initiating the project - and these modules, might be still polluting user home somewhere, though less likely. Goal is simple: Don't let it pollute your home or OS, so I'll improve it to ensure that it is really POD.
Warning
Docs are AI generated yet - might be in-accurate.
This project is a movement towards my concept of POD. See POD for details on the Project Oriented Development concept.
np provides a base NixVim configuration as a module. To configure a NixVim
project per project, follow this pattern:
- Create
nix/nixvim.nixin your project for tailoring options:
{ np, ... }:
{
imports = [ np.nixvimModules.base ];
# Your project-specific NixVim module overrides
plugins = {
# Add or override plugins here
lsp.servers.yourLanguage.enable = true;
};
# Other nixvim options to tailor for your project
}-
In your project's
flake.nix, build and include the tailored Neovim as a dependency.[!IMPORTANT]
npis built onnixpkgs-unstableand requires its consumer to provide packages from it. Using a stable version ofnixpkgswill result in errors.{ inputs = { # np requires nixpkgs-unstable. nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixvim.url = "github:nix-community/nixvim"; np.url = "github:ar-at-localhost/np"; # or local path }; outputs = { self, nixpkgs, nixvim, np, ... }: let system = "x86_64-linux"; # adjust for your system # Use legacyPackages from nixpkgs-unstable. pkgs = nixpkgs.legacyPackages.${system}; in { devShells.${system}.default = pkgs.mkShell { packages = [ # Other development packages... # Make nixvim with our unstable pkgs and the project-specific module. (nixvim.legacyPackages.${system}.makeNixvimWithModule { inherit pkgs; module = ./nix/nixvim.nix; extraSpecialArgs = { inherit np; }; }) ]; }; }; }
This pattern keeps your project configuration organized and allows Nix to merge
the base np module with your project-specific overrides, creating a tailored
Neovim instance per project.
For additional language support, import presets into your nix/nixvim.nix:
{ np, ... }:
{
imports = [
np.nixvimModules.base
np.nixvimModules.presets.python # Adds Python LSP, formatters, and tree-sitter
np.nixvimModules.presets.rust # Adds Rust LSP and tree-sitter
];
# Your project-specific overrides
plugins.lsp.servers.nil_ls.enable = false; # Example override
}Available presets: cpp (C/C++ with clangd), docker (Docker with dockerls),
javascript (JS/TS with biome/eslint), make, python, rust, sql, web
(full web stack), xml.
To try np without setting up a project, run the base configuration:
nix run .#npThis launches Neovim with the minimal base setup for a quick test.
Yes, some are here.
Which language(s) support is configured out of the box?
Answer: Only Nix, Markdown, TOML/YAML, Bash, and Lua.
Which languages are supported?
Answer: Many languages are provided as modules for opt-in basic support. See presets for available options.
See Roadmap.