2022-11-02 22:50:13 -07:00
|
|
|
require 'nvim-tree'.setup {
|
2023-08-15 08:48:03 -07:00
|
|
|
disable_netrw = false,
|
|
|
|
hijack_netrw = false,
|
2023-05-03 23:59:17 -07:00
|
|
|
-- open_on_setup = false,
|
|
|
|
-- ignore_ft_on_setup = {},
|
2022-11-02 22:50:13 -07:00
|
|
|
-- auto_close = false,
|
2023-08-15 08:48:03 -07:00
|
|
|
open_on_tab = false,
|
|
|
|
hijack_cursor = false,
|
|
|
|
update_cwd = false,
|
2022-11-02 22:50:13 -07:00
|
|
|
-- update_to_buf_dir = {
|
|
|
|
-- enable = true,
|
|
|
|
-- auto_open = true,
|
|
|
|
-- },
|
2023-08-15 08:48:03 -07:00
|
|
|
diagnostics = {
|
2022-11-02 22:50:13 -07:00
|
|
|
enable = true,
|
2023-08-15 08:48:03 -07:00
|
|
|
icons = { hint = "", info = "", warning = "", error = "" }
|
2022-11-02 22:50:13 -07:00
|
|
|
},
|
2023-08-15 08:48:03 -07:00
|
|
|
update_focused_file = { enable = false, update_cwd = false, ignore_list = {} },
|
|
|
|
system_open = { cmd = nil, args = {} },
|
|
|
|
filters = { dotfiles = false, custom = {} },
|
|
|
|
git = { enable = true, ignore = true, timeout = 500 },
|
|
|
|
view = {
|
2022-11-02 22:50:13 -07:00
|
|
|
width = 35,
|
|
|
|
-- height = 35,
|
2024-02-02 21:53:50 -08:00
|
|
|
-- hide_root_folder = false,
|
2022-11-02 22:50:13 -07:00
|
|
|
side = 'left',
|
|
|
|
-- auto_resize = false,
|
2023-08-15 08:48:03 -07:00
|
|
|
-- mappings = {
|
|
|
|
-- custom_only = false,
|
|
|
|
-- list = {}
|
|
|
|
-- },
|
2022-11-02 22:50:13 -07:00
|
|
|
number = false,
|
|
|
|
relativenumber = false,
|
|
|
|
signcolumn = "yes"
|
|
|
|
},
|
2023-08-15 08:48:03 -07:00
|
|
|
trash = { cmd = "trash", require_confirm = true },
|
|
|
|
actions = {
|
|
|
|
change_dir = { global = false },
|
|
|
|
open_file = { quit_on_open = false }
|
2022-11-02 22:50:13 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
-- local tree_cb = require'nvim-tree.config'.nvim_tree_callback
|
|
|
|
|
|
|
|
-- default mappings
|
|
|
|
local list = {
|
|
|
|
{ key = { "<CR>", "o", "<2-LeftMouse>" }, action = "edit" },
|
2023-08-15 08:48:03 -07:00
|
|
|
{ key = { "O" }, action = "edit_no_picker" },
|
|
|
|
{ key = { "<2-RightMouse>", "<C-]>" }, action = "cd" },
|
|
|
|
{ key = "<C-v>", action = "vsplit" }, { key = "<C-x>", action = "split" },
|
|
|
|
{ key = "<C-t>", action = "tabnew" }, { key = "<", action = "prev_sibling" },
|
|
|
|
{ key = ">", action = "next_sibling" }, { key = "P", action = "parent_node" },
|
|
|
|
{ key = "<BS>", action = "close_node" }, { key = "<Tab>", action = "preview" },
|
|
|
|
{ key = "K", action = "first_sibling" }, { key = "J", action = "last_sibling" },
|
2022-11-02 22:50:13 -07:00
|
|
|
{ key = "I", action = "toggle_ignored" },
|
2023-08-15 08:48:03 -07:00
|
|
|
{ key = "H", action = "toggle_dotfiles" }, { key = "R", action = "refresh" },
|
|
|
|
{ key = "a", action = "create" }, { key = "d", action = "remove" },
|
|
|
|
{ key = "D", action = "trash" }, { key = "r", action = "rename" },
|
|
|
|
{ key = "<C-r>", action = "full_rename" }, { key = "x", action = "cut" },
|
|
|
|
{ key = "c", action = "copy" }, { key = "p", action = "paste" },
|
|
|
|
{ key = "y", action = "copy_name" }, { key = "Y", action = "copy_path" },
|
2022-11-02 22:50:13 -07:00
|
|
|
{ key = "gy", action = "copy_absolute_path" },
|
|
|
|
{ key = "[c", action = "prev_git_item" },
|
2023-08-15 08:48:03 -07:00
|
|
|
{ key = "]c", action = "next_git_item" }, { key = "-", action = "dir_up" },
|
|
|
|
{ key = "s", action = "system_open" }, { key = "q", action = "close" },
|
|
|
|
{ key = "g?", action = "toggle_help" }
|
2022-11-02 22:50:13 -07:00
|
|
|
}
|