fix(edgy): neo-tree. See #3667
This commit is contained in:
@ -96,28 +96,21 @@ return {
|
||||
}
|
||||
|
||||
-- only add neo-tree sources if they are enabled in config
|
||||
if vim.list_contains(LazyVim.opts("neo-tree").sources, "buffers") then
|
||||
table.insert(opts.left, 3, {
|
||||
title = "Neo-Tree Buffers",
|
||||
ft = "neo-tree",
|
||||
filter = function(buf)
|
||||
return vim.b[buf].neo_tree_source == "buffers"
|
||||
end,
|
||||
pinned = true,
|
||||
open = "Neotree position=top buffers",
|
||||
})
|
||||
end
|
||||
local neotree_opts = LazyVim.opts("neo-tree.nvim")
|
||||
local neotree_sources = { buffers = "top", git_status = "right" }
|
||||
|
||||
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",
|
||||
})
|
||||
for source, pos in pairs(neotree_sources) do
|
||||
if vim.list_contains(neotree_opts.sources, source) then
|
||||
table.insert(opts.left, 3, {
|
||||
title = "Neo-Tree " .. source:gsub("_", " "),
|
||||
ft = "neo-tree",
|
||||
filter = function(buf)
|
||||
return vim.b[buf].neo_tree_source == source
|
||||
end,
|
||||
pinned = true,
|
||||
open = "Neotree position=" .. pos .. " " .. source,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
for _, pos in ipairs({ "top", "bottom", "left", "right" }) do
|
||||
|
Reference in New Issue
Block a user