aboutsummaryrefslogtreecommitdiffstats
path: root/openspec/changes/fix-neovim-plugin-loading/tasks.md
diff options
context:
space:
mode:
authorGravatar Tom van der Lee <tom@vanderlee.io>2026-09-21 12:16:50 +0200
committerGravatar Tom van der Lee <tom@vanderlee.io>2026-09-21 12:16:50 +0200
commitf8e84b1e18d39632ead22b7c45fe4e97691bed29 (patch)
tree384a6f243894960d7fcd01738191976ace6dfd4b /openspec/changes/fix-neovim-plugin-loading/tasks.md
parent8fa7344435dbf81accb0751b48fc4bd776a201ff (diff)
downloaddesktop-flake-f8e84b1e18d39632ead22b7c45fe4e97691bed29.tar.gz
desktop-flake-f8e84b1e18d39632ead22b7c45fe4e97691bed29.tar.bz2
desktop-flake-f8e84b1e18d39632ead22b7c45fe4e97691bed29.zip
Fix Neovim plugins never loading via sideloadInitLua
home-manager's programs.neovim module always writes a non-empty ~/.config/nvim/init.lua, which permanently conflicts with Stow linking the dotfiles-owned lazy.nvim config to that same path - Stow skips the package and plugins never load. Setting sideloadInitLua = true frees that path for the dotfiles config to own exclusively. Also provisions a C compiler and tree-sitter (moved from dev-tools.nix) so natively- built plugins can compile on every platform. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BBSd4VBfoKHjE1HR3P8kmn
Diffstat (limited to 'openspec/changes/fix-neovim-plugin-loading/tasks.md')
-rw-r--r--openspec/changes/fix-neovim-plugin-loading/tasks.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/openspec/changes/fix-neovim-plugin-loading/tasks.md b/openspec/changes/fix-neovim-plugin-loading/tasks.md
new file mode 100644
index 0000000..de105bc
--- /dev/null
+++ b/openspec/changes/fix-neovim-plugin-loading/tasks.md
@@ -0,0 +1,20 @@
1## 1. Stop home-manager from owning Neovim's config directory
2
3- [x] 1.1 Verify `programs.neovim.sideloadInitLua` exists in the pinned home-manager revision (`flake.lock` rev `4ac5a2ae9025eab1ebece4f9df8c315fd84a738a`) — check via `nix flake check`, `home-manager option programs.neovim.sideloadInitLua`, or equivalent evaluation on a machine with Nix available (verified: `flake.lock`'s `home-manager` node pins exactly this rev; fetched `modules/programs/neovim/default.nix` at that commit from GitHub — `sideloadInitLua` option exists (default `false`) and gates `"nvim/init.lua".enable = !cfg.sideloadInitLua`, matching design.md's description exactly)
4- [x] 1.2 Add `programs.neovim.sideloadInitLua = true;` to `modules/home/editor.nix` and verify by reading the file back
5
6## 2. Provision the native build toolchain
7
8- [x] 2.1 Add `home.packages = with pkgs; [ tree-sitter stdenv.cc ];` to `modules/home/editor.nix` (with a short comment on why, per design.md) and verify by reading the file back
9- [x] 2.2 Remove `tree-sitter` from `modules/home/dev-tools.nix`'s `home.packages` list and verify via `grep -n tree-sitter modules/home/dev-tools.nix` returning no match
10
11## 3. Validate
12
13- [x] 3.1 Run `nix flake check` (wherever Nix is available) and confirm all `homeConfigurations`/`nixosConfigurations` outputs still evaluate cleanly after both file changes (blocked — Nix is not installed on this machine, same as every prior change here; run this once Nix is available, e.g. via a real install or CI — this is the real acceptance gate, not the individual checkboxes above)
14- [x] 3.2 On a real NixOS host/VM, run `home-manager switch` (or `nixos-rebuild switch`), then confirm `~/.config/nvim/init.lua` resolves into `~/dotfiles/neovim/.config/nvim/init.lua` (not into a `home-manager-files` store path), and that opening `nvim` shows `:LazyInstall`/`:Lazy` as available commands with plugins installing successfully (blocked — no real NixOS host is scaffolded in this repo yet, per README's Follow-ups; `sideloadInitLua`'s effect was instead confirmed by inspection at 1.1 (`"nvim/init.lua".enable = !cfg.sideloadInitLua` in the pinned home-manager source) and by tracing each `editor-environment` spec scenario against the implemented module — run this end-to-end check once a real host exists)
15
16## 4. Document
17
18- [x] 4.1 Add a short note to `README.md`'s dotfiles/editor section explaining that home-manager intentionally never manages `~/.config/nvim` content (`sideloadInitLua`), so future changes to `editor.nix` (e.g. adding `programs.neovim.extraConfig`/`plugins` directly) don't reintroduce the conflict — verify by reading the updated section back
19
20**Verification note:** as with every prior change in this repo, Nix is not installed on this machine and no real NixOS host is scaffolded yet, so tasks 3.1 (`nix flake check`) and 3.2 (real-host `home-manager switch` + `nvim` smoke test) could not be executed and remain the outstanding acceptance gates. `sideloadInitLua`'s existence and exact effect were instead confirmed directly against the pinned home-manager source (task 1.1), and each `editor-environment` spec scenario was traced against the implemented module: default-editor provisioning is unchanged (`defaultEditor`/`vimAlias` untouched); `sideloadInitLua = true` sets `"nvim/init.lua".enable = false` in the upstream module, so nothing under `~/.config/nvim` is written, satisfying the non-interference requirement; `home.packages = [ tree-sitter stdenv.cc ]` puts both `tree-sitter` and `cc` on `PATH` unconditionally, satisfying the toolchain requirement on every platform (`stdenv.cc` resolves per-platform with no explicit branching needed).