fix(edgy): maintain same order

This commit is contained in:
Andre Freitas 2024-06-15 12:21:54 +00:00
parent 49b2e98c3f
commit 5abcd877cf

View file

@ -96,18 +96,6 @@ return {
}
-- only add neo-tree sources if they are enabled in config
if vim.list_contains(LazyVim.opts("neo-tree").sources, "git_status") then
table.insert(opts.left, 3, {
title = "Neo-Tree Git",
ft = "neo-tree",
filter = function(buf)
return vim.b[buf].neo_tree_source == "git_status"
end,
pinned = true,
open = "Neotree position=right git_status",
})
end
if vim.list_contains(LazyVim.opts("neo-tree").sources, "buffers") then
table.insert(opts.left, 3, {
title = "Neo-Tree Buffers",
@ -120,6 +108,18 @@ return {
})
end
if vim.list_contains(LazyVim.opts("neo-tree").sources, "git_status") then
table.insert(opts.left, 3, {
title = "Neo-Tree Git",
ft = "neo-tree",
filter = function(buf)
return vim.b[buf].neo_tree_source == "git_status"
end,
pinned = true,
open = "Neotree position=right git_status",
})
end
for _, pos in ipairs({ "top", "bottom", "left", "right" }) do
opts[pos] = opts[pos] or {}
table.insert(opts[pos], {