pojokcodeid.nvim-lazy/lua/user/nvim-tree.lua

172 lines
3.6 KiB
Lua
Raw Normal View History

2023-02-27 14:52:49 +07:00
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- set termguicolors to enable highlight groups
vim.opt.termguicolors = true
2023-01-15 00:17:41 +07:00
local status_ok, nvim_tree = pcall(require, "nvim-tree")
if not status_ok then
2024-04-13 08:40:35 +07:00
return
2023-01-15 00:17:41 +07:00
end
local icons = require("user.icons")
nvim_tree.setup({
2024-04-13 08:40:35 +07:00
filters = {
dotfiles = false,
git_clean = false,
no_buffer = false,
custom = { "node_modules", "\\.cache", "\\.git" },
exclude = {
".gitignore",
".prettierignore",
},
},
filesystem_watchers = {
enable = true,
debounce_delay = 50,
ignore_dirs = {},
},
git = {
enable = true, -- false dulu karena muncul error
ignore = false, -- true dulu karena muncul error
show_on_dirs = true,
show_on_open_dirs = true,
timeout = 200,
},
actions = {
use_system_clipboard = true,
change_dir = {
enable = true,
global = false,
restrict_above_cwd = false,
},
expand_all = {
max_folder_discovery = 300,
exclude = {},
},
file_popup = {
open_win_config = {
col = 1,
row = 1,
relative = "cursor",
border = "shadow",
style = "minimal",
},
},
open_file = {
quit_on_open = false,
resize_window = false,
window_picker = {
enable = true,
picker = "default",
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",
exclude = {
filetype = { "notify", "lazy", "qf", "diff", "fugitive", "fugitiveblame" },
buftype = { "nofile", "terminal", "help" },
},
},
},
remove_file = {
close_window = true,
},
},
trash = {
cmd = "trash",
require_confirm = true,
},
live_filter = {
prefix = "[FILTER]: ",
always_show_folders = true,
},
tab = {
sync = {
open = false,
close = false,
ignore = {},
},
},
notify = {
threshold = vim.log.levels.INFO,
},
log = {
enable = false,
truncate = false,
types = {
all = false,
config = false,
copy_paste = false,
dev = false,
diagnostics = false,
git = false,
profile = false,
watcher = false,
},
},
system_open = {
cmd = nil,
args = {},
},
renderer = {
-- root_folder_modifier = ":t",
root_folder_label = false,
indent_markers = {
enable = false,
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,
ignored = "",
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 = false,
side = "left",
},
2023-09-04 15:18:56 +07:00
})