add: todo comment

This commit is contained in:
asep.komarudin 2024-06-25 07:22:10 +07:00
parent 7162f65a13
commit b9949062dc
4 changed files with 30 additions and 0 deletions

View file

@ -131,6 +131,9 @@ pcode.columnline = true
-- https://github.com/okuuva/auto-save.nvim
pcode.auto_save = true
-- https://github.com/folke/todo-comments.nvim
pcode.todo_comment = true
-- https://github.com/nvim-telescope/telescope.nvim
---@alias telescope_themes
---| "cursor" # see `telescope.themes.get_cursor()`

View file

@ -0,0 +1,25 @@
local M = {}
if pcode.todo_comment then
M = {
"folke/todo-comments.nvim",
event = { "BufRead", "BufNewFile" },
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
local todo_comments = require("todo-comments")
-- set keymaps
local keymap = vim.keymap -- for conciseness
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()
end,
}
end
return M