refactor(nvim): Use nvim_create_autocmd api

This commit is contained in:
Price Hiller 2022-03-18 06:27:38 -05:00
parent a27469690e
commit aaf5b15bae

View File

@ -27,5 +27,13 @@ g.dashboard_custom_footer = {
}
-- Disable statusline and cursorline in dashboard.
vim.cmd('autocmd BufEnter * if &ft is "dashboard" | set laststatus=0 | else | set laststatus=3 | endif')
vim.cmd('autocmd BufEnter * if &ft is "dashboard" | set nocursorline | endif')
vim.api.nvim_create_autocmd("BufEnter", {
callback = function ()
if vim.bo.filetype == "dashboard" then
vim.opt.laststatus = 0
vim.opt.nocursorline = true
else
vim.opt.laststatus = 3
end
end
})