nvim: Fix trouble for major version update

Fixed for new invocation usage and removed deprecated commands.
Added telescope functionality (to push results into trouble) though I am
not quite happy with the close coupling yet. Have not found an easy way
to only have this mapping be created if trouble exists.
This commit is contained in:
Marty Oehme 2024-06-06 22:32:27 +02:00
parent 1771a61334
commit 94c2d83c86
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
2 changed files with 7 additions and 5 deletions

View file

@ -235,13 +235,10 @@ return {
opts = {},
cmd = {
"Trouble",
"TroubleRefresh",
"TroubleToggle",
"TroubleClose",
},
keys = {
{ "<leader>sd", "<cmd>Trouble workspace_diagnostics<cr>", silent = true, desc = "diagnostics workspace" },
{ "<leader>sD", "<cmd>Trouble document_diagnostics<cr>", silent = true, desc = "diagnostics document" },
{ "<leader>sd", "<cmd>Trouble diagnostics toggle<cr>", silent = true, desc = "diagnostics workspace" },
{ "<leader>sD", "<cmd>Trouble diagnostics toggle filter.buf=0<cr>", silent = true, desc = "diagnostics document" },
},
},

View file

@ -36,6 +36,11 @@ return {
prompt_prefix = "󰍉 ",
selection_caret = "󰳟 ",
color_devicons = true,
mappings = {
-- FIXME Find way to only invoke this *IF* trouble plugin is found
i = { ["<c-t>"] = require("trouble.sources.telescope").open },
n = { ["<c-t>"] = require("trouble.sources.telescope").open },
}
},
pickers = {
buffers = { theme = "ivy" },