My personal nixvim config, inspired by nvix but with more options specific to my needs.
nix run . # run default config
nix run github:skyethepinkcat/nixvim-configAdd to your flake inputs and import homeModules.default:
inputs.nixvim-config.url = "github:skyethepinkcat/nixvim-config";
# in your home-manager module:
imports = [ inputs.nixvim-config.homeModules.default ];Use the nixvimModules.default module directly and wire it into programs.nixvim:
inputs.nixvim-config.url = "github:skyethepinkcat/nixvim-config";
# in your nixos/darwin module:
{ inputs, ... }: {
imports = [ inputs.nixvim.nixosModules.nixvim ];
programs.nixvim = {
enable = true;
imports = [ inputs.nixvim-config.nixvimModules.default ];
};
}| Output | Description |
|---|---|
nixvimModules.ai |
AI Configuration for Claude and Opencode, as well as copilot suggestions. |
nixvimModules.default |
Basic neovim configuration with additional plugins like which-key, treesitter, etc. |
nixvimModules.export |
Removes nix-native configuration options. |
nixvimModules.extra |
Mostly silly or very computer-specific stuff. |
nixvimModules.ui |
UI things, including noice, lualine, tabs via scope, nvim-tree, and notify. |
nixvimModules.lsp |
My LSP settings using native lsp and none-ls. |
nixvimModules.scratch |
Used for testing, basic module with only the framework included. |
| Output | Description |
|---|---|
nixvimConfigurations.default |
Basic configuration with everything but AI enabled. |
nixvimConfigurations.full |
Default configuration with AI enabled. |
nixvimConfigurations.simple |
Simplified module with UI and extras stripped. |
nixvimConfigurations.scratch |
Configuration with only framework code. For testing. |
A package exists for each configuration under its name.
For convience, wrapped binaries are also provided for each configuration under
nixvim-<name> and <name>-nixvim (the first will name the binary nixvim-<configuration>,
the second will name the binary nixvim)
Each configuration can also be exported for non-nix systems by producting a ~/.config/nvim-compatible directory without any /nix/store paths:
nix build .#simple-export
cp -r result/ ~/.config/nvim
Tree-sitter parsers are not bundled, you will need to run
:TSInstallon the target machine. LSP servers and formatters must be installed separately (Mason is included).
A build option for a tar archive is also included for convience.
nix build .#simple-export-archive
tar -xf result/nvim.tar.gz -C ~/.config/nvim
Each configuration also exposes a print-init package for easy access:
nix run .#simple-print-init
- render-markdown — in-buffer markdown rendering (off by default, toggle with
<LocalLeader>t) - markdown-preview — browser preview via
<LocalLeader>P - lualine — statusline
- nvim-tree — file explorer (
<leader>e) - dashboard — start screen
- indent-line — indentation guides
- which-key - extensive which-key keybinds
- treesitter — syntax / highlighting
- blink-cmp — completion
- none-ls — formatting / linting bridge
- LSP — language server support
- copilot-lua — AI inline suggestions
- picker (fzf/telescope) — fuzzy finding
- toggleterm — floating terminal
- which-key — keybinding hints
- git — git integration
- config-local — per-project
.nvim.luasupport
- Claude CLI — floating terminal sessions (
<leader>ac)<leader>aC-claude --continue<leader>ar-claude --resume
- Opencode - floating terminal sessions (
<leader>ao)<leader>aO-opencode --continue
keyList is a thin wrapper that registers both a keymap and a which-key entry in one call, avoiding duplication.
keyList = [
{
key = "<leader>tt";
action = "<cmd>ToggleTerm<cr>";
icon = "";
desc = "Toggle Terminal";
}
];For group labels only (no action), set action to null:
keyList = [
{
key = "<leader>t";
action = null;
group = "Terminal";
}
];| Key | Role |
|---|---|
<Space> |
<leader> |
, |
<LocalLeader> (buffer-local keymaps) |
nix develop # shell with nixd, nixfmt, statix, lua-language-server
nix fmt # format all nix files
nix run . # test config
nix run .#nixvim-print-init # inspect generated init.lua
Parts of this configuration were written with assistance from Claude (Anthropic).