diff options
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. |
