Skip to content

Commit

Permalink
fix(trouble-nvim): move mappings to <Leader>xt
Browse files Browse the repository at this point in the history
This is to avoid clashes with the [recent addition of `<Leader>x` to AstroNvim](AstroNvim/AstroNvim@99c2b13).
  • Loading branch information
rami3l committed Jul 13, 2024
1 parent 26e0364 commit 03cab3f
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions lua/astrocommunity/diagnostics/trouble-nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,20 @@ return {
"AstroNvim/astrocore",
opts = function(_, opts)
local maps = opts.mappings
local prefix = "<Leader>x"
local prefix = "<Leader>xt"
maps.n[prefix] = { desc = require("astroui").get_icon("Trouble", 1, true) .. "Trouble" }
maps.n[prefix .. "X"] = { "<Cmd>Trouble diagnostics toggle<CR>", desc = "Workspace Diagnostics (Trouble)" }
maps.n[prefix .. "x"] =
{ "<Cmd>Trouble diagnostics toggle filter.buf=0<CR>", desc = "Document Diagnostics (Trouble)" }
maps.n[prefix .. "l"] = { "<Cmd>Trouble loclist toggle<CR>", desc = "Location List (Trouble)" }
maps.n[prefix .. "q"] = { "<Cmd>Trouble quickfix toggle<CR>", desc = "Quickfix List (Trouble)" }
maps.n[prefix .. "X"] = { "<Cmd>Trouble diagnostics toggle<CR>", desc = "Workspace Diagnostics" }
maps.n[prefix .. "x"] = { "<Cmd>Trouble diagnostics toggle filter.buf=0<CR>", desc = "Document Diagnostics" }
maps.n[prefix .. "l"] = { "<Cmd>Trouble loclist toggle<CR>", desc = "Location List" }
maps.n[prefix .. "q"] = { "<Cmd>Trouble quickfix toggle<CR>", desc = "Quickfix List" }
if require("astrocore").is_available "todo-comments.nvim" then
maps.n[prefix .. "t"] = {
"<cmd>Trouble todo<cr>",
desc = "Todo (Trouble)",
desc = "Todo",
}
maps.n[prefix .. "T"] = {
"<cmd>Trouble todo filter={tag={TODO,FIX,FIXME}}<cr>",
desc = "Todo/Fix/Fixme (Trouble)",
desc = "Todo/Fix/Fixme",
}
end
end,
Expand Down

0 comments on commit 03cab3f

Please sign in to comment.