A Neovim front-end for trac — a
plain-text, file-based task tracker CLI (written in Zig) that implements the
Tasks system spec. Tasks live as Markdown files on disk
(tasks/<HUID>/TASK.md), so the whole database is just a directory tree you
can commit to git, grep, and edit by hand. trac.nvim gives you a fuzzy
picker over your tasks, a task summary window, and commands for creating and
navigating tasks straight from TODO comments in your code.
trac implements and credits the spec from the original
tatr project by rexim, so trac.nvim also
works against tatr itself — just set program = "tatr".
- Task picker (
:TracLs) — a floating fuzzy finder over your tasks with a live preview, open/closed toggle, and export to the quickfix/location list. - Task summary (
:TracSummary) — a floating window showing the output oftrac summary(counts by status, tag, etc.), with syntax highlighting and arkey to refresh. - TODO → task — turn a
TODOcomment block under the cursor into a tracked task, rewriting the comment asTASK(<id>): <title>. - Jump to task file — put the cursor on a line containing a
TASK(<id>)marker and open that task's file directly. - Find references — from a
TASK(<id>)comment, grep the codebase for every place that references it (results land in the quickfix list). - Find referenced tasks — from a task's file, extract every HUUID it references and grep the codebase for all of them at once.
- Neovim >= 0.10
- The
tracCLI (or the compatibletatrCLI) available on yourPATH(set the executable name viaprogram, see Configuration) grep/ripgrepconfigured for:grep(used by the find commands)- Tree-sitter parser for whatever filetype you write
TODOcomments in (needed to detect comment blocks for:TracNewTask)
Using lazy.nvim:
{
"SyedDevop/trac.nvim",
opts = {
program = "trac", -- or "tatr"
},
}Using packer.nvim:
use({
"SyedDevop/trac.nvim",
config = function()
require("trac").setup({
program = "trac",
})
end,
})require("trac").setup({
-- The executable to shell out to for task management.
program = "trac", -- "trac" | "tatr"
})| Command | Description |
|---|---|
:TracLs |
Open the task picker. |
:TracSummary |
Open the task summary window. |
local trac = require("trac")
trac.setup(opts) -- configure the plugin
trac.ls_open() -- same as :TracLs
trac.summary_open() -- same as :TracSummary
trac.new_task() -- turn the TODO under the cursor into a task
trac.goto_task_file() -- open the task file for the TASK(<id>) on the current line
trac.find_task_references() -- grep for references to the TASK(<id>) on the current line
trac.find_referenced_tasks() -- grep for every task referenced by the current TASKS.md fileExample keymaps:
local trac = require("trac")
vim.keymap.set("n", "<leader>tl", trac.ls_open, { desc = "Trac: list tasks" })
vim.keymap.set("n", "<leader>ts", trac.summary_open, { desc = "Trac: summary" })
vim.keymap.set("n", "<leader>tn", trac.new_task, { desc = "Trac: new task from TODO" })
vim.keymap.set("n", "<leader>tg", trac.goto_task_file, { desc = "Trac: goto task file" })
vim.keymap.set("n", "<leader>tr", trac.find_task_references, { desc = "Trac: find task references" })
vim.keymap.set("n", "<leader>tR", trac.find_referenced_tasks, { desc = "Trac: find referenced tasks" })Write a TODO comment block, with the cursor anywhere inside it, and run
new_task (trac.new_task()):
-- TODO: Add tests for the parser
-- Cover the empty-input and malformed-HUUID cases.The comment is rewritten in place with the new task's id:
-- TASK(20260922-075442): Add tests for the parserWith the cursor on a line containing TASK(<id>):
goto_task_file()opens that task's file.find_task_references()greps the codebase for<id>and opens the quickfix list with every match.
Open a task's TASKS.md (inside a directory named by its HUUID, e.g.
20260922-075442/TASKS.md) and run find_referenced_tasks() to grep the
codebase for every HUUID mentioned in that file at once.
Inside :TracLs:
| Key | Action |
|---|---|
<CR> |
Open the selected task |
<C-q> |
Send all shown tasks to the location list |
<C-t> |
Toggle between open/closed tasks |
<C-n>/<C-p> or <Down>/<Up> |
Move selection |
<C-d>/<C-u> |
Scroll the preview |
<Esc> |
Close the picker |
make test # run the plenary test suite
make lint # run luacheck- SyedDevop/trac — the task tracker CLI
this plugin is a Neovim front-end for. All task storage and the
init,new,ls,find,summary, anduntagsubcommands come fromtracitself. - tsoding/tatr by rexim — the original
Tasks system spec and CLI that
tracimplements and is credited from, and whichtrac.nvimalso works against directly.