diff --git a/lua/absolute/after/todo-comments.lua b/lua/absolute/after/todo-comments.lua new file mode 100644 index 0000000..2cd25a3 --- /dev/null +++ b/lua/absolute/after/todo-comments.lua @@ -0,0 +1,25 @@ +local todo_comments = require("todo-comments") + +todo_comments.setup({}) + +local opts = { noremap = true, silent = true } + +opts.desc = "Jump to previous comment" +vim.keymap.set("n", "[t", function() + todo_comments.jump_prev() +end, opts) + +opts.desc = "Jump to next todo comment" +vim.keymap.set("n", "]t", function() + todo_comments.jump_next() +end, opts) + +opts.desc = "Open Comments in Telescope" +vim.keymap.set("n", "pt", function() + vim.cmd([[TodoTelescope]]) +end, opts) + +opts.desc = "Open Comments in Trouble" +vim.keymap.set("n", "tt", function() + vim.cmd([[TodoTrouble]]) +end, opts) diff --git a/lua/absolute/plugins/todo-comments.lua b/lua/absolute/plugins/todo-comments.lua new file mode 100644 index 0000000..6b9d90e --- /dev/null +++ b/lua/absolute/plugins/todo-comments.lua @@ -0,0 +1,7 @@ +return { + "folke/todo-comments.nvim", + dependencies = { "nvim-lua/plenary.nvim" }, + config = function() + require("absolute.after.todo-comments") + end, +}