neovim: slice 3 — QoL plugins + python stack (#19) #28

Merged
rpickler merged 2 commits from issue-19-nixvim-slice-3-python into main 2026-10-19 08:15:51 +00:00
Member

Slice 3 per issue feedback (comment 653). Two new plugin files wired into users/modules/neovim/plugins/; issue #19 reopened first since it was closed by mistake.

QoL batch — plugins/qol.nix

  • todo-comments — gutter signs for TODO/FIXME/HACK; makes the existing telescope <leader>ft work, and adds <leader>xt (trouble view of todos).
  • neogen — docstring generation: <leader>an inside a func generates its docstring (<leader>a* stays CodeCompanion's, no clash).
  • lualine — statusline, theme = "auto" (follows cyberdream), globalstatus = true.
  • lint (nvim-lint) — non-LSP linters as native diagnostics; autoInstall pulls the binaries from Nix: shellcheck (sh/bash/zsh), hadolint (Dockerfile), yamllint (yaml). No format-on-save anywhere — formatting stays manual <leader>cf.
  • trouble — <leader>xx workspace diagnostics, <leader>xX buffer, <leader>xq/<leader>xl quickfix/loclist, <leader>cs symbols, <leader>cl LSP list.
  • nvim-autopairs — auto-close pairs, treesitter-aware, <M-e> fast-wrap. Tab stays with cmp; no snippet-jump theft.
  • indent-blankline — indent guides + scope highlight. snacks' indent renderer disabled in snacks/default.nix so ibl owns the guides (double-draw otherwise).

Python stack — plugins/python.nix

  • pyright — type-checking LSP (nixvim disables pyright's noisy hint diagnostics by default; one-line flip if you miss them).
  • ruff — the modern built-in Rust LSP (not the deprecated ruff-lsp): lint diagnostics + fixes + <leader>cf format on py files.
  • dap + dap-ui + dap-virtual-text + dap-python — F5 continue, F6 breakpoint, F7/F8/S-F8 step over/into/out, S-F5 terminate, <leader>du UI, <leader>dr REPL. dap-python brings its own debugpy from Nix; nothing is pip-installed, no venv needed.
  • neotest (python adapter) — <leader>tt run under cursor, <leader>tT run file, <leader>tl last, <leader>to output panel, <leader>ts summary, <leader>ta debug-run via dap strategy. Failures land in quickfix (<leader>xq reads it via trouble). Adapter needs pytest importable → a Nix python3.withPackages [ pytest ] added to extraPackages (your own devshell python still shadows it via PATH order).
  • No venv-selector — skipped per your note.

Verification

Every plugin/server option cross-checked against the nixvim rev pinned in flake.lock (5b912bd8): all seven QoL modules + dap/dap-ui/dap-virtual-text/dap-python/neotest are by-name modules at that rev; pyright/ruff are generated lspconfig servers with Nix auto-packages there. Trouble command names/modes taken from trouble.nvim README; neotest keymaps use the documented Lua API (run_last, run(file), dap strategy) rather than guessing CLI subcommands.

Not build-verified from my side (no nix where I run) — nix run/home-manager switch will tell you fast; every option is module-level, no raw plugin configs that could drift.

Slice 3 per issue feedback (comment 653). Two new plugin files wired into `users/modules/neovim/plugins/`; issue #19 reopened first since it was closed by mistake. ## QoL batch — `plugins/qol.nix` - **todo-comments** — gutter signs for TODO/FIXME/HACK; makes the existing telescope `<leader>ft` work, and adds `<leader>xt` (trouble view of todos). - **neogen** — docstring generation: `<leader>an` inside a func generates its docstring (`<leader>a*` stays CodeCompanion's, no clash). - **lualine** — statusline, `theme = "auto"` (follows cyberdream), `globalstatus = true`. - **lint** (nvim-lint) — non-LSP linters as native diagnostics; `autoInstall` pulls the binaries from Nix: shellcheck (sh/bash/zsh), hadolint (Dockerfile), yamllint (yaml). No format-on-save anywhere — formatting stays manual `<leader>cf`. - **trouble** — `<leader>xx` workspace diagnostics, `<leader>xX` buffer, `<leader>xq`/`<leader>xl` quickfix/loclist, `<leader>cs` symbols, `<leader>cl` LSP list. - **nvim-autopairs** — auto-close pairs, treesitter-aware, `<M-e>` fast-wrap. Tab stays with cmp; no snippet-jump theft. - **indent-blankline** — indent guides + scope highlight. **snacks' `indent` renderer disabled in `snacks/default.nix`** so ibl owns the guides (double-draw otherwise). ## Python stack — `plugins/python.nix` - **pyright** — type-checking LSP (nixvim disables pyright's noisy hint diagnostics by default; one-line flip if you miss them). - **ruff** — the modern built-in Rust LSP (not the deprecated ruff-lsp): lint diagnostics + fixes + `<leader>cf` format on py files. - **dap** + **dap-ui** + **dap-virtual-text** + **dap-python** — F5 continue, F6 breakpoint, F7/F8/S-F8 step over/into/out, S-F5 terminate, `<leader>du` UI, `<leader>dr` REPL. dap-python brings its own debugpy from Nix; nothing is pip-installed, no venv needed. - **neotest** (python adapter) — `<leader>tt` run under cursor, `<leader>tT` run file, `<leader>tl` last, `<leader>to` output panel, `<leader>ts` summary, `<leader>ta` debug-run via dap strategy. Failures land in quickfix (`<leader>xq` reads it via trouble). Adapter needs `pytest` importable → a Nix `python3.withPackages [ pytest ]` added to `extraPackages` (your own devshell python still shadows it via PATH order). - **No venv-selector** — skipped per your note. ## Verification Every plugin/server option cross-checked against the nixvim rev pinned in `flake.lock` (`5b912bd8`): all seven QoL modules + `dap`/`dap-ui`/`dap-virtual-text`/`dap-python`/`neotest` are by-name modules at that rev; `pyright`/`ruff` are generated lspconfig servers with Nix auto-packages there. Trouble command names/modes taken from trouble.nvim README; neotest keymaps use the documented Lua API (`run_last`, `run(file)`, dap strategy) rather than guessing CLI subcommands. Not build-verified from my side (no nix where I run) — `nix run`/`home-manager switch` will tell you fast; every option is module-level, no raw plugin configs that could drift.
QoL (qol.nix): todo-comments, neogen, lualine, lint (shellcheck/hadolint/
yamllint, autoInstall), trouble, nvim-autopairs, indent-blankline.
snacks' indent renderer disabled so ibl owns the guides.

Python (python.nix): pyright + ruff LSP servers, nvim-dap (+dap-ui,
dap-virtual-text, dap-python), neotest with the python adapter and a
Nix-provided pytest on PATH. No venv-selector per issue feedback.

All module options verified against the nixvim rev pinned in flake.lock
(5b912bd8). Not build-verified from the agent side (no nix available).

Co-authored-by: Hermes Agent <hermes-bot@richardpickler.invalid>
rpickler left a comment

One simple bug to look into

One simple bug to look into
@ -0,0 +12,4 @@
enable = true;
# `<leader>xt` opens the trouble view of todos (x = trouble group);
# telescope keeps <leader>ft; <leader>t* is reserved for neotest.
keymaps.todoTrouble = "<leader>xt";
Owner
   error: A definition for option `home-manager.users.rpickler.programs.nixvim.plugins.todo-comments.keymaps.todoTrouble' is not of type `null or (submodule)'. TypeError: Definition values:
   - In `/nix/store/ih30vdxnqsq0nzs53hr7gh4frgh0rcqs-source/users/modules/neovim/plugins/qol.nix': "<leader>xt"

Only problem I've found in building.

error: A definition for option `home-manager.users.rpickler.programs.nixvim.plugins.todo-comments.keymaps.todoTrouble' is not of type `null or (submodule)'. TypeError: Definition values: - In `/nix/store/ih30vdxnqsq0nzs53hr7gh4frgh0rcqs-source/users/modules/neovim/plugins/qol.nix': "<leader>xt" Only problem I've found in building.
Fixes the option type error rpickler hit building the slice:
keymaps.todoTrouble expects a null-or-submodule {key,mode,options}
shape (verified against nixvim rev 5b912bd8), so assign the table
with the <leader>xt key and a which-key desc instead of a bare string.
Author
Member

Fixed in 6321548 — keymaps.todoTrouble is a keymap submodule (null or (submodule) with key/mode/options), not a bare string, in the pinned nixvim rev (5b912bd8). Changed to:

keymaps.todoTrouble = {
  key = "<leader>xt";
  options = { desc = "Todo comments (trouble)"; };
};

Checked the other new keymaps against the same rev: neogen keymaps.generate is genuinely a plain str there, and the rest are plain keymaps = [ … ] entries, so this was the only one with the submodule shape. trouble is enabled in this slice, so the plugin assertion guarding the integration passes too.

Fixed in 6321548 — `keymaps.todoTrouble` is a keymap submodule (`null or (submodule)` with `key`/`mode`/`options`), not a bare string, in the pinned nixvim rev (5b912bd8). Changed to: ```nix keymaps.todoTrouble = { key = "<leader>xt"; options = { desc = "Todo comments (trouble)"; }; }; ``` Checked the other new keymaps against the same rev: neogen `keymaps.generate` is genuinely a plain `str` there, and the rest are plain `keymaps = [ … ]` entries, so this was the only one with the submodule shape. trouble is enabled in this slice, so the plugin assertion guarding the integration passes too.
rpickler deleted branch issue-19-nixvim-slice-3-python 2026-10-19 08:15:52 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
richardpickler.com/nixos!28
No description provided.