feat: todo-comments.nvim

This commit is contained in:
punkfairie 2025-01-01 17:53:11 -08:00
parent 19170864e3
commit c3aeaf76ee
Signed by: punkfairie
GPG key ID: A509E8F77FB9D696
3 changed files with 41 additions and 0 deletions

View file

@ -53,6 +53,7 @@ with final.pkgs.lib; let
which-key-nvim
gitsigns-nvim
trouble-nvim
todo-comments-nvim
aerial-nvim
# Treesitter

View file

@ -6,6 +6,7 @@ return {
req('gitsigns-nvim'),
req('grug-far-nvim'),
req('neo-tree-nvim'),
req('todo-comments-nvim'),
req('trouble-nvim'),
req('which-key-nvim'),
}

View file

@ -0,0 +1,39 @@
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,
}