Skip to content

feat(home): migrate neovim entirely to home-manager, consume dodder-vim from the dodder flake#169

Open
friedenberg wants to merge 1 commit into
masterfrom
claude/neovim-dodder-plugin-flake-ugbcad
Open

feat(home): migrate neovim entirely to home-manager, consume dodder-vim from the dodder flake#169
friedenberg wants to merge 1 commit into
masterfrom
claude/neovim-dodder-plugin-flake-ugbcad

Conversation

@friedenberg

Copy link
Copy Markdown
Collaborator

Closes the consumer side of amarbel-llc/dodder#245; closes #157.

The hybrid that #157 explored (rcm-owned lua tree + HM-generated lazy specs) is moot: neovim is now wholly home-manager-managed, so dodder's editor plugin is just another nix-delivered plugin.

What changed

home/neovim.nix (new)

  • programs.neovim with pkgs-master.neovim-unwrapped; the neovim entry is removed from home/packages/common.nix (noted in its exclusion list, which also drops it from the eng/result symlinkJoin — same treatment as fish/git/kitty).
  • Every plugin is a nix store path:
    • 15 plugins from pkgs-master.vimPlugins (attr names verified at the pinned nixpkgs-master rev);
    • nvim-treesitter.withPlugins carrying the grammar list from the old require("nvim-treesitter").install() call — parsers pre-built by nix, no :TSUpdate / network at runtime;
    • five plugins nixpkgs does not package (php.vim, Vim-Jinja2-Syntax, vim-jq, vim-kitty, vim-fancy-comment) pinned as flake = false inputs and built with vimUtils.buildVimPlugin;
    • dodder-vim consumed from the dodder flake input's packages output (Package zz-vim as a flake output (vim plugin + optional home-manager module) dodder#245) — replacing the rcm tag-dodder_dev lazy spec that pointed dir = at a source checkout. No dodder lock bump needed: the already-locked rev (b0805b4) carries the output.
  • The lazy.nvim bootstrap (git clone at first launch), lazy-lock.json, and the lua/plugins spec tree are gone. The direnv/direnv spec was dropped outright — it cloned the direnv CLI repo, which is not a vim plugin (direnv.vim is, and stays).

Config tree moves rcm/config/nvimhome/nvim, delivered via xdg.configFile.

  • Load-order note: HM delivers plugins via pack/hm/start, which nvim loads after init.lua (lazy.nvim loaded them synchronously inside init), so conform.setup, the treesitter activation autocmd, and the colorscheme call moved to after/plugin/*.lua, and init.lua's conform requires are deferred into function bodies.
  • ftdetect/ftplugin/syntax were relative symlinks into rcm/vim (shared with vim); they stay rcm-owned for vim, and nvim now gets a store-path copy refreshed on switch.
  • rcm/tag-dodder_dev is removed; doc/eng-rcm.7.scd updated.

flake.lock caveat

The five new lock entries were computed without nix in the sandbox (NAR serialization + codeload tarballs). The method reproduces existing locked inputs byte-for-byte (validated against shdoc's narHash and lastModified), so nix flake lock should be a no-op — but worth running before merge. CI's homeConfigurations.linux.activationPackage build exercises the full module.

Deployed-host migration

On hosts with the old rcup symlinks under ~/.config/nvim, home-manager backs them up as *.hm-backup on first switch (surfaced by hm-backup-report) — clean them up once. The lazy.nvim clone under ~/.local/share/nvim/lazy is now inert and can be deleted.

https://claude.ai/code/session_011r2XmQDac5gBxLx37mAQJ9


Generated by Claude Code

…im from the dodder flake

Closes the consumer side of dodder#245 / eng#157. The hybrid that
issue explored (rcm-owned lua tree + HM-generated lazy specs) is moot:
neovim is now wholly home-manager-managed, so the dodder plugin is
just another nix-delivered plugin.

home/neovim.nix (new):
- programs.neovim with pkgs-master.neovim-unwrapped (the nvim binary
  previously came from pkgs-master via home/packages/common.nix; that
  entry is removed and noted in the exclusion list, which also drops
  it from the eng/result symlinkJoin like fish/git/kitty before it).
- All plugins are nix store paths: pkgs-master.vimPlugins where
  nixpkgs packages them; nvim-treesitter.withPlugins carrying the
  grammar list from the old require("nvim-treesitter").install() call
  (parsers pre-built by nix, no :TSUpdate / network at runtime); five
  plugins nixpkgs lacks (php.vim, Vim-Jinja2-Syntax, vim-jq,
  vim-kitty, vim-fancy-comment) pinned as flake = false inputs and
  built with vimUtils.buildVimPlugin; and dodder-vim consumed from
  the dodder flake input's packages output (dodder#245) -- replacing
  the rcm tag-dodder_dev lazy spec that pointed dir = at a source
  checkout.
- The lazy.nvim bootstrap (network git clone at first launch),
  lazy-lock.json, and the lua/plugins spec tree are gone. The
  "direnv/direnv" spec was dropped outright: it cloned the direnv CLI
  repo, which is not a vim plugin (direnv.vim is, and stays).

Config tree moves rcm/config/nvim -> home/nvim, delivered via
xdg.configFile. Load-order note: HM delivers plugins via
pack/hm/start, which nvim loads AFTER init.lua (lazy loaded them
synchronously inside init), so conform.setup, the treesitter
activation autocmd, and the colorscheme call moved to
after/plugin/*.lua, and init.lua's conform requires are deferred into
function bodies. ftdetect/ftplugin/syntax were relative symlinks into
rcm/vim (shared with vim); they stay rcm-owned for vim, and nvim now
gets a store-path copy refreshed on switch.

flake.lock entries for the five new inputs were computed without nix
(NAR serialization + codeload tarballs, validated byte-for-byte
against existing locked inputs: shdoc's narHash and lastModified both
reproduce); `nix flake lock` should be a no-op but is worth running
on first build.

On already-deployed hosts the old rcup symlinks under ~/.config/nvim
collide with HM's files; home-manager backs them up as *.hm-backup
(surfaced by hm-backup-report) -- run rcdn / clean them up once, and
the lazy.nvim clone under ~/.local/share/nvim/lazy is now inert.

https://claude.ai/code/session_011r2XmQDac5gBxLx37mAQJ9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Explore combining rcm + home-manager + lazy.nvim for the nvim config (consume dodder-vim from the dodder flake)

2 participants