fix: reintroduction of #32 (#97)

This commit is contained in:
Shadman 2021-02-17 16:47:03 +06:00 committed by GitHub
parent 395d7cbb69
commit ec55986f3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -189,10 +189,13 @@ end
local function exec_autocommands()
_G.set_lualine_theme = set_lualine_theme
_G.lualine_statusline = status_dispatch
vim.api.nvim_exec([[
augroup lualine
autocmd!
autocmd ColorScheme * call v:lua.set_lualine_theme()
autocmd WinLeave,BufLeave * lua vim.wo.statusline=lualine_statusline()
autocmd WinEnter,BufEnter * setlocal statusline=%!v:lua.lualine_statusline()
augroup END
]], false)
end
@ -202,8 +205,6 @@ function M.status()
exec_autocommands()
load_components()
load_extensions()
_G.lualine_statusline = status_dispatch
vim.o.statusline = '%!v:lua.lualine_statusline()'
end
return M