marleyvim/nvim/lua/plugins/editor/todo-comments-nvim.lua

39 lines
957 B
Lua

return {
'todo-comments.nvim',
event = { 'BufReadPost', 'BufWritePost', 'BufNewFile' },
cmd = { 'TodoTrouble', 'TodoTelescope' },
keys = {
{ '<LEADER>st', '<CMD>TodoTelescope<CR>', desc = 'todo search' },
{
'<LEADER>sT',
'<CMD>TodoTelescope keywords=TODO,FIX,FIXME<CR>',
desc = 'todo/fix/fixme search',
},
{ '<LEADER>xt', '<CMD>Trouble todo toggle<CR>', desc = 'todo' },
{
'<LEADER>xT',
'<CMD>Trouble todo toggle filter = {tag = {TODO,FIX,FIXME}}<CR>',
desc = 'todo/fix/fixme',
},
{
']t',
function()
require('todo-comments').jump_prev()
end,
desc = 'previous todo',
},
{
']t',
function()
require('todo-comments').jump_next()
end,
desc = 'next todo',
},
},
before = function()
require('lz.n').trigger_load({ 'trouble.nvim' })
end,
after = function()
require('todo-comments').setup({})
end,
}