diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index fc46b09..79e1781 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -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,