Skip to content

bearoffwork/nvim-lznix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neovim config with Nix flake managed plugin

Neovim configuration using Nix flakes for plugin management and lz.n for lazy loading. Uses standard Neovim config structure with native Lua files instead of embedding Lua as strings in Nix.

Features

  • Nix flake managed plugins
  • Lazy loading with lz.n
  • Native Lua configuration files
  • LSP, autocompletion, formatting, file navigation

Prerequisites

  • Nix with flakes enabled
  • Neovim (I'm using 0.11, but 0.10+ should work too)
  • just (optional, for build commands)

Required system packages for plugins

Search and file navigation:

  • ripgrep - Fast text search tool (used by Telescope)
  • fzf - Fuzzy finder (used by Telescope)

Language servers:

Code formatters:

  • stylua - Lua code formatter
  • alejandra - Nix code formatter
  • shfmt - Shell script formatter
  • jq - JSON processor and formatter (maybe there are better options for JSON formatting, I use it because it's lightweight and already included in my config)

Make sure these are available in your environment (add to your Nix config) so Neovim plugins work correctly. Here are examples for different Nix setups:

For NixOS/nix-darwin configuration

Add to your configuration.nix:

programs.neovim = {
  enable = true;
  viAlias = true; # optional
  vimAlias = true; # optional
};

environment.systemPackages = with pkgs; [
  just # optional
  ripgrep
  fzf
  lua-language-server
  stylua
  nixd
  alejandra
  bash-language-server
  shfmt
  jq
];

For home-manager

Add to your home.nix:

programs.neovim = {
  enable = true;
  viAlias = true; # optional
  vimAlias = true; # optional
};

home.packages = with pkgs; [
  just # optional
  ripgrep
  fzf
  lua-language-server
  stylua
  nixd
  alejandra
  bash-language-server
  shfmt
  jq
];

Usage

Clone this repo to neovim config directory and build. If you want to use a different config directory, set NVIM_APPNAME env variable before cloning. See https://neovim.io/doc/user/starting.html#_nvim_appname for details.

# this will change config directory to ~/.config/nvim-lznix
# add this to your shell config file if you want to make it permanent
# unset it to use default ~/.config/nvim
export NVIM_APPNAME=nvim-lznix

Skip above if you want to use default ~/.config/nvim.

git clone https://github.com/bearoffwork/nvim-lznix ~/.config/"${NVIM_APPNAME:-nvim}"

cd ~/.config/"${NVIM_APPNAME:-nvim}"
# install plugins
nix build . -o pack
# or if you have just installed
just build

Plugins

Core functionality

File management

UI and theming

Development

All plugins are managed via nix flake and loaded lazily with lz.n for optimal startup performance.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors