mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 08:53:33 +02:00
fix(edgy): neo-tree. See #3667
This commit is contained in:
parent
67616b9520
commit
f22a6022c4
1 changed files with 14 additions and 21 deletions
|
@ -96,28 +96,21 @@ return {
|
||||||
}
|
}
|
||||||
|
|
||||||
-- only add neo-tree sources if they are enabled in config
|
-- only add neo-tree sources if they are enabled in config
|
||||||
if vim.list_contains(LazyVim.opts("neo-tree").sources, "buffers") then
|
local neotree_opts = LazyVim.opts("neo-tree.nvim")
|
||||||
table.insert(opts.left, 3, {
|
local neotree_sources = { buffers = "top", git_status = "right" }
|
||||||
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
|
|
||||||
|
|
||||||
if vim.list_contains(LazyVim.opts("neo-tree").sources, "git_status") then
|
for source, pos in pairs(neotree_sources) do
|
||||||
table.insert(opts.left, 3, {
|
if vim.list_contains(neotree_opts.sources, source) then
|
||||||
title = "Neo-Tree Git",
|
table.insert(opts.left, 3, {
|
||||||
ft = "neo-tree",
|
title = "Neo-Tree " .. source:gsub("_", " "),
|
||||||
filter = function(buf)
|
ft = "neo-tree",
|
||||||
return vim.b[buf].neo_tree_source == "git_status"
|
filter = function(buf)
|
||||||
end,
|
return vim.b[buf].neo_tree_source == source
|
||||||
pinned = true,
|
end,
|
||||||
open = "Neotree position=right git_status",
|
pinned = true,
|
||||||
})
|
open = "Neotree position=" .. pos .. " " .. source,
|
||||||
|
})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, pos in ipairs({ "top", "bottom", "left", "right" }) do
|
for _, pos in ipairs({ "top", "bottom", "left", "right" }) do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue