-
-
Notifications
You must be signed in to change notification settings - Fork 233
Dirman
The dirman module handles different collections of notes in separate directories.
core.dirman provides other modules the ability to see which directories the user is in, where
each note collection is stored and how to interact with it.
When writing notes, it is often crucial to have notes on a certain topic be isolated from notes on another topic.
Dirman achieves this with a concept of "workspaces", which are named directories full of .norg notes.
To use core.dirman, simply load up the module in your configuration and specify the directories you would like to be managed for you:
require('neorg').setup {
load = {
["core.defaults"] = {},
["core.dirman"] = {
config = {
workspaces = {
my_ws = "~/neorg", -- Format: <name_of_workspace> = <path_to_workspace_root>
my_other_notes = "~/work/notes",
},
index = "index.norg", -- The name of the main (root) .norg file
}
}
}
}To query the current workspace, run :Neorg workspace. To set the workspace, run :Neorg workspace <workspace_name>.
After a recent update core.dirman will no longer change the current working directory after switching
workspace. To get the best experience it's recommended to set the autochdir Neovim option.
You can use dirman to create new notes in your workspaces.
local dirman = require('neorg').modules.get_module("core.dirman")
dirman.create_file("my_file", "my_ws", {
no_open = false, -- open file after creation?
force = false, -- overwrite file if exists
metadata = {} -- key-value table for metadata fields
})-
core.autocommands- Handles the creation and management of Neovim's autocommands. -
core.storage- Deals with storing persistent data across Neorg sessions. -
core.ui- A set of public functions to help developers create and manage UI (selection popups, prompts...) in their modules.
-
core.completion- A wrapper to interface with several different completion engines. -
core.journal- Easily track a journal within Neorg.
core.autocommandscore.clipboardcore.clipboard.code-blockscore.completioncore.concealercore.defaultscore.dirmancore.dirman.utilscore.esupports.hopcore.esupports.indentcore.esupports.metagencore.exportcore.export.htmlcore.export.markdowncore.fscore.highlightscore.integrations.coq_nvimcore.integrations.nvim-cmpcore.integrations.nvim-compecore.integrations.treesittercore.iterocore.journalcore.keybindscore.latex.renderercore.looking-glasscore.neorgcmdcore.neorgcmd.commands.returncore.pivotcore.presentercore.promocore.qol.toccore.qol.todo_itemscore.queries.nativecore.scannercore.storagecore.summarycore.syntaxcore.tanglecore.tempuscore.text-objectscore.todo-introspectorcore.uicore.ui.calendar