63 lines
1.5 KiB
Lua
63 lines
1.5 KiB
Lua
local utils = require("utils")
|
|
return {
|
|
{
|
|
"nvim-neo-tree/neo-tree.nvim",
|
|
branch = "v2.x",
|
|
dependencies = {
|
|
"nvim-lua/plenary.nvim",
|
|
"nvim-tree/nvim-web-devicons",
|
|
"MunifTanjim/nui.nvim",
|
|
},
|
|
opts = {
|
|
window = { position = "current" },
|
|
},
|
|
config = function()
|
|
require("neo-tree").setup({
|
|
filesystem = {
|
|
filtered_items = {
|
|
visible = true, -- Show files and folders starting with a dot `.`
|
|
hide_dotfiles = false,
|
|
hide_gitignored = false,
|
|
},
|
|
},
|
|
})
|
|
|
|
local keymap = vim.keymap
|
|
local opts = { noremap = true, silent = true }
|
|
utils.nmapkey("<leader>e", function()
|
|
require("neo-tree.command").execute({
|
|
position = "left",
|
|
action = "toggle",
|
|
})
|
|
end, "Toggle Neotree", opts)
|
|
utils.nmapkey("<leader>ee", function()
|
|
require("neo-tree.command").execute({
|
|
position = "left",
|
|
focus = "true",
|
|
})
|
|
end, "Open Neotree", opts)
|
|
utils.nmapkey("<leader>qe", function()
|
|
require("neo-tree.command").execute({
|
|
position = "left",
|
|
action = "close",
|
|
focus = "true",
|
|
})
|
|
end, "Close Neotree", opts)
|
|
|
|
utils.mapkey({ "n", "v" }, "|", "<cmd>Neotree reveal<cr>", "Reveal file in Neotree", opts)
|
|
utils.nmapkey(
|
|
"<leader>eb",
|
|
"<cmd>Neotree toggle show buffers right<cr>",
|
|
"Show buffers (Neotree)",
|
|
{ noremap = true, silent = true }
|
|
)
|
|
utils.nmapkey(
|
|
"<leader>gs",
|
|
"<cmd>Neotree float git_status<cr>",
|
|
"Show git status (Neotree)",
|
|
{ noremap = true, silent = true }
|
|
)
|
|
end,
|
|
},
|
|
}
|