indentLine_leadingSpaceEnabled breaks NEDTree Indentation
when I set in the following in my vimrc: let g:indentLine_leadingSpaceEnabled = 1
the indentation in NERDTree is lost. That means when I open a folder with subfolders, they are not indented beneath, but show up directly underneath the parent folder with the same indentation level. Actually, there is now indentation at all, all folders are left aligned!
When I set indentLine_leadingSpaceEnabled = 0 everything works as expected. I can even call the Toggle-Funkction IndentLinesToggle and/or LeadingSpaceToggle without breaking the NERDTree view.
Can not reproduce.
Could you please provide your vimrc settings that u tried? mine is like this:
let g:indentLine_enabled = 0 let g:indentLine_char = '|' let g:indentLine_color_term = 128 let g:indentLine_leadingSpaceEnabled = 1 let g:indentLine_leadingSpaceChar = '·'
I think this is a conflict with some other plugin, please remove all your other plugins and have a try.
I have got the same problem when I use the plugin 'ryanoasis/vim-devicons' with setting like this:
let g:webdevicons_enable_nerdtree = 1
Looks like the problem is really with the 'devicons' plugin.
indentLine was breaking indentation both with devicons disabled and enabled for me. Here's my config:
Plug 'Yggdroot/indentLine'
let g:indentLine_color_term = 233
let g:indentLine_leadingSpaceEnabled = 1
let g:indentLine_leadingSpaceChar = '.'
I had to disable it to get the latest version of nerdtree working, with or without devicons enabled.
Calling LeadingSpaceDisable when nerdtree buffer is loaded fixes the issue.
Add the following to your .vimrc
autocmd BufEnter NERD_tree* :LeadingSpaceDisable