|
|
|
@ -1,26 +1,3 @@
|
|
|
|
|
-- following options are the default
|
|
|
|
|
-- each of these are documented in `:help nvim-tree.OPTION_NAME`
|
|
|
|
|
vim.g.nvim_tree_icons = {
|
|
|
|
|
default = "",
|
|
|
|
|
symlink = "",
|
|
|
|
|
git = {
|
|
|
|
|
unstaged = "",
|
|
|
|
|
staged = "S",
|
|
|
|
|
unmerged = "",
|
|
|
|
|
renamed = "➜",
|
|
|
|
|
deleted = "",
|
|
|
|
|
untracked = "U",
|
|
|
|
|
ignored = "◌",
|
|
|
|
|
},
|
|
|
|
|
folder = {
|
|
|
|
|
default = "",
|
|
|
|
|
open = "",
|
|
|
|
|
empty = "",
|
|
|
|
|
empty_open = "",
|
|
|
|
|
symlink = "",
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
local status_ok, nvim_tree = pcall(require, "nvim-tree")
|
|
|
|
|
if not status_ok then
|
|
|
|
|
return
|
|
|
|
@ -31,93 +8,61 @@ if not config_status_ok then
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- Replaces auto_close
|
|
|
|
|
local tree_cb = nvim_tree_config.nvim_tree_callback
|
|
|
|
|
vim.api.nvim_create_autocmd("BufEnter", {
|
|
|
|
|
nested = true,
|
|
|
|
|
callback = function()
|
|
|
|
|
if #vim.api.nvim_list_wins() == 1 and vim.api.nvim_buf_get_name(0):match("NvimTree_") ~= nil then
|
|
|
|
|
vim.cmd "quit"
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
nvim_tree.setup {
|
|
|
|
|
disable_netrw = true,
|
|
|
|
|
hijack_netrw = true,
|
|
|
|
|
open_on_setup = false,
|
|
|
|
|
ignore_ft_on_setup = {
|
|
|
|
|
"startify",
|
|
|
|
|
"dashboard",
|
|
|
|
|
"alpha",
|
|
|
|
|
},
|
|
|
|
|
open_on_tab = false,
|
|
|
|
|
hijack_cursor = false,
|
|
|
|
|
update_cwd = true,
|
|
|
|
|
diagnostics = {
|
|
|
|
|
update_focused_file = {
|
|
|
|
|
enable = true,
|
|
|
|
|
update_cwd = true,
|
|
|
|
|
},
|
|
|
|
|
renderer = {
|
|
|
|
|
root_folder_modifier = ":t",
|
|
|
|
|
icons = {
|
|
|
|
|
hint = "",
|
|
|
|
|
info = "",
|
|
|
|
|
warning = "",
|
|
|
|
|
error = "",
|
|
|
|
|
glyphs = {
|
|
|
|
|
default = "",
|
|
|
|
|
symlink = "",
|
|
|
|
|
folder = {
|
|
|
|
|
arrow_open = "",
|
|
|
|
|
arrow_closed = "",
|
|
|
|
|
default = "",
|
|
|
|
|
open = "",
|
|
|
|
|
empty = "",
|
|
|
|
|
empty_open = "",
|
|
|
|
|
symlink = "",
|
|
|
|
|
symlink_open = "",
|
|
|
|
|
},
|
|
|
|
|
git = {
|
|
|
|
|
unstaged = "",
|
|
|
|
|
staged = "S",
|
|
|
|
|
unmerged = "",
|
|
|
|
|
renamed = "➜",
|
|
|
|
|
untracked = "U",
|
|
|
|
|
deleted = "",
|
|
|
|
|
ignored = "◌",
|
|
|
|
|
},
|
|
|
|
|
update_focused_file = {
|
|
|
|
|
enable = true,
|
|
|
|
|
update_cwd = true,
|
|
|
|
|
ignore_list = {},
|
|
|
|
|
},
|
|
|
|
|
system_open = {
|
|
|
|
|
cmd = nil,
|
|
|
|
|
args = {},
|
|
|
|
|
},
|
|
|
|
|
filters = {
|
|
|
|
|
dotfiles = false,
|
|
|
|
|
custom = {},
|
|
|
|
|
},
|
|
|
|
|
git = {
|
|
|
|
|
diagnostics = {
|
|
|
|
|
enable = true,
|
|
|
|
|
ignore = true,
|
|
|
|
|
timeout = 500,
|
|
|
|
|
show_on_dirs = true,
|
|
|
|
|
icons = {
|
|
|
|
|
hint = "",
|
|
|
|
|
info = "",
|
|
|
|
|
warning = "",
|
|
|
|
|
error = "",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
view = {
|
|
|
|
|
width = 30,
|
|
|
|
|
height = 30,
|
|
|
|
|
hide_root_folder = false,
|
|
|
|
|
side = "left",
|
|
|
|
|
mappings = {
|
|
|
|
|
custom_only = false,
|
|
|
|
|
list = {
|
|
|
|
|
{ key = { "l", "<CR>", "o" }, cb = tree_cb "edit" },
|
|
|
|
|
{ key = "h", cb = tree_cb "close_node" },
|
|
|
|
|
{ key = "v", cb = tree_cb "vsplit" },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
number = false,
|
|
|
|
|
relativenumber = false,
|
|
|
|
|
},
|
|
|
|
|
trash = {
|
|
|
|
|
cmd = "trash",
|
|
|
|
|
require_confirm = true,
|
|
|
|
|
},
|
|
|
|
|
actions = {
|
|
|
|
|
open_file = {
|
|
|
|
|
quit_on_open = true,
|
|
|
|
|
window_picker = {
|
|
|
|
|
enable = false,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
-- unknown options as of 22.05
|
|
|
|
|
--
|
|
|
|
|
-- update_to_buf_dir = {
|
|
|
|
|
-- enable = true,
|
|
|
|
|
-- auto_open = true,
|
|
|
|
|
-- },
|
|
|
|
|
-- auto_resize = true,
|
|
|
|
|
-- git_hl = 1,
|
|
|
|
|
-- root_folder_modifier = ":t",
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|