run vimscript inside vim.api.nvim_exec (#73)
This commit is contained in:
parent
823665c511
commit
10a6087a74
|
@ -109,12 +109,14 @@ end
|
||||||
local function exec_autocommands()
|
local function exec_autocommands()
|
||||||
_G.set_lualine_theme = set_lualine_theme
|
_G.set_lualine_theme = set_lualine_theme
|
||||||
_G.set_active_statusline = statusline
|
_G.set_active_statusline = statusline
|
||||||
vim.cmd([[augroup lualine]])
|
vim.api.nvim_exec([[
|
||||||
vim.cmd([[autocmd!]])
|
augroup lualine
|
||||||
vim.cmd([[autocmd WinEnter,BufEnter * setlocal statusline=%!v:lua.set_active_statusline(1)]])
|
autocmd!
|
||||||
vim.cmd([[autocmd WinLeave,BufLeave * lua require('lualine').set_inactive_statusline()]])
|
autocmd WinEnter,BufEnter * setlocal statusline=%!v:lua.set_active_statusline(1)
|
||||||
vim.cmd([[autocmd ColorScheme * call v:lua.set_lualine_theme()]])
|
autocmd WinLeave,BufLeave * lua require('lualine').set_inactive_statusline()
|
||||||
vim.cmd([[augroup END]])
|
autocmd ColorScheme * call v:lua.set_lualine_theme()
|
||||||
|
augroup END
|
||||||
|
]], false)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.status()
|
function M.status()
|
||||||
|
|
Loading…
Reference in New Issue