Skip to content

dpi0/doo.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

doo.nvim

A Neovim plugin for managing project-specific todo lists in markdown format.

Features

  • Create per-project todo files in markdown format
  • Access todos quickly with keyboard shortcuts
  • Browse all todos with FZF
  • Lightweight and simple to use

Installation

Using lazy.nvim:

{
  'username/doo.nvim',
  dependencies = {'ibhagwan/fzf-lua'},
  opts = {
    -- Optional: customize default options
    -- doo_dir = "~/.local/share/nvim/doo/",  -- Default location to store todo files
    -- project_depth = 2,                     -- Number of directory levels to use for filename
  },
  keys = {
    { "<leader>T", function() require("doo").open_doo() end, desc = "Open directory todo" },
    { "<leader>tf", function() require("doo").list_doos() end, desc = "List all todos" },
  },
  lazy = true,  -- Only load on keybind usage
}

Usage

Key Mappings

Default keymappings (when using the configuration above):

  • <leader>T: Open a floating window with the todo for the current directory
  • <leader>tf: List all todos using fzf-lua with a preview window

In the fzf-lua Window

  • Enter: Open the selected todo in a floating window
  • Ctrl-X: Delete the selected todo file (without confirmation)

In the Todo Window

  • q: Save and close the todo window

Configuration

You can customize the plugin with these options:

require('doo').setup({
  doo_dir = "~/.local/share/nvim/doo/", -- Location to store todo files
  project_depth = 2,                     -- How many directory levels to use for filename
})

With lazy.nvim, you can define your keymaps in the plugin spec:

{
  'username/doo.nvim',
  dependencies = {'ibhagwan/fzf-lua'},
  opts = {
    doo_dir = "~/.config/nvim/todos/",  -- Custom directory
  },
  keys = {
    { "<leader>dt", function() require("doo").open_doo() end, desc = "Open directory todo" },
    { "<leader>dl", function() require("doo").list_doos() end, desc = "List all todos" },
  },
  lazy = true,
}

How It Works

  • Todo files are stored in ~/.local/share/nvim/doo/ by default
  • Each project gets its own todo file named after the last two directories in the path
    • Example: /home/bob/dev/python/cv_projectpython_cv_project.md
  • Files are in markdown format, perfect for todo lists

License

MIT

About

Simple per-directory Todo for Neovim

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages