diff --git a/lua/custom/plugins/todo.lua b/lua/custom/plugins/todo.lua new file mode 100644 index 0000000..76b7eee --- /dev/null +++ b/lua/custom/plugins/todo.lua @@ -0,0 +1,8 @@ +return { + "folke/todo-comments.nvim", + event = { "BufReadPre", "BufNewFile" }, + dependencies = { "nvim-lua/plenary.nvim" }, + config = function() + require "custom/todo" + end, +} diff --git a/lua/custom/todo.lua b/lua/custom/todo.lua new file mode 100644 index 0000000..e10a301 --- /dev/null +++ b/lua/custom/todo.lua @@ -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)