Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(trouble-nvim): add mappings for todo-comments.nvim #879

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading