mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-21 08:35:48 +02:00
add: todo comment
This commit is contained in:
parent
7162f65a13
commit
b9949062dc
4 changed files with 30 additions and 0 deletions
|
@ -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()`
|
||||
|
|
25
lua/plugins/todo-comments.lua
Normal file
25
lua/plugins/todo-comments.lua
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue