Files
nixos-config/docs/reference/neovim.md
T
kiskaadee 7f69390afd refactor(python): isolate language tooling to devshells and remove obsolete aliases
- Remove pyright, ruff, and mypy from global home.packages in home/dev.nix
- Keep uv globally as the universal runner and environment bootstrapper
- Remove obsolete p5 and p5w aliases from home/shell.nix
- Expose devShells.${system}.default in flake.nix with repository linters
- Update adding-software.md and neovim.md to reflect devshell resolution
2026-10-18 23:13:38 -05:00

2.0 KiB

📝 Neovim Architecture & Keymaps

This document outlines the Neovim editor setup declared in home/dev.nix and home/config/nvim/.


1. Neovim Configuration Architecture

Neovim is configured through a hybrid Nix / Lua model:

  • Nix Layer (home/dev.nix): Packages, tree-sitter grammars, and language server packages (LSPs) installed into $PATH.
  • Lua Layer (home/config/nvim/): Modular Lua configuration symlinked to ~/.config/nvim/:
    • init.lua: Editor options, leader key (Space), and module loader.
    • lua/plugins.lua: Lazy/Packer plugin definitions.
    • lua/keymaps.lua: Core keybindings and normal/visual mode ergonomics.
    • lua/lsp.lua: Language Server Protocol client handlers and completions.

2. Integrated Toolchains & LSPs

The following language servers are installed globally via home/dev.nix and attached automatically:

Language Language Server / Tool Formatter / Linter
Nix nil nixfmt-rfc-style
Rust rust-analyzer rustfmt
Python pyright (devshell / venv) ruff (devshell / venv)
JavaScript / TypeScript typescript-language-server prettier
Go gopls gofmt
Markdown / Documentation marksman prettier

Note

Python language tooling (pyright, ruff) is resolved dynamically via direnv from individual project devshells or virtualenvs rather than global system packages.


3. Essential Keybindings

  • Leader Key: Space

Navigation & Files

Shortcut Action
<leader>ff Find files (Telescope).
<leader>fg Live grep across project.
<leader>fb Switch active buffer.
<leader>e Toggle file explorer tree.

LSP & Diagnostics

Shortcut Action
gd Go to definition.
gr Go to references.
K Hover documentation.
<leader>rn Rename symbol.
<leader>ca Code action.
[d / ]d Jump to previous / next diagnostic error.