diff --git a/lua/plugins/nvimtree_20241011.lua b/lua/plugins/nvimtree_20241011.lua index 604d126..018f8c9 100644 --- a/lua/plugins/nvimtree_20241011.lua +++ b/lua/plugins/nvimtree_20241011.lua @@ -1,221 +1,222 @@ -local icons = pcode.icons -local set_view = {} -if pcode.nvimtree_isfloat == 1 then - set_view = require("user.utils.nvimtree").float -else - set_view = require("user.utils.nvimtree").normal -end -return { - "kyazdani42/nvim-tree.lua", - lazy = true, - cmd = { "NvimTreeFindFileToggle", "NvimTree", "NvimTreeOpen", "NvimTreeToggle", "NvimTreeFocus", "NvimTreeClose" }, - opts = { - auto_reload_on_write = false, - disable_netrw = false, - hijack_cursor = false, - hijack_netrw = true, - hijack_unnamed_buffer_when_opening = false, - sort_by = "name", - root_dirs = {}, - prefer_startup_root = false, - sync_root_with_cwd = true, - reload_on_bufenter = false, - respect_buf_cwd = false, - on_attach = "default", - select_prompts = false, - view = set_view, - renderer = { - add_trailing = false, - group_empty = false, - highlight_git = true, - full_name = false, - highlight_opened_files = "none", - -- root_folder_label = ":t", - root_folder_label = false, - indent_width = 2, - indent_markers = { - enable = true, - inline_arrows = true, - icons = { - corner = "└", - edge = "│", - item = "│", - none = " ", - }, - }, - icons = { - webdev_colors = true, - git_placement = "before", - padding = " ", - symlink_arrow = " ➛ ", - show = { - file = true, - folder = true, - folder_arrow = true, - git = true, - }, - glyphs = { - default = icons.ui.Text, - symlink = icons.ui.FileSymlink, - bookmark = icons.ui.BookMark, - folder = { - -- arrow_closed = icons.ui.TriangleShortArrowRight, - arrow_closed = icons.ui.ChevronShortRight, - -- arrow_open = icons.ui.TriangleShortArrowDown, - arrow_open = icons.ui.ChevronShortDown, - 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.FolderOpen, - }, - 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, - }, - }, - }, - special_files = { "Cargo.toml", "Makefile", "README.md", "readme.md" }, - symlink_destination = true, - }, - hijack_directories = { - enable = false, - auto_open = true, - }, - update_focused_file = { - enable = true, - debounce_delay = 15, - update_root = true, - ignore_list = {}, - }, - diagnostics = { - enable = true, - show_on_dirs = false, - show_on_open_dirs = true, - debounce_delay = 50, - severity = { - min = vim.diagnostic.severity.HINT, - max = vim.diagnostic.severity.ERROR, - }, - icons = { - hint = icons.diagnostics.BoldHint, - info = icons.diagnostics.BoldInformation, - warning = icons.diagnostics.BoldWarning, - error = icons.diagnostics.BoldError, - }, - }, - 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, - ignore = false, - show_on_dirs = true, - show_on_open_dirs = true, - disable_for_dirs = {}, - timeout = 400, - }, - 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, - threshold = vim.log.levels.ERROR, - }, - 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 = {}, - }, - }, - keys = { - { "e", "NvimTreeToggle", desc = "󰙅 Explorer" }, - }, - config = function(_, opts) - require("nvim-tree").setup(opts) - local api = require("nvim-tree.api") - api.events.subscribe(api.events.Event.FileCreated, function(file) - vim.cmd("edit " .. file.fname) - end) - end, -} +-- local icons = pcode.icons +-- local set_view = {} +-- if pcode.nvimtree_isfloat == 1 then +-- set_view = require("user.utils.nvimtree").float +-- else +-- set_view = require("user.utils.nvimtree").normal +-- end +-- return { +-- "kyazdani42/nvim-tree.lua", +-- lazy = true, +-- cmd = { "NvimTreeFindFileToggle", "NvimTree", "NvimTreeOpen", "NvimTreeToggle", "NvimTreeFocus", "NvimTreeClose" }, +-- opts = { +-- auto_reload_on_write = false, +-- disable_netrw = false, +-- hijack_cursor = false, +-- hijack_netrw = true, +-- hijack_unnamed_buffer_when_opening = false, +-- sort_by = "name", +-- root_dirs = {}, +-- prefer_startup_root = false, +-- sync_root_with_cwd = true, +-- reload_on_bufenter = false, +-- respect_buf_cwd = false, +-- on_attach = "default", +-- select_prompts = false, +-- view = set_view, +-- renderer = { +-- add_trailing = false, +-- group_empty = false, +-- highlight_git = true, +-- full_name = false, +-- highlight_opened_files = "none", +-- -- root_folder_label = ":t", +-- root_folder_label = false, +-- indent_width = 2, +-- indent_markers = { +-- enable = true, +-- inline_arrows = true, +-- icons = { +-- corner = "└", +-- edge = "│", +-- item = "│", +-- none = " ", +-- }, +-- }, +-- icons = { +-- webdev_colors = true, +-- git_placement = "before", +-- padding = " ", +-- symlink_arrow = " ➛ ", +-- show = { +-- file = true, +-- folder = true, +-- folder_arrow = true, +-- git = true, +-- }, +-- glyphs = { +-- default = icons.ui.Text, +-- symlink = icons.ui.FileSymlink, +-- bookmark = icons.ui.BookMark, +-- folder = { +-- -- arrow_closed = icons.ui.TriangleShortArrowRight, +-- arrow_closed = icons.ui.ChevronShortRight, +-- -- arrow_open = icons.ui.TriangleShortArrowDown, +-- arrow_open = icons.ui.ChevronShortDown, +-- 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.FolderOpen, +-- }, +-- 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, +-- }, +-- }, +-- }, +-- special_files = { "Cargo.toml", "Makefile", "README.md", "readme.md" }, +-- symlink_destination = true, +-- }, +-- hijack_directories = { +-- enable = false, +-- auto_open = true, +-- }, +-- update_focused_file = { +-- enable = true, +-- debounce_delay = 15, +-- update_root = true, +-- ignore_list = {}, +-- }, +-- diagnostics = { +-- enable = true, +-- show_on_dirs = false, +-- show_on_open_dirs = true, +-- debounce_delay = 50, +-- severity = { +-- min = vim.diagnostic.severity.HINT, +-- max = vim.diagnostic.severity.ERROR, +-- }, +-- icons = { +-- hint = icons.diagnostics.BoldHint, +-- info = icons.diagnostics.BoldInformation, +-- warning = icons.diagnostics.BoldWarning, +-- error = icons.diagnostics.BoldError, +-- }, +-- }, +-- 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, +-- ignore = false, +-- show_on_dirs = true, +-- show_on_open_dirs = true, +-- disable_for_dirs = {}, +-- timeout = 400, +-- }, +-- 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, +-- threshold = vim.log.levels.ERROR, +-- }, +-- 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 = {}, +-- }, +-- }, +-- keys = { +-- { "e", "NvimTreeToggle", desc = "󰙅 Explorer" }, +-- }, +-- config = function(_, opts) +-- require("nvim-tree").setup(opts) +-- local api = require("nvim-tree.api") +-- api.events.subscribe(api.events.Event.FileCreated, function(file) +-- vim.cmd("edit " .. file.fname) +-- end) +-- end, +-- } +return {}