39 lines
1.2 KiB
Lua
39 lines
1.2 KiB
Lua
require("trouble").setup()
|
|
require("which-key").register({
|
|
x = { "<cmd>TroubleToggle document_diagnostics<cr>", "Document Diagnostics (Trouble)" },
|
|
X = { "<cmd>TroubleToggle workspace_diagnostics<cr>", "Workspace Diagnostics (Troule)" },
|
|
l = { "<cmd>TroubleToggle loclist<cr>", "Location List (Trouble)" },
|
|
q = { "<cmd>TroubleToggle quickfix<cr>", "Quickfix List (Trouble)" },
|
|
t = { "<cmd>TodoTrouble<cr>", "Todo (Trouble)" },
|
|
T = { "<cmd>TodoTrouble keywords=TODO,FIX,FIXME<cr>", "Todo/Fix/Fixme (Trouble)" },
|
|
}, { prefix = "<leader>x" })
|
|
require("which-key").register({
|
|
t = { "<cmd>TodoTelescope<cr>", "Todo" },
|
|
}, { prefix = "<leader>s" })
|
|
require("which-key").register({
|
|
["["] = {
|
|
q = {
|
|
function()
|
|
if require("trouble").is_open() then
|
|
require("trouble").previous({ skip_groups = true, jump = true })
|
|
else
|
|
vim.cmd.cprev()
|
|
end
|
|
end,
|
|
"Previous trouble/quickfix item",
|
|
},
|
|
},
|
|
["]"] = {
|
|
q = {
|
|
function()
|
|
if require("trouble").is_open() then
|
|
require("trouble").next({ skip_groups = true, jump = true })
|
|
else
|
|
vim.cmd.cnext()
|
|
end
|
|
end,
|
|
"Next trouble/quickfix item",
|
|
},
|
|
},
|
|
})
|