Add TODO-comments plugin

This commit is contained in:
pro100ton 2025-02-01 10:59:59 +03:00
parent 9cc1cc99cb
commit 8b4cda3834
2 changed files with 20 additions and 0 deletions

View file

@ -0,0 +1,8 @@
return {
"folke/todo-comments.nvim",
event = { "BufReadPre", "BufNewFile" },
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
require "custom/todo"
end,
}

12
lua/custom/todo.lua Normal file
View file

@ -0,0 +1,12 @@
local todo_comments = require("todo-comments")
local keymap = vim.keymap
keymap.set("n", "]t", function()
todo_comments.jump_next()
end, { desc = "Next todo comment" })
keymap.set("n", "[t", function()
todo_comments.jump_prev()
end, { desc = "Previous todo comment" })
todo_comments.setup(opts)