refactor(nvim): Use nvim_create_autocmd api
This commit is contained in:
parent
a27469690e
commit
aaf5b15bae
@ -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
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user