Files
dotfiles/vim/.vim/lua/plugins/neotree.lua
2024-01-06 06:45:45 -06:00

45 lines
861 B
Lua

return {
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v2.x",
config = function()
require("neo-tree").setup({
sources = {
"filesystem",
"buffers",
"git_status",
"diagnostics",
-- ...and any additional source
},
hijack_netrw_behavior = "open_current",
window = {
mappings = {
["O"] = "expand_all_nodes",
},
},
event_handlers = {
{
event = "neo_tree_buffer_enter",
handler = function(arg)
vim.opt.mouse = "a"
end,
},
{
event = "neo_tree_buffer_leave",
handler = function(arg)
vim.opt.mouse = ""
end,
},
},
})
end,
dependencies = {
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
},
keys = {
{ "<C-n>", ":Neotree filesystem reveal toggle reveal_force_cwd<cr>", desc = "Open NeoTree" },
},
},
}