Skip to content

Commit

Permalink
feat(trouble-nvim): add mappings for todo-comments.nvim (#879)
Browse files Browse the repository at this point in the history
* feat(trouble-nvim): add mappings for `todo-comments.nvim`

* docs(trouble-nvim): Add note about integration with todo-comments.nvim

---------

Co-authored-by: Uzair Aftab <[email protected]>
  • Loading branch information
manuuurino and Uzaaft authored Apr 15, 2024
1 parent 1f6c37d commit 69cfa52
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/astrocommunity/diagnostics/trouble-nvim/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
🚦 A pretty diagnostics, references, telescope results, quickfix and location list to help you solve all the trouble your code is causing.

**Repository:** <https://github.com/folke/trouble.nvim>

_Note_: This plugin will also configure mappings to enable integration with `todo-comments.nvim` if it's being imported and enabled another place.
10 changes: 10 additions & 0 deletions lua/astrocommunity/diagnostics/trouble-nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ return {
{ "<Cmd>TroubleToggle document_diagnostics<CR>", desc = "Document Diagnostics (Trouble)" }
maps.n[prefix .. "l"] = { "<Cmd>TroubleToggle loclist<CR>", desc = "Location List (Trouble)" }
maps.n[prefix .. "q"] = { "<Cmd>TroubleToggle quickfix<CR>", desc = "Quickfix List (Trouble)" }
if require("astrocore").is_available "todo-comments.nvim" then
maps.n["<leader>xt"] = {
"<cmd>TodoTrouble<cr>",
desc = "Todo (Trouble)",
}
maps.n["<leader>xT"] = {
"<cmd>TodoTrouble keywords=TODO,FIX,FIXME<cr>",
desc = "Todo/Fix/Fixme (Trouble)",
}
end
end,
},
},
Expand Down

0 comments on commit 69cfa52

Please sign in to comment.