This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
nix build- Build the Neovim configurationnix run .- Run the built Neovim configurationnix flake check- Validate the flake and run testsjust updateorjust u- Update flake inputs and commit lock file
nix develop- Enter development shell withjustandnix-fast-buildjust list- Show all available just commands
- build-and-cache.yaml: Builds the Nix flake and caches to Cachix on push to main
- update.yaml: Updates flake lock file on schedule or manual trigger
- trigger-nix-config-update.yaml: Triggers updates on
alisonjenkins/nix-configrepository when changes merge to main- Requires
NIX_CONFIG_TRIGGER_TOKENsecret (GitHub PAT with repo or Actions permissions)
- Requires
Note: just update requires 1Password CLI (op) for GitHub authentication token retrieval.
This is a NixVim-based Neovim configuration packaged as a Nix flake. The configuration is highly modular and declarative.
Main Configuration (flake.nix:21-375):
- Single large configuration object passed to NixVim
- Declarative plugin configuration using NixVim's options system
- Performance optimizations with
combinePluginsandbyteCompileLua
Modular Organization:
keymaps/- Keymap definitions organized by functionality (ai, git, lsp, etc.)plugin-config/- Individual plugin configurations in separate Nix filescolorschemes/- Theme configurations (currently using bamboo)ftplugin/- Filetype-specific configurations
Plugin Configuration Pattern:
// (import ./plugin-config/pluginname { inherit pkgs; })Each plugin gets its own directory with a default.nix file that exports configuration.
Keymap Organization: Keymaps are imported as lists and concatenated:
keymaps = [ ]
++ import ./keymaps/ai/avante
++ import ./keymaps/lsp
// ...Package Management:
extraPackages- CLI tools and language servers available in Neovim's PATHextraPlugins- Custom/external vim plugins not in nixpkgs- Overlay system for package version pinning (master, stable, unstable)
Configured LSP Servers (plugin-config/lsp/default.nix):
- Go: gopls, golangci-lint-ls
- Python: pylsp
- Rust: rustaceanvim (separate from LSP config)
- JavaScript/TypeScript: ts_ls
- Terraform: terraformls, tflint
- Nix: (via nixd - check LSP config)
- Bash: bashls
- Many others (CSS, HTML, JSON, Docker, etc.)
Key Development Features:
- DAP debugging support for multiple languages
- Treesitter for syntax highlighting
- AI assistance via Avante, CodeCompanion, and Copilot
- HTTP client via Kulala
- Database tools via vim-dadbod
- Git integration via Fugitive and custom keymaps
- Testing framework integration via Neotest
The tests/ directory contains example projects for testing language-specific features:
tests/python/- Python project with nox testing setuptests/rest/- HTTP testing files
combinePlugins.enable = true- Combines compatible plugins for faster startupbyteCompileLua.enable = true- Pre-compiles Lua for performance- Some plugins are explicitly excluded from combining via
standalonePlugins - AV Optimization: See
DEFENDER_OPTIMIZATION.mdfor Microsoft Defender and anti-virus specific optimizations- Deferred LSP attachment (150ms delay)
- ShaDa file lazy loading (200ms delay)
- Optimized filesystem polling and wildignore patterns
- Treesitter module lazy loading
- Uses three nixpkgs channels: unstable (default), stable, and master
- Overlay system defined in flake.nix allows mixing packages from different channels
- Custom plugin versions pinned via overlays
- Renovate bot (
renovate.json) automatically creates PRs for dependency updates
Extra Lua configuration in extraConfigLua sets up safe directories for backups, swap files, and undo files outside of git repositories.
- Alphabetical Ordering: Maintain alphabetical order for plugins and attributes wherever possible unless it would break functionality
extraPlugins- Keep plugin list alphabetically sortedextraPackages- Keep package list alphabetically sortedplugin-configimports - Keep import statements alphabetically sortedkeymapsimports - Keep keymap imports alphabetically sorted- Exception: Base configuration objects (e.g.,
auto-sessionin plugin-config merges) should remain at the top for functionality