From c7949aa3c3770d84dcc514d9138dc62c6e199d65 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 28 May 2022 07:54:42 +0530 Subject: [PATCH] remove globals from nvimtree config | https://github.com/kyazdani42/nvim-tree.lua/commit/3ba383d5915e67dae99c27377a68db237d432265 --- lua/plugins/configs/nvimtree.lua | 74 ++++++++++++++++---------------- 1 file changed, 36 insertions(+), 38 deletions(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 8bc69f8..c1bda95 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -4,44 +4,6 @@ if not present then return end --- globals must be set prior to requiring nvim-tree to function -local g = vim.g - -g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names -g.nvim_tree_git_hl = 1 -g.nvim_tree_highlight_opened_files = 0 - -g.nvim_tree_show_icons = { - folders = 1, - files = 1, - git = 1, - folder_arrows = 1, -} - -g.nvim_tree_icons = { - default = "", - symlink = "", - git = { - deleted = "", - ignored = "◌", - renamed = "➜", - staged = "✓", - unmerged = "", - unstaged = "✗", - untracked = "★", - }, - folder = { - default = "", - empty = "", - empty_open = "", - open = "", - symlink = "", - symlink_open = "", - arrow_open = "", - arrow_closed = "", - }, -} - local options = { filters = { dotfiles = false, @@ -73,9 +35,45 @@ local options = { }, }, renderer = { + highlight_git = false, + highlight_opened_files = "none", + indent_markers = { enable = false, }, + icons = { + padding = " ", + symlink_arrow = " ➛ ", + show = { + file = true, + folder = true, + folder_arrow = true, + git = false, + }, + glyphs = { + default = "", + symlink = "", + folder = { + default = "", + empty = "", + empty_open = "", + open = "", + symlink = "", + symlink_open = "", + arrow_open = "", + arrow_closed = "", + }, + git = { + unstaged = "✗", + staged = "✓", + unmerged = "", + renamed = "➜", + untracked = "★", + deleted = "", + ignored = "◌", + }, + }, + }, }, }