neovim/lua/plugins/neo-tree.lua
2024-04-01 10:49:16 -07:00

52 lines
1,010 B
Lua

return {
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
},
config = function()
vim.keymap.set("n", "<Leader>nn", ":Neotree toggle<CR>", { desc = "Toggle Neotree" })
local nt = require("neo-tree")
nt.setup({
open_files_do_not_replace_types = { "terminal", "trouble", "qf" },
filesystem = {
filtered_items = {
show_hidden_count = false,
hide_dotfiles = false,
hide_gitignored = true,
always_show = {
".env",
},
never_show = {
".git",
"thumbs.db",
".DS_Store",
},
},
},
window = {
mappings = {
["m"] = {
"move",
config = {
show_path = "relative",
},
},
},
},
event_handlers = {
{
event = "neo_tree_popup_input_ready",
handler = function()
-- Switch to normal inside popups by default.
vim.cmd.stopinsert()
end,
},
},
})
end,
}