return { "folke/trouble.nvim", dependencies = "nvim-tree/nvim-web-devicons", cmd = "TroubleToggle", init = function() vim.keymap.set("n", "<leader>xx", "<cmd>TroubleToggle<cr>") vim.keymap.set("n", "<leader>xw", "<cmd>TroubleToggle workspace_diagnostics<cr>") vim.keymap.set("n", "<leader>xd", "<cmd>TroubleToggle document_diagnostics<cr>") vim.keymap.set("n", "<leader>xq", "<cmd>TroubleToggle quickfix<cr>") vim.keymap.set("n", "<leader>xl", "<cmd>TroubleToggle loclist<cr>") end, config = true, opts = { mode = "workspace_diagnostics", auto_open = false, auto_close = false, auto_preview = true, auto_jump = { "lsp_definitions", "lsp_references", "lsp_implementations" }, }, }