- Lua 100%
| lua/rs_notes | ||
| plugin | ||
| README.md | ||
rs-notes
Simple Neovim notes plugin for markdown-based note vaults.
rs-notes is built for a LazyVim environment and uses LazyVim.pick() for file finding and text search, so it follows the picker backend already configured in your setup.
Features
- Configure a root notes directory
- Group project notes in project folders
- Find markdown notes in that directory
- Search text across markdown notes
- Create new root-level markdown notes
- Open or create a daily note in a dedicated daily folder
- Add frontmatter to new notes by default
Requirements
- Neovim
- LazyVim
- A configured LazyVim picker backend through
LazyVim.pick() - An existing notes directory
Installation
GitHub plugin spec:
{
"your-user/rs-notes",
config = function()
require("rs_notes").setup({
notes_dir = "~/notes",
})
end,
}
Local plugin spec:
{
dir = "/path/to/rs-notes",
config = function()
require("rs_notes").setup({
notes_dir = "~/notes",
})
end,
}
If you are developing the plugin from its own directory, you can also point Lazy to the current directory explicitly:
{
dir = "/absolute/path/to/rs-notes",
config = function()
require("rs_notes").setup({
notes_dir = "~/notes",
})
end,
}
Using an absolute path is the safest option. Using the process current working directory for the plugin path is possible, but only reliable if Neovim is always started from the plugin root.
Setup
Minimal setup:
require("rs_notes").setup({
notes_dir = "~/notes",
daily_notes_dir = "daily",
projects_dir = "projects",
scratch_notes_dir = "scratch",
scratch_retention_days = 7,
})
This is enough to start creating notes. New notes include this default template:
---
id: 20260424153000
tags: []
created: 2026-04-24
---
# Note Title
Customize the built-in template:
require("rs_notes").setup({
notes_dir = "~/notes",
daily_notes_dir = "daily",
projects_dir = "projects",
scratch_notes_dir = "scratch",
scratch_retention_days = 7,
note_template = {
id = "timestamp",
created = "date",
tags = { "inbox" },
include_title_heading = true,
},
})
With a template for new notes:
require("rs_notes").setup({
notes_dir = "~/notes",
new_note_template = function(title)
return {
"---",
"tags: []",
"---",
"",
"# " .. title,
"",
}
end,
})
Commands
:RSNotes- Open a small command picker for note actions
:RSNotesFind- Open a picker for markdown files in
notes_dir
- Open a picker for markdown files in
:RSNotesSearch- Search across markdown files in
notes_dir
- Search across markdown files in
:RSNotesSearch <query>- Start search with an initial query
:RSNotesNew- Prompt for a note title and create a new note
:RSNotesNew My Note- Create
my-note.mdand open it
- Create
:RSNotesToday- Open or create today's note in
daily_notes_dirwith thedailytag
- Open or create today's note in
:RSNotesProjects- Pick a project folder and browse notes inside it
:RSNotesProjectNew- Create a new project folder under
projects_dir
- Create a new project folder under
:RSNotesProjectNote- Pick a project folder and create a note inside it with the project folder as a tag
:RSNotesScratch- Open or create today's scratch note in
scratch_notes_diras an empty note
- Open or create today's scratch note in
:RSNotesScratches- Browse scratch notes inside
scratch_notes_dir
- Browse scratch notes inside
:RSNotesScratchClean- Delete daily scratch notes older than
scratch_retention_days
- Delete daily scratch notes older than
:RSNotesDelete- Delete the note in the current buffer after confirmation
Suggested Keymaps
LazyVim keymap example:
{
"your-user/rs-notes",
config = function()
require("rs_notes").setup({
notes_dir = "~/notes",
})
vim.keymap.set("n", "<leader>N", "<cmd>RSNotes<cr>", { desc = "Notes Menu" })
vim.keymap.set("n", "<leader>Nd", "<cmd>RSNotesToday<cr>", { desc = "Today's Note" })
vim.keymap.set("n", "<leader>Nf", "<cmd>RSNotesFind<cr>", { desc = "Find Notes" })
vim.keymap.set("n", "<leader>np", "<cmd>RSNotesProjects<cr>", { desc = "Project Notes" })
vim.keymap.set("n", "<leader>Ns", "<cmd>RSNotesSearch<cr>", { desc = "Search Notes" })
vim.keymap.set("n", "<leader>Nt", "<cmd>RSNotesScratch<cr>", { desc = "Scratch Note" })
vim.keymap.set("n", "<leader>Nn", "<cmd>RSNotesNew<cr>", { desc = "New Note" })
vim.keymap.set("n", "<leader>Nx", "<cmd>RSNotesDelete<cr>", { desc = "Delete Note" })
vim.keymap.set("n", "<leader>NP", "<cmd>RSNotesProjectNew<cr>", { desc = "New Project" })
vim.keymap.set("n", "<leader>Nm", "<cmd>RSNotesProjectNote<cr>", { desc = "New Project Note" })
vim.keymap.set("n", "<leader>NT", "<cmd>RSNotesScratchClean<cr>", { desc = "Clean Scratch Notes" })
end,
}
If you prefer to keep keymaps in lua/config/keymaps.lua:
vim.keymap.set("n", "<leader>N", "<cmd>RSNotes<cr>", { desc = "Notes Menu" })
vim.keymap.set("n", "<leader>Nd", "<cmd>RSNotesToday<cr>", { desc = "Today's Note" })
vim.keymap.set("n", "<leader>Nf", "<cmd>RSNotesFind<cr>", { desc = "Find Notes" })
vim.keymap.set("n", "<leader>Np", "<cmd>RSNotesProjects<cr>", { desc = "Project Notes" })
vim.keymap.set("n", "<leader>Ns", "<cmd>RSNotesSearch<cr>", { desc = "Search Notes" })
vim.keymap.set("n", "<leader>Nt", "<cmd>RSNotesScratch<cr>", { desc = "Scratch Note" })
vim.keymap.set("n", "<leader>Nn", "<cmd>RSNotesNew<cr>", { desc = "New Note" })
vim.keymap.set("n", "<leader>Nx", "<cmd>RSNotesDelete<cr>", { desc = "Delete Note" })
vim.keymap.set("n", "<leader>NP", "<cmd>RSNotesProjectNew<cr>", { desc = "New Project" })
vim.keymap.set("n", "<leader>Nm", "<cmd>RSNotesProjectNote<cr>", { desc = "New Project Note" })
vim.keymap.set("n", "<leader>NT", "<cmd>RSNotesScratchClean<cr>", { desc = "Clean Scratch Notes" })
Behavior
- Notes are plain
.mdfiles - New notes are created at the root of
notes_dir - Daily notes are created inside
daily_notes_dir - Project folders are created inside
projects_dir - Scratch notes are created inside
scratch_notes_dir - Daily notes created by
RSNotesTodayinclude thedailytag by default - Project notes created by
RSNotesProjectNoteinclude the project folder name as a tag by default - Scratch notes created by
RSNotesScratchare empty and do not include metadata RSNotesScratchCleanonly deletesYYYY-MM-DD.mdfiles inscratch_notes_dirolder thanscratch_retention_daysRSNotesDeleteonly deletes markdown files insidenotes_dir- New note filenames are slugified from the title
- Duplicate filenames are resolved with
-1,-2, and so on - The built-in template adds frontmatter by default
new_note_templateoverrides the built-in template completely
Notes
notes_dirmust already exist- The plugin currently targets
LazyVim.pick()instead of using Telescope or Fzf directly