return { "folke/trouble.nvim", dependencies = { "nvim-tree/nvim-web-devicons" }, cmd = { "Trouble" }, keys = { { "fD", "Trouble diagnostics open", desc = "Find diagnostics (Trouble)", }, { "fd", "Trouble diagnostics open filter.buf=0", desc = "Find buffer diagnostics (Trouble)", }, { "ll", "Trouble symbols open", desc = "Symbols (Trouble)", }, { "li", "Trouble lsp open", desc = "LSP info of node (Trouble)", }, { "fq", "Trouble qflist open", desc = "Quickfix List (Trouble)", }, }, opts = function() ---@type trouble.Window.opts local win_opts = { -- size = { width = 30, height = 0.5 }, minimal = true, border = "rounded", position = "bottom", } ---@type trouble.Config return { focus = false, ---@type trouble.Window.opts preview = { type = "split", relative = "win", position = "top", }, ---@type table keys = { [""] = "jump_close", ["<2-leftmouse>"] = "jump_close", [""] = "jump_split_close", [""] = "jump_vsplit_close", ["v"] = "jump_split_close", ["s"] = "jump_vsplit_close", [""] = "cancel", -- hack to fool myself into thinking I move to the avobe window }, win = win_opts, ---@type table modes = { symbols = { focus = true, win = win_opts }, lsp_references = { focus = true, win = win_opts }, lsp = { focus = true, win = win_opts }, } } end }