Neorg Directory Layout: Workspaces or a Single Notes Folder
Decide between Neorg core.dirman workspaces and a single-directory notes layout, with configuration and validation steps.
10 Aug 2025, 07:20 UTC

The Decision and Constraints
You are configuring Neorg, the Lua-based notes engine for Neovim that parses .norg files with tree-sitter, and you need to choose how to organize your notes on disk. The decision is between core.dirman workspaces, which bind named workspaces to separate directories, and a single-directory layout, which keeps every note in one folder. The practical takeaway: use workspaces when you maintain separate contexts, such as personal notes and work notes, in different directories; use a single directory when all notes share one context and you want the simplest configuration.
Neorg loads its behavior through modules. The core.dirman module manages directories and workspaces. A workspace is a named entry in the core.dirman configuration that points Neorg to a specific directory. Neorg assumes Neovim 0.7 or later; tree-sitter highlighting and textobjects generally require Neovim 0.8 or later plus the norg tree-sitter parser. These are version assumptions, so check :help neorg for your installed release before changing configuration.
Constraints:
- Notes must live in directories Neorg can read.
- Workspace paths should be absolute or expand correctly from any Neovim working directory.
- Only one default workspace can be active at startup.
Supported Layouts Compared
| Layout | Best for | Command scope | Setup complexity | Main risk |
|---|---|---|---|---|
| 'core.dirman' workspaces | Separate contexts in separate directories | Per-workspace with :Neorg workspace | Moderate | Path expansion errors across working directories |
| Single-directory layout | One context, all notes together | Global across all notes | Low | Mixed contexts make filtering and navigation harder |
Trade-offs
Workspaces isolate notes so commands such as :Neorg workspace switch context and index files stay separate. The cost is extra configuration and the need to verify that each path resolves correctly. A single directory removes that configuration but means every note belongs to the same scope, which can make it harder to separate personal and professional content.
Concrete Configuration
Add this to your Neovim configuration file, typically init.lua, where require('neorg').setup is called.
require('neorg').setup({
modules = {
['core.dirman'] = {
workspaces = {
notes = vim.fn.expand('~/notes'),
work = vim.fn.expand('~/notes/work'),
},
default_workspace = 'notes',
},
['core.integrations.treesitter'] = {},
},
})
Here notes and work are workspace names mapped to directories. vim.fn.expand converts the tilde to your home directory so paths work from different Neovim working directories. The treesitter module connects .norg markup to tree-sitter queries for syntax highlighting and text objects.
Validation and Diagnostics
Run these checks inside Neovim after reloading your configuration.
Open or create an .norg file.
Where: Neovim command line.
Command: :e ~/notes/test.norg
Permissions: write permission to ~/notes.
Expected check: :set filetype? reports norg.
Risk: none beyond creating a test file.
Confirm the tree-sitter parser.
Where: Neovim command line.
Command: :TSInstallInfo norg
Permissions: none.
Expected check: the norg parser appears as installed.
Risk: if missing, run :TSInstall norg; this requires network access to download the parser.
Verify workspace mapping.
Where: Neovim command line.
Command: :Neorg workspace
Permissions: none.
Expected check: the listed workspaces and directories match your configuration table.
Risk: incorrect paths will not surface until you try to open files in that workspace.
Reload configuration.
Where: Neovim command line, with the config file open.
Command: :source %
Permissions: read permission to your config file.
Expected check: no error messages and the default workspace index opens.
Risk: a syntax error in Lua prevents Neorg from loading.
Limitations and Verification
Neorg module names and configuration schema can change between releases. This draft has not been executed against a live Neovim installation, so treat command output and configuration details as unverified until you confirm them with :help neorg and the checks above. The norg tree-sitter parser must be installed separately; highlighting may fail even when the module is enabled.
Reverting the Change
Editing init.lua changes your Neovim configuration state. To revert, remove or comment out the core.dirman block, restart Neovim, and confirm :Neorg workspace no longer lists the removed workspaces.