Neovim plugin that displays the age of TODO comments as inline virtual text.

:TSInstall <lang>){
"harukikuri/todoage.nvim",
}
:Todoage - refresh the current buffer:TodoageToggle - toggle annotations and auto-refresh on/offopts = {
-- keywords = { "TODO", "FIXME", "HACK" },
-- format = function(age_days)
-- return string.format("(%d days)", age_days)
-- end,
}
| Option | Notes |
|---|---|
keywords |
Replaces defaults wholesale; list everything you want. Letters, digits, and underscores only. |
format |
Receives (age_days, info), returns the label string. info = { author, sha, time } from git blame. A throw or non-string warns once and skips. |
The second format argument carries the blame data for the line, so you can show more than just the age:
format = function(age_days, info)
return string.format("(%d days, %s)", age_days, info.author)
end
vim.api.nvim_set_hl(0, "TodoageAge", { fg = "#d7af5f" })
vim.api.nvim_set_hl(0, "TodoageUncommitted", { fg = "#5f5f5f", italic = true })
Designed to complement todo-comments.nvim and similar plugins.