fix nvimtree vim globals not having any effect

This commit is contained in:
zbirenbaum 2022-03-23 23:57:15 -04:00 committed by siduck
parent 75dbf5027d
commit 958a62bc67

View file

@ -1,9 +1,4 @@
local present, nvimtree = pcall(require, "nvim-tree")
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
@ -40,6 +35,12 @@ g.nvim_tree_icons = {
},
}
local present, nvimtree = pcall(require, "nvim-tree")
if not present then
return
end
local default = {
filters = {
dotfiles = false,