From 6d1c759107567a116be1aefd2ab1587adf2df96d Mon Sep 17 00:00:00 2001 From: Charles Danesi Date: Tue, 26 Nov 2024 16:27:34 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8refactor:=20improve=20structure=20a?= =?UTF-8?q?nd=20change=201=20icon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit change the icon for open folder to non-empty move vim.opt into `init` --- .config/nvim/lua/plugins/nvim-tree.lua | 191 ++++++++++++------------- 1 file changed, 94 insertions(+), 97 deletions(-) diff --git a/.config/nvim/lua/plugins/nvim-tree.lua b/.config/nvim/lua/plugins/nvim-tree.lua index c6f707e..7af2e7b 100644 --- a/.config/nvim/lua/plugins/nvim-tree.lua +++ b/.config/nvim/lua/plugins/nvim-tree.lua @@ -1,103 +1,100 @@ return { - 'nvim-tree/nvim-tree.lua', - dependencies = 'nvim-tree/nvim-web-devicons', - cmd = { - 'NvimTreeToggle', - 'NvimTreeFindFileToggle', - 'NvimTreeCollapse', - 'NvimTreeRefresh', - }, - opts = { - respect_buf_cwd = false, - view = { - width = 35, - relativenumber = true, - signcolumn = 'yes', - }, - renderer = { - indent_markers = { - enable = true, + 'nvim-tree/nvim-tree.lua', + dependencies = 'nvim-tree/nvim-web-devicons', + cmd = { + 'NvimTreeToggle', + 'NvimTreeFindFileToggle', + 'NvimTreeCollapse', + 'NvimTreeRefresh', + }, + init = function() + vim.g.loaded_netrwPlugin = 1 + end, + opts = { + respect_buf_cwd = false, + view = { + width = 35, + relativenumber = true, + signcolumn = 'yes', }, - icons = { - web_devicons = { - file = { + renderer = { + indent_markers = { enable = true, - color = true, - }, - folder = { - enable = true, - color = true, - }, - }, - git_placement = 'after', - modified_placement = 'after', - diagnostics_placement = 'signcolumn', - padding = ' ', - show = { - file = true, - folder = true, - folder_arrow = true, - git = true, - modified = true, - hidden = false, - diagnostics = true, - bookmarks = true, - }, - glyphs = { - default = '', - modified = '●', - folder = { - default = '', - open = '', - empty = '', - empty_open = '', - arrow_closed = '', -- arrow when folder is closed - arrow_open = '', -- arrow when folder is open - }, - git = { - unstaged = '✗', - staged = '✓', - unmerged = '', - renamed = '➜', - untracked = '★', - deleted = '', - ignored = '◌', - }, - }, + }, + icons = { + web_devicons = { + file = { + enable = true, + color = true, + }, + folder = { + enable = true, + color = true, + }, + }, + git_placement = 'after', + modified_placement = 'after', + diagnostics_placement = 'signcolumn', + padding = ' ', + show = { + file = true, + folder = true, + folder_arrow = true, + git = true, + modified = true, + hidden = false, + diagnostics = true, + bookmarks = true, + }, + glyphs = { + default = '', + modified = '●', + folder = { + default = '', + open = '', + empty = '', + empty_open = '', + arrow_closed = '', + arrow_open = '', + }, + git = { + unstaged = '✗', + staged = '✓', + unmerged = '', + renamed = '➜', + untracked = '★', + deleted = '', + ignored = '◌', + }, + }, + }, }, - }, - actions = { - open_file = { - window_picker = { - enable = false, - }, + actions = { + open_file = { + window_picker = { + enable = false, + }, + }, }, - }, - filters = { - enable = true, - git_ignored = true, - dotfiles = false, - custom = { '.DS_Store' }, - }, - git = { - enable = true, - show_on_dirs = true, - ignore = false, - }, - diagnostics = { - enable = true, - show_on_open_dirs = true, - }, - modified = { - enable = true, - show_on_dirs = true, - show_on_open_dirs = true, - }, - }, - - config = function(_, opts) - vim.g.loaded_netrwPlugin = 1 - - require('nvim-tree').setup(opts) - end, + filters = { + enable = true, + git_ignored = true, + dotfiles = false, + custom = { '.DS_Store' }, + }, + git = { + enable = true, + show_on_dirs = true, + ignore = false, + }, + diagnostics = { + enable = true, + show_on_open_dirs = true, + }, + modified = { + enable = true, + show_on_dirs = true, + show_on_open_dirs = true, + }, + }, }