kickstart.nvim/lua/kickstart/plugins/neo-tree.lua

36 lines
852 B
Lua

-- Neo-tree is a Neovim plugin to browse the file system
-- https://github.com/nvim-neo-tree/neo-tree.nvim
return {
"nvim-neo-tree/neo-tree.nvim",
version = "*",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
},
cmd = "Neotree",
keys = {
{ "\\", ":Neotree reveal<CR>", desc = "NeoTree reveal", silent = true },
{ "<leader>e", ":Neotree toggle<CR>", desc = "NeoTree toggle", silent = true },
},
opts = {
event_handlers = {
{
event = "file_opened",
handler = function(file_path)
--auto close
require("neo-tree").close_all()
end,
},
},
filesystem = {
window = {
mappings = {
["\\"] = "close_window",
},
},
},
},
}