From 2ac55467e02c91d86f08bac76b492e39046bd51f Mon Sep 17 00:00:00 2001 From: Daniil Tsivinsky Date: Mon, 30 May 2022 11:07:07 +0300 Subject: [PATCH] update nvim-tree config --- neovim/.config/nvim/lua/user/file-tree.lua | 43 +++++++++++----------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/neovim/.config/nvim/lua/user/file-tree.lua b/neovim/.config/nvim/lua/user/file-tree.lua index 89c5442..ae90acf 100644 --- a/neovim/.config/nvim/lua/user/file-tree.lua +++ b/neovim/.config/nvim/lua/user/file-tree.lua @@ -1,26 +1,5 @@ local Job = require("plenary.job") -vim.g.nvim_tree_show_icons = { - git = 1, - files = 1, - folders = 1, -} -vim.g.nvim_tree_icons = { - default = "", - symlink = "", - git = { - unstaged = "U", - staged = "S", - unmerged = "M", - renamed = "R", - untracked = "N", - deleted = "D", - }, -} -vim.g.nvim_tree_git_hl = 1 -vim.g.nvim_tree_add_trailing = 1 -vim.g.nvim_tree_group_empty = 1 - local function git_stage(node) local cwd = vim.loop.cwd() local relative_path = string.gsub(node.absolute_path, cwd .. "/", "") @@ -78,9 +57,31 @@ require("nvim-tree").setup({ }, }, renderer = { + add_trailing = true, + group_empty = true, + highlight_git = true, indent_markers = { enable = true, }, + icons = { + show = { + git = true, + file = true, + folder = true, + }, + glyphs = { + default = "", + symlink = "", + git = { + unstaged = "U", + staged = "S", + unmerged = "M", + renamed = "R", + untracked = "N", + deleted = "D", + }, + }, + }, }, filters = { custom = { "^.git$" },