Skip to content

Commit

Permalink
style: fix code style, use za to fold.
Browse files Browse the repository at this point in the history
  • Loading branch information
ayamir committed Jan 14, 2025
1 parent 3e7dfb2 commit 3b7b8cf
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions lua/modules/configs/ui/edgy.lua
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
return function()
local trouble_filter = function(_, win)
return vim.w[win].trouble
and vim.w[win].trouble.position == "right"
and vim.w[win].trouble.type == "split"
and vim.w[win].trouble.relative == "editor"
and not vim.w[win].trouble_preview
local trouble_filter = function(position)
return function(_, win)
return vim.w[win].trouble
and vim.w[win].trouble.position == position
and vim.w[win].trouble.type == "split"
and vim.w[win].trouble.relative == "editor"
and not vim.w[win].trouble_preview
end
end

require("modules.utils").load_plugin("edgy", {
Expand All @@ -20,7 +22,7 @@ return function()
["q"] = false,
["Q"] = false,
["<c-q>"] = false,
["zz"] = function(win)
["za"] = function(win)
win:toggle()
end,
["<A-i>"] = function(win)
Expand Down Expand Up @@ -76,23 +78,17 @@ return function()
ft = "trouble",
pinned = true,
collapsed = false,
size = { height = 0.6, width = 0.2 },
open = "Trouble symbols toggle win.position=right",
filter = trouble_filter,
size = {
height = 0.5,
width = 0.2,
},
filter = trouble_filter("right"),
},
{
ft = "trouble",
pinned = true,
collapsed = true,
size = { height = 0.4, width = 0.2 },
open = "Trouble lsp toggle win.position=right",
filter = trouble_filter,
size = {
height = 0.3,
width = 0.2,
},
filter = trouble_filter("right"),
},
},
})
Expand Down

0 comments on commit 3b7b8cf

Please sign in to comment.