added telescope support, needs fd and bat and ripgrep
[dotfiles/.git] / .config / nvim / plugin / nerdtree.vim
1 "NERDTree:
2 let g:NERDTreeGitStatusWithFlags = 1
3 let g:WebDevIconsUnicodeDecorateFolderNodes = 1
4 let g:NERDTreeGitStatusNodeColorization = 1
5 let g:NERDTreeColorMapCustom = {
6     \ "Staged"    : "#0ee375",
7     \ "Modified"  : "#d9bf91",
8     \ "Renamed"   : "#51C9FC",
9     \ "Untracked" : "#FCE77C",
10     \ "Unmerged"  : "#FC51E6",
11     \ "Dirty"     : "#FFBD61",
12     \ "Clean"     : "#87939A",
13     \ "Ignored"   : "#808080"
14     \ }
15 let g:NERDTreeIgnore = ['^node_modules$']
16 " sync open file with NERDTree
17 " " Check if NERDTree is open or active
18 function! IsNERDTreeOpen()
19   return exists("t:NERDTreeBufName") && (bufwinnr(t:NERDTreeBufName) != -1)
20 endfunction
21 " Call NERDTreeFind iff NERDTree is active, current window contains a modifiable
22 " file, and we're not in vimdiff
23 function! SyncTree()
24   if &modifiable && IsNERDTreeOpen() && strlen(expand('%')) > 0 && !&diff
25     NERDTreeFind
26     wincmd p
27   endif
28 endfunction
29 " Highlight currently open buffer in NERDTree
30 autocmd BufEnter * call SyncTree()