feat: add trailing slash on folder names

enable the feature through `vim.g.nvim_tree_add_trailing`
This commit is contained in:
kiyan
2021-03-16 21:26:03 +01:00
parent 4c46d2b192
commit f7ad4ce5f4
4 changed files with 16 additions and 7 deletions

View File

@@ -131,9 +131,9 @@ function M.on_enter()
if is_dir then
api.nvim_command('cd '..bufname)
end
local should_open = vim.g.nvim_tree_auto_open == 1 and
((is_dir and (hijack_netrw == 1 or disable_netrw == 1)) or bufname == '') and
not vim.tbl_contains(ft_ignore, buftype)
local should_open = vim.g.nvim_tree_auto_open == 1
and ((is_dir and (hijack_netrw == 1 or disable_netrw == 1)) or bufname == '')
and not vim.tbl_contains(ft_ignore, buftype)
lib.init(should_open, should_open)
end