mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-23 01:08:53 +02:00
Add files via upload
This commit is contained in:
commit
e53a643e3d
54 changed files with 5285 additions and 0 deletions
87
lua/user/nvim-tree.lua
Normal file
87
lua/user/nvim-tree.lua
Normal file
|
@ -0,0 +1,87 @@
|
|||
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("user.icons")
|
||||
|
||||
nvim_tree.setup({
|
||||
update_focused_file = {
|
||||
enable = true,
|
||||
update_cwd = true,
|
||||
},
|
||||
renderer = {
|
||||
root_folder_modifier = ":t",
|
||||
indent_markers = {
|
||||
enable = true,
|
||||
inline_arrows = true,
|
||||
icons = {
|
||||
corner = "└",
|
||||
edge = "│",
|
||||
item = "│",
|
||||
bottom = "─",
|
||||
none = " ",
|
||||
},
|
||||
},
|
||||
icons = {
|
||||
webdev_colors = true,
|
||||
show = {
|
||||
git = true,
|
||||
folder = true,
|
||||
file = true,
|
||||
folder_arrow = true,
|
||||
},
|
||||
glyphs = {
|
||||
default = icons.ui.Text,
|
||||
symlink = icons.ui.FileSymlink,
|
||||
folder = {
|
||||
arrow_open = icons.ui.ChevronShortDown,
|
||||
arrow_closed = icons.ui.ChevronShortRight,
|
||||
default = icons.ui.Folder,
|
||||
empty = icons.ui.EmptyFolder,
|
||||
empty_open = icons.ui.EmptyFolderOpen,
|
||||
open = icons.ui.FolderOpen,
|
||||
symlink = icons.ui.FolderSymlink,
|
||||
symlink_open = icons.ui.FolderSymlink,
|
||||
},
|
||||
git = {
|
||||
deleted = icons.git.FileDeleted,
|
||||
ignored = icons.git.FileIgnored,
|
||||
renamed = icons.git.FileRenamed,
|
||||
staged = icons.git.FileStaged,
|
||||
unmerged = icons.git.FileUnmerged,
|
||||
unstaged = icons.git.FileUnstaged,
|
||||
untracked = icons.git.FileUntracked,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
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,
|
||||
hide_root_folder = true,
|
||||
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") },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue