Add colorscheme update and add filetype to buffer.

This commit is contained in:
kiyan42
2020-05-17 18:21:03 +02:00
parent 52d1d7e401
commit 020db73532
5 changed files with 80 additions and 48 deletions

View File

@@ -8,19 +8,23 @@ let g:loaded_netrwPlugin = 1
hi def link LuaTreePopup Normal
au BufWritePost * lua require'tree'.refresh()
augroup LuaTree
au BufWritePost * lua require'tree'.refresh()
if get(g:, 'lua_tree_auto_close') != 0
if get(g:, 'lua_tree_auto_close') != 0
au BufEnter * lua require'tree'.check_windows_and_close()
endif
endif
if get(g:, 'lua_tree_auto_open') != 0
if get(g:, 'lua_tree_auto_open') != 0
au VimEnter * lua require'tree'.check_buffer_and_open()
endif
endif
if get(g:, 'lua_tree_follow') != 0
if get(g:, 'lua_tree_follow') != 0
au BufEnter * :LuaTreeFindFile
endif
endif
au ColorScheme * lua require'tree'.reset_highlight()
augroup end
" TODO: WinEnter is not the right autocommand for this task,
" but we do not have LayoutChange or WinMove kind of option atm,