-
-
Notifications
You must be signed in to change notification settings - Fork 215
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.dirman.utils
- A set of utilities for thecore.dirman
module. -
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.autocommands
core.clipboard
core.clipboard.code-blocks
core.completion
core.concealer
core.defaults
core.dirman
core.dirman.utils
core.esupports.hop
core.esupports.indent
core.esupports.metagen
core.export
core.export.markdown
core.fs
core.highlights
core.integrations.coq_nvim
core.integrations.nvim-cmp
core.integrations.nvim-compe
core.integrations.treesitter
core.itero
core.journal
core.keybinds
core.latex.renderer
core.looking-glass
core.neorgcmd
core.neorgcmd.commands.return
core.pivot
core.presenter
core.promo
core.qol.toc
core.qol.todo_items
core.queries.native
core.scanner
core.storage
core.summary
core.syntax
core.tangle
core.tempus
core.text-objects
core.todo-introspector
core.ui
core.ui.calendar