feat: trouble v3

This commit is contained in:
Folke Lemaitre
2024-05-30 14:41:13 +02:00
parent ae098d67d6
commit 95d055dcf7
7 changed files with 47 additions and 134 deletions

View File

@ -105,6 +105,19 @@ return {
end,
},
}
for _, pos in ipairs({ "top", "bottom", "left", "right" }) do
opts[pos] = opts[pos] or {}
table.insert(opts[pos], {
ft = "trouble",
filter = function(_buf, win)
return vim.w[win].trouble
and vim.w[win].trouble.position == pos
and vim.w[win].trouble.type == "split"
and vim.w[win].trouble.relative == "editor"
and not vim.w[win].trouble_preview
end,
})
end
return opts
end,
},