nvim: stop tracking plugin-manager lockfiles

lazy-lock.json and nvim-pack-lock.json are runtime state written by lazy.nvim
and vim.pack. Tracking them in the config tree breaks read-only deployments
(e.g. home-manager xdg.configFile, which symlinks files into /nix/store). When
vim.pack tries to update its lockfile through a ro symlink, it fails with:
  EACCES: permission denied: ~/.config/nvim/nvim-pack-lock.json

Moving both files to .gitignore lets the plugin managers create writable
copies at runtime in their expected locations.

Made-with: Cursor
This commit is contained in:
Harivansh Rathi 2026-04-18 23:38:40 -04:00
parent b31ad77afa
commit cb25d55374
3 changed files with 6 additions and 121 deletions

View file

@ -6,3 +6,9 @@
*.swo
*~
rpi/
# Plugin-manager lockfiles are runtime state, not config. Tracking them breaks
# read-only deployments (e.g. home-manager xdg.configFile, which symlinks into
# the nix store) because tools try to rewrite the lockfile in place.
lazy-lock.json
nvim-pack-lock.json