Hide certain files in NERDTree
You want to use the NERDTreeIgnore option, for example:
let NERDTreeIgnore=['\.o$', '\~$']
Do :help NERDTreeIgnore for more information.
Hoping this might be helpful as per New NerdTree Documentation.
// put this in your .vimrc
set wildignore+=*.pyc,*.o,*.obj,*.svn,*.swp,*.class,*.hg,*.DS_Store,*.min.*
// Nerdtree config for wildignore
let NERDTreeRespectWildIgnore=1