From 5c45d954f53a820b25b6e1fadc641d7c991c8506 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Mon, 22 Jun 2026 16:31:09 -0400 Subject: feat: multiple notes directory support added. existing config remains backwards compatible so no worries. --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index fea44da..bdcd00b 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ Example config via [lazy.nvim](https://github.com/folke/lazy.nvim) dir = "~/notes", -- Notes directory (should already exist) add_heading = true, -- Add a md/org heading to new notes retitle_heading = true, -- Replace the first line heading when retitling + directories = {}, -- Optional: multiple notes directories (see below) }, }, ``` @@ -46,6 +47,7 @@ vim.keymap.set({'n','v'}, 'nt', ":Denote title", { desc = "Chang vim.keymap.set({'n','v'}, 'nk', ":Denote keywords", { desc = "Change keywords" }) vim.keymap.set({'n','v'}, 'nz', ":Denote signature", { desc = "Change signature" }) vim.keymap.set({'n','v'}, 'ne', ":Denote extension", { desc = "Change extension" }) +vim.keymap.set({'n','v'}, 'nd', ":Denote dir", { desc = "Switch directory" }) ``` ## Manual Install @@ -89,8 +91,26 @@ require('simple-denote').setup({ " Rename the current file to a new extension :Denote extension + +" Switch active notes directory (requires directories = {...} config) +:Denote dir +``` + +# Multi-Directory Support + +To work with multiple notes directories, add them to `directories`: + +```lua +require('simple-denote').setup({ + dir = "~/notes", -- default active directory + directories = { "~/notes", "~/work", "~/projects" }, +}) ``` +Use `:Denote dir` to select a directory. The active directory is exposed as `vim.g.denote_dir` so other plugins can read it. + +When `directories` is empty (the default), nothing changes and the plugin works identically so I don't break anything for anyone who happens to be using this. + # Credits * [HumanEntity/denote.nvim](https://github.com/HumanEntity/denote.nvim) - This project was based on denote.nvim and modified to suit my personal preference or closer adhere to the original Denote spec. -- cgit v1.2.3