68 lines
1.8 KiB
Lua
68 lines
1.8 KiB
Lua
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
|
|
local icons = require('config.iconlist')
|
|
|
|
nvim_tree.setup {
|
|
update_focused_file = {
|
|
enable = true,
|
|
update_cwd = true,
|
|
},
|
|
renderer = {
|
|
root_folder_modifier = ":t",
|
|
icons = {
|
|
glyphs = {
|
|
default = icons.ui.File,
|
|
symlink = icons.ui.FileSymlink,
|
|
folder = {
|
|
arrow_open = ChevronShortDown,
|
|
arrow_closed = ChevronShortRight,
|
|
default = icons.ui.Folder,
|
|
open = icons.ui.FolderOpen,
|
|
empty = icons.ui.EmptyFolder,
|
|
empty_open = icons.ui.EmptyFolderOpen,
|
|
symlink = icons.ui.FolderSymlink,
|
|
symlink_open = icons.ui.FolderSymlink,
|
|
},
|
|
git = {
|
|
unstaged = icons.git.FileUnstaged,
|
|
staged = icons.git.FileStaged,
|
|
unmerged = icons.git.FileUnmerged,
|
|
renamed = icons.git.FileRenamed,
|
|
untracked = icons.git.FileUntracked,
|
|
deleted = icons.git.FileDeleted,
|
|
ignored = icons.git.FileIgnored,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
diagnostics = {
|
|
enable = true,
|
|
show_on_dirs = true,
|
|
icons = {
|
|
hint = icons.diagnostics.BoldHint,
|
|
info = icons.diagnostics.BoldInformation,
|
|
warning = icons.diagnostics.BoldWarning,
|
|
error = icons.diagnostics.BoldError,
|
|
},
|
|
},
|
|
view = {
|
|
width = 30,
|
|
side = "left",
|
|
mappings = {
|
|
list = {
|
|
{ key = { "l", "<CR>", "o" }, cb = tree_cb "edit" },
|
|
{ key = "h", cb = tree_cb "close_node" },
|
|
{ key = "v", cb = tree_cb "vsplit" },
|
|
},
|
|
},
|
|
},
|
|
}
|