vim: fix nvim-tree configuration

This commit is contained in:
Fernando Schauenburg 2022-02-14 00:13:50 +01:00
parent 1529b88178
commit e63498414a

View file

@ -11,7 +11,8 @@ local function set_globals(tbl)
end end
end end
local global_opts ={ local config = function()
set_globals {
add_trailing = 1, -- add trailing / to folders add_trailing = 1, -- add trailing / to folders
group_empty = 1, -- folders that contain only one folder are grouped group_empty = 1, -- folders that contain only one folder are grouped
indent_markers = 1, -- show indent markers indent_markers = 1, -- show indent markers
@ -21,9 +22,9 @@ local global_opts ={
default = '', -- default icon for files default = '', -- default icon for files
symlink = '', -- default icon for symlinks symlink = '', -- default icon for symlinks
}, },
} }
local nvim_tree_config = { require'nvim-tree'.setup {
auto_close = true, -- close vim if tree is the last window auto_close = true, -- close vim if tree is the last window
git = { git = {
@ -38,10 +39,7 @@ local nvim_tree_config = {
dotfiles = false, -- show files starting with a . dotfiles = false, -- show files starting with a .
custom = { '.git' }, -- don't show .git directory custom = { '.git' }, -- don't show .git directory
}, },
} }
local config = function()
require'nvim-tree'.setup(nvim_tree_config)
highlight('NvimTreeSpecialFile') { fg = colors.base2 } highlight('NvimTreeSpecialFile') { fg = colors.base2 }
highlight('NvimTreeIndentMarker') { fg = colors.base01 } highlight('NvimTreeIndentMarker') { fg = colors.base01 }