Project, Branch (from Git), or keep them Global.#tags to categorize your notes, with built-in autocompletion. IMPORTANT: doodle.nvim uses a local SQLite database to store your notes metadata. This requires the sqlite3 command-line tool to be installed on your system.
Here is a minimal, real-world setup guide using lazy.nvim.
Add the following to your lazy.nvim plugin specifications. This example includes recommended keymaps.
return {
"apdot/doodle",
dependencies = {
"kkharji/sqlite.lua",
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
},
config = function()
require("doodle").setup({
settings = {
-- This is the only required setting for sync to work.
-- Set it to the absolute path of your private notes repository.
git_repo = "path/to/your/initialized/git/repository",
sync = true,
}
})
end,
keys = {
{
"<space>df",
function() require("doodle"):toggle_finder() end,
desc = "Doodle Finder"
},
{
"<space>ds",
function() require("doodle"):sync() end,
desc = "Doodle Sync"
},
{
"<space>dl",
function() require("doodle"):toggle_links() end,
desc = "Doodle Links"
},
},
}
To enable the powerful Telescope integration, you must load doodle as an extension in your Telescope
config and set up your desired keymaps.
return {
'nvim-telescope/telescope.nvim',
dependencies = {
'nvim-lua/plenary.nvim',
'apdot/doodle', -- Ensure doodle is a dependency
},
config = function()
local telescope = require('telescope')
telescope.setup {
extensions = {
doodle = {} -- Enable the doodle extension
}
}
-- Load the extension
telescope.load_extension('doodle')
-- Example keymaps for doodle's telescope pickers
local keymap = vim.keymap.set
keymap("n", "<space>dd", function()
telescope.extensions.doodle.find_notes()
end, { desc = "Doodle Find Notes" })
keymap("n", "<space>ff", function()
telescope.extensions.doodle.find_files()
end, { desc = "Doodle Find Files" })
keymap("n", "<space>dy", function()
telescope.extensions.doodle.find_templates()
end, { desc = "Doodle Find Templates" })
end,
}
The :DoodleFinder is the heart of Doodle's navigation. It's not just a file list; it's a fully
editable Neovim buffer that represents the structure of your notes. This text-based interface
means you can manage your entire note hierarchy with the full power of Vim's text editing capabilities.
/ becomes a directory; otherwise, it's a note.cw or any other edit command to rename a note or directory in-place.dd to cut a note and p to paste it under a new directory.dd) to remove the note or directory.All changes are applied when you save the buffer with :w.
Doodle enhances standard markdown with powerful features for organization and context.
Keep your thoughts organized. Notes can be scoped to:
:DoodleHere to instantly create a new note that links back to your current file and line, capturing the surrounding code for context.Tags: line of your notes to categorize them for easy filtering and retrieval.:DoodleCreateTemplate <name> command.:DoodleExport <path> command to export your entire note database into structure of markdown files and directories, with metadata preserved in frontmatter.:DoodleImport <path> command to import data into Doodle. Each top-level folder within the specified import path is treated as a distinct project scope.Doodle integrates deeply with telescope.nvim for a world-class fuzzy-finding experience.
doodle.find_notes): Fuzzy find Doodle notes by title, path or #tags.doodle.find_files): A wrapper around Telescope's native file finder, but with a powerful addition: press <C-l> to insert a markdown link to the selected file directly into your current note.doodle.find_templates): Quickly find a template and apply it to your current buffer.find_notes picker, use <C-p>, <C-b>, and <C-g> to dynamically filter your search to the Project, Branch, or Global scopes.Doodle provides two powerful ways to understand the relationships between your notes.
Doodle uses a Git repository to enable seamless syncing between systems.
oplog.json) and periodic SNAPSHOT files in your designated Git repo. When you run :DoodleSync, it pulls the latest changes, applies them to your local SQLite database, and then pushes your local changes. This log-based approach is reliable and minimizes merge conflicts.git_repo config option to it. Doodle handles the rest.