aboutsummaryrefslogtreecommitdiffstats
path: root/openspec/changes/fix-neovim-plugin-loading/proposal.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/proposal.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/proposal.md')
-rw-r--r--openspec/changes/fix-neovim-plugin-loading/proposal.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/openspec/changes/fix-neovim-plugin-loading/proposal.md b/openspec/changes/fix-neovim-plugin-loading/proposal.md
new file mode 100644
index 0000000..0d703f6
--- /dev/null
+++ b/openspec/changes/fix-neovim-plugin-loading/proposal.md
@@ -0,0 +1,24 @@
1## Why
2
3On every fresh install of this flake, Neovim's plugins never load: home-manager's `programs.neovim` module always writes `~/.config/nvim/init.lua` itself (nixpkgs' `wrapNeovimUnstable` generates non-empty Lua RC content regardless of whether any plugins are declared through the module), which permanently conflicts with GNU Stow's attempt to link the user's externally-managed dotfiles config (lazy.nvim + all plugins) to that same path. Stow skips the conflicting package, so the real `init.lua` that bootstraps lazy.nvim never gets linked — only home-manager's empty plumbing-only file is active, and commands like `:LazyInstall` don't exist. Separately, no C compiler toolchain is provisioned anywhere in this flake, so even once the real config loads, natively-built plugins (e.g. nvim-treesitter's parser compilation via the `tree-sitter` CLI) would still fail on NixOS — a gap invisible on the user's Mac because Xcode Command Line Tools provide a compiler for free.
4
5## What Changes
6
7- Set `programs.neovim.sideloadInitLua = true` in `modules/home/editor.nix` so home-manager stops writing to `~/.config/nvim/init.lua` entirely (it loads its own generated runtime plumbing via wrapper args instead), freeing that path for the dotfiles-owned Stow package to own exclusively.
8- Provision a native build toolchain (a C compiler plus the `tree-sitter` CLI) via `home.packages` in `modules/home/editor.nix`, so natively-built Neovim plugins can actually compile on every platform this flake targets.
9- Move `tree-sitter` out of `modules/home/dev-tools.nix` into `modules/home/editor.nix`, since its only consumer is Neovim's treesitter plugin, not general-purpose dev tooling.
10
11## Capabilities
12
13### New Capabilities
14- `editor-environment`: Governs what the shared home-manager profile provisions for the default editor (Neovim) — the package/wrapper itself, non-interference with the externally-managed dotfiles config directory, and the native build toolchain natively-built plugins need. `editor.nix` currently has no spec coverage at all.
15
16### Modified Capabilities
17(none — `dotfiles-management`'s existing per-package conflict-skip requirement is unchanged by this fix; this change removes the source of one specific conflict, it doesn't change how conflicts are handled)
18
19## Impact
20
21- `modules/home/editor.nix` — gains `sideloadInitLua = true` and a `home.packages` list (`tree-sitter`, a C compiler).
22- `modules/home/dev-tools.nix` — loses `tree-sitter` from its package list.
23- Affects every `homeConfigurations`/`nixosConfigurations` output built from the shared home profile (`lib/mkHome.nix`, `lib/mkNixos.nix`), on both NixOS and Darwin.
24- No change to the external `~/dotfiles` repository or its Neovim config — this change only removes the Nix-side conflict blocking it from being linked.