From 8b4cda383453c95a8cd8b455f568496b149b428b Mon Sep 17 00:00:00 2001 From: pro100ton Date: Sat, 1 Feb 2025 10:59:59 +0300 Subject: [PATCH] Add TODO-comments plugin --- lua/custom/plugins/todo.lua | 8 ++++++++ lua/custom/todo.lua | 12 ++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 lua/custom/plugins/todo.lua create mode 100644 lua/custom/todo.lua 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)