summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/plugins/trouble.lua
blob: 6d72bd9a6e475d37867252b00260589b6dc267b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
return {
    "folke/trouble.nvim",
    dependencies = { "nvim-tree/nvim-web-devicons" },
    opts = {},
    config = function()
        local map = require("helpers.keys").map
        map("n", "<leader>xx", function() require("trouble").open() end, "trouble: open")
        map("n", "<leader>xw", function() require("trouble").open("workspace_diagnostics") end, "trouble: open workspace diagnostics")
        map("n", "<leader>xd", function() require("trouble").open("document_diagnostics") end, "trouble: open document diagnostics")
        map("n", "<leader>xq", function() require("trouble").open("quickfix") end, "trouble: open quickfix")
        map("n", "<leader>xl", function() require("trouble").open("loclist") end, "trouble: open loclist")
        map("n", "gR", function() require("trouble").open("lsp_references") end, "trouble: open lsp references")
    end,
}