This commit is contained in:
@ -53,26 +53,7 @@ return {
|
|||||||
{ title = "Neotest Output", ft = "neotest-output-panel", size = { height = 15 } },
|
{ title = "Neotest Output", ft = "neotest-output-panel", size = { height = 15 } },
|
||||||
},
|
},
|
||||||
left = {
|
left = {
|
||||||
{
|
|
||||||
title = "Neo-Tree",
|
|
||||||
ft = "neo-tree",
|
|
||||||
filter = function(buf)
|
|
||||||
return vim.b[buf].neo_tree_source == "filesystem"
|
|
||||||
end,
|
|
||||||
pinned = true,
|
|
||||||
open = function()
|
|
||||||
require("neo-tree.command").execute({ dir = LazyVim.root() })
|
|
||||||
end,
|
|
||||||
size = { height = 0.5 },
|
|
||||||
},
|
|
||||||
{ title = "Neotest Summary", ft = "neotest-summary" },
|
{ title = "Neotest Summary", ft = "neotest-summary" },
|
||||||
{
|
|
||||||
title = "Neo-Tree Other",
|
|
||||||
ft = "neo-tree",
|
|
||||||
filter = function(buf)
|
|
||||||
return vim.b[buf].neo_tree_source ~= nil
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
-- "neo-tree",
|
-- "neo-tree",
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
@ -95,22 +76,43 @@ return {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- only add neo-tree sources if they are enabled in config
|
if LazyVim.has("neo-tree.nvim") then
|
||||||
local neotree_opts = LazyVim.opts("neo-tree.nvim")
|
table.insert(opts.left, 1, {
|
||||||
local neotree_sources = { buffers = "top", git_status = "right" }
|
title = "Neo-Tree",
|
||||||
|
ft = "neo-tree",
|
||||||
|
filter = function(buf)
|
||||||
|
return vim.b[buf].neo_tree_source == "filesystem"
|
||||||
|
end,
|
||||||
|
pinned = true,
|
||||||
|
open = function()
|
||||||
|
require("neo-tree.command").execute({ dir = LazyVim.root() })
|
||||||
|
end,
|
||||||
|
size = { height = 0.5 },
|
||||||
|
})
|
||||||
|
-- only add neo-tree sources if they are enabled in config
|
||||||
|
local neotree_opts = LazyVim.opts("neo-tree.nvim")
|
||||||
|
local neotree_sources = { buffers = "top", git_status = "right" }
|
||||||
|
|
||||||
for source, pos in pairs(neotree_sources) do
|
for source, pos in pairs(neotree_sources) do
|
||||||
if vim.list_contains(neotree_opts.sources, source) then
|
if vim.list_contains(neotree_opts.sources or {}, source) then
|
||||||
table.insert(opts.left, 3, {
|
table.insert(opts.left, {
|
||||||
title = "Neo-Tree " .. source:gsub("_", " "),
|
title = "Neo-Tree " .. source:gsub("_", " "),
|
||||||
ft = "neo-tree",
|
ft = "neo-tree",
|
||||||
filter = function(buf)
|
filter = function(buf)
|
||||||
return vim.b[buf].neo_tree_source == source
|
return vim.b[buf].neo_tree_source == source
|
||||||
end,
|
end,
|
||||||
pinned = true,
|
pinned = true,
|
||||||
open = "Neotree position=" .. pos .. " " .. source,
|
open = "Neotree position=" .. pos .. " " .. source,
|
||||||
})
|
})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
table.insert(opts.left, {
|
||||||
|
title = "Neo-Tree Other",
|
||||||
|
ft = "neo-tree",
|
||||||
|
filter = function(buf)
|
||||||
|
return vim.b[buf].neo_tree_source ~= nil
|
||||||
|
end,
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, pos in ipairs({ "top", "bottom", "left", "right" }) do
|
for _, pos in ipairs({ "top", "bottom", "left", "right" }) do
|
||||||
|
Reference in New Issue
Block a user