Simple neovim plugin for notes taking
Find a file
2026-04-24 16:35:17 +02:00
lua/rs_notes don't add metadata to scratch notes 2026-04-24 16:35:17 +02:00
plugin don't add metadata to scratch notes 2026-04-24 16:35:17 +02:00
README.md don't add metadata to scratch notes 2026-04-24 16:35:17 +02:00

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
  • :RSNotesSearch
    • Search across markdown files in notes_dir
  • :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.md and open it
  • :RSNotesToday
    • Open or create today's note in daily_notes_dir with the daily tag
  • :RSNotesProjects
    • Pick a project folder and browse notes inside it
  • :RSNotesProjectNew
    • Create a new project folder under projects_dir
  • :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_dir as an empty note
  • :RSNotesScratches
    • Browse scratch notes inside scratch_notes_dir
  • :RSNotesScratchClean
    • Delete daily scratch notes older than scratch_retention_days
  • :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 .md files
  • 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 RSNotesToday include the daily tag by default
  • Project notes created by RSNotesProjectNote include the project folder name as a tag by default
  • Scratch notes created by RSNotesScratch are empty and do not include metadata
  • RSNotesScratchClean only deletes YYYY-MM-DD.md files in scratch_notes_dir older than scratch_retention_days
  • RSNotesDelete only deletes markdown files inside notes_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_template overrides the built-in template completely

Notes

  • notes_dir must already exist
  • The plugin currently targets LazyVim.pick() instead of using Telescope or Fzf directly