diff options
| author | historia <[not public]> | 2026-06-22 16:31:09 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-22 16:31:09 -0400 |
| commit | 5c45d954f53a820b25b6e1fadc641d7c991c8506 (patch) | |
| tree | eb850dd4fd600cefad27950bee565ad6a9443777 /README.md | |
| parent | 98607a8a8c206e4ab2d4d47fb60f2d439a9d37d4 (diff) | |
| download | simple-denote.nvim-5c45d954f53a820b25b6e1fadc641d7c991c8506.tar.gz | |
feat: multiple notes directory support added. existing config remains backwards compatible so no worries.
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -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'}, '<leader>nt', ":Denote title<cr>", { desc = "Chang vim.keymap.set({'n','v'}, '<leader>nk', ":Denote keywords<cr>", { desc = "Change keywords" }) vim.keymap.set({'n','v'}, '<leader>nz', ":Denote signature<cr>", { desc = "Change signature" }) vim.keymap.set({'n','v'}, '<leader>ne', ":Denote extension<cr>", { desc = "Change extension" }) +vim.keymap.set({'n','v'}, '<leader>nd', ":Denote dir<cr>", { 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. |
