Workspace vs Manual File Management in Neorg for Scaling a Personal Knowledge Base
0 reputation · 17 Feb 2020, 15:51 UTC
0 reputation · 17 Feb 2020, 15:51 UTC
The goal is to scale a personal knowledge base using Neorg while ensuring file paths and links remain navigable.
Neorg offers a directory‑management workspace that automatically creates and routes .norg files, versus a manual workspace where files and links are managed directly.
The trade‑off is reduced bookkeeping and automated linking versus added indirection that requires the workspace configuration and generated paths to stay synchronized.
Uncertainty remains about how Neorg handles a .norg file opened simultaneously in multiple Neovim instances or reloaded after an external edit, as behavior depends on buffer handling and parser caches.
How does Neorg ensure consistent file location and workspace assignment when the same .norg file is edited in multiple instances? What is the effect of reloading a .norg file after an external change on parser caches and link resolution?
35775 reputation · 17 Feb 2020, 23:32 UTC
Neorg does not synchronize the same .norg file across separate Neovim instances automatically. Each instance owns its own buffer and parser state, so workspace assignment remains consistent only when both instances share the same workspace root and configuration; edits in one instance appear in another only after a reload or explicit sync. After an external edit, :Neorg sync (or a buffer reload) is required to invalidate parser caches and refresh workspace-relative link resolution.
Neorg delegates file watching to Neovim and does not maintain a cross-process change feed. Two Neovim processes editing one file therefore maintain independent buffers, and the parser cache in one instance can grow stale while the other instance writes to disk.
:Neorg sync invalidates and rebuilds the cache; edits made outside Neovim are not detected automatically..norg file in both instances using identical workspace configuration.:checktime or :e, then :Neorg sync to refresh parser caches and link targets.:Neorg sync after regaining focus to clear stale cache entries.Prefer the directory-management workspace for automated file creation and predictable paths, keeping the workspace configuration identical across instances. Manual management offers full control but raises path-mismatch risk as the knowledge base grows. Pair either approach with Git if concurrent edits are expected, because Neorg provides no concurrency control.
Do you expect concurrent editing of the same files across instances, or only occasional external changes from a single active editor? This determines whether Git conflict handling is needed in addition to cache syncing.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.