From 24e3d137283e3a5b27b6abc0571e156868907f56 Mon Sep 17 00:00:00 2001 From: Henry Denny Date: Thu, 21 Mar 2024 09:12:11 +0000 Subject: [PATCH] Add `comments.lua` to plugins. --- lua/custom/plugins/comments.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lua/custom/plugins/comments.lua diff --git a/lua/custom/plugins/comments.lua b/lua/custom/plugins/comments.lua new file mode 100644 index 00000000..82438034 --- /dev/null +++ b/lua/custom/plugins/comments.lua @@ -0,0 +1,23 @@ +return { + "folke/todo-comments.nvim", + dependencies = { "nvim-lua/plenary.nvim" }, + config = function() + require("todo-comments").setup({}) + + -- Keymaps + vim.keymap.set("n", "]t", function() + require("todo-comments").jump_next() + end, { desc = "Next todo comment" }) + + vim.keymap.set("n", "[t", function() + require("todo-comments").jump_prev() + end, { desc = "Previous todo comment" }) + + vim.api.nvim_set_keymap( + "n", + "st", + ":TodoTelescope", + { noremap = true, desc = "[S]earch [T]odos" } + ) + end +}