Created
July 4, 2022 20:36
-
-
Save junio256/5d6b2b884856de9773c4f0e9cac6aa30 to your computer and use it in GitHub Desktop.
The original file has tons of content that are already deprecated, so I've refactored using the actual configs.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local status_ok, nvim_tree = pcall(require, "nvim-tree") | |
if not status_ok then | |
return | |
end | |
local config_status_ok, nvim_tree_config = pcall(require, "nvim-tree.config") | |
if not config_status_ok then | |
return | |
end | |
local tree_cb = nvim_tree_config.nvim_tree_callback | |
nvim_tree.setup { | |
disable_netrw = true, | |
hijack_netrw = true, | |
open_on_setup = false, | |
ignore_ft_on_setup = { | |
"startify", | |
"dashboard", | |
"alpha", | |
}, | |
-- auto_close = true, -- Deprecated | |
open_on_tab = false, | |
hijack_cursor = false, | |
update_cwd = true, | |
hijack_directories = { | |
enable = true, | |
auto_open = true, | |
}, | |
diagnostics = { | |
enable = true, | |
icons = { | |
hint = "", | |
info = "", | |
warning = "", | |
error = "", | |
}, | |
}, | |
update_focused_file = { | |
enable = true, | |
update_cwd = true, | |
ignore_list = {}, | |
}, | |
git = { | |
enable = true, | |
ignore = true, | |
timeout = 500, | |
}, | |
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, | |
}, | |
actions = { | |
open_file = { | |
resize_window = true, | |
quit_on_open = true, | |
window_picker = { | |
enable = false, | |
}, | |
}, | |
}, | |
renderer = { | |
highlight_git = true, | |
root_folder_modifier = ":t", | |
icons ={ | |
webdev_colors = true, | |
git_placement = "before", | |
padding = " ", | |
symlink_arrow = " ➛ ", | |
show = { | |
file = true, | |
folder = true, | |
folder_arrow = true, | |
git = true, | |
}, | |
glyphs = { | |
default = "", | |
symlink = "", | |
git = { | |
unstaged = "", | |
staged = "S", | |
unmerged = "", | |
renamed = "➜", | |
deleted = "", | |
untracked = "U", | |
ignored = "◌", | |
}, | |
folder = { | |
default = "", | |
open = "", | |
empty = "", | |
empty_open = "", | |
symlink = "", | |
}, | |
}, | |
}, | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment