feat(nvim): add bind to focus on trouble window
All checks were successful
Check Formatting of Files / Check-Formatting (push) Successful in 53s

This commit is contained in:
Price Hiller 2024-04-22 10:07:53 -05:00
parent 27d3bf6b24
commit 33b75938b2
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB

View File

@ -36,7 +36,17 @@ return {
"<cmd>Trouble lsp_type_definitions toggle win.position=right<CR>", "<cmd>Trouble lsp_type_definitions toggle win.position=right<CR>",
desc = "LSP: Type Definitions", desc = "LSP: Type Definitions",
}, },
{ "<leader>xx", "<cmd>Trouble lsp toggle win.position=right<CR>", desc = "Trouble: LSP" }, {
"<leader>xx",
function()
local trouble = require("trouble")
if trouble.is_open() then
---@diagnostic disable-next-line: missing-parameter
trouble.focus()
end
end,
desc = "Trouble: Focus Trouble",
},
{ {
"<leader>xd", "<leader>xd",
"<cmd>Trouble diagnostics toggle win.position=right<cr>", "<cmd>Trouble diagnostics toggle win.position=right<cr>",
@ -59,7 +69,6 @@ return {
opts = { opts = {
focus = true, focus = true,
auto_close = true, auto_close = true,
max_items = 2000,
win = { win = {
type = "split", type = "split",
}, },