fix(nb): manage project.nvim history as JSON for the 26.05 coffebar fork #127
No reviewers
Labels
No labels
bug
enhancement
in-progress
needs-info
needs-triage
p0
ready-for-agent
ready-for-human
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/nixos!127
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/nb-project-history-json"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
After the 26.05 upgrade, nvim's project list came up empty.
NixOS 26.05 updated
project-nvimto project.nvim v4 (the coffebar fork). That fork reads/writes a JSON history file~/.local/share/nvim/project_nvim/project_history.json, whereas the old plugin used plain-textproject_history. Our home-manager seed (hosts/nb/users/dominik.nix) still pointed at the old plain-text filename, so the new plugin only ever saw its own emptyproject_history.json([]) and showed no projects.(Separately, the nvim startup errors were already fixed by #126 — that fix had just been rolled back on
nbby a failed activation, now re-activated.)Change
The project list is declarative — the repo is the source of truth.
hosts/nb/users/configs/project_history.jsonin the new{path, name}spec.nixos-rebuild(repo wins).configs/project_history.Why not
home.filewithforce?home.filemakes the target a read-only symlink into the nix store. project.nvim v4 writes its history on exit and on opening a project; against a read-only file it throwsFile restricted!(verified: error fires fromwrite_historyonVimLeavePre). A writable force-copy keeps the list declarative and lets the plugin run without errors. Trade-off: projects opened between rebuilds are reset to the repo list on the next activation — which is the intended source-of-truth behaviour; add new projects toproject_history.json.Verification
nb::: nb OK.File restricted!) against a store-symlinked history; the force-copy variant loads the list with no errors.NixOS 26.05 ships project.nvim v4 (the coffebar fork), which reads/writes project_history.json instead of the old plain-text project_history. The home.file symlink seeded the old filename, so the new plugin only saw its own empty project_history.json and the project list came up empty. Seed project_history.json (new {path,name} spec) via a copy-if-missing activation rather than a read-only symlink, so the plugin can keep maintaining the list as projects are opened (/home is persisted).51105d32eeto09eb73489cfix(nb): seed project.nvim history as JSON for the 26.05 coffebar forkto fix(nb): manage project.nvim history as JSON for the 26.05 coffebar fork