use pre-defined local variable autocmd (#2816)

This commit is contained in:
Hassan Ait Nacer 2024-05-02 00:46:58 +01:00 committed by GitHub
parent cbecbe6b4a
commit 53df5e175a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -44,7 +44,7 @@ autocmd("BufWritePost", {
})
-- user event that loads after UIEnter + only if file buf is there
vim.api.nvim_create_autocmd({ "UIEnter", "BufReadPost", "BufNewFile" }, {
autocmd({ "UIEnter", "BufReadPost", "BufNewFile" }, {
group = vim.api.nvim_create_augroup("NvFilePost", { clear = true }),
callback = function(args)
local file = vim.api.nvim_buf_get_name(args.buf)