From 26e37225a5d1c50bcef561d356f6778991a97300 Mon Sep 17 00:00:00 2001 From: Guennadi Maximov C Date: Wed, 5 Jun 2024 03:53:25 -0600 Subject: [PATCH] chore(api): `user.util` code improvements. --- lua/user/util/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/user/util/init.lua b/lua/user/util/init.lua index 2d42367e..524ce0af 100644 --- a/lua/user/util/init.lua +++ b/lua/user/util/init.lua @@ -133,7 +133,7 @@ function M.assoc() local au = vim.api.nvim_create_autocmd - local group = vim.api.nvim_create_augroup('UserAssocs', { clear = false }) + local group = vim.api.nvim_create_augroup('UserAssocs', { clear = true }) ---@type AuRepeatEvents[] local aus = { @@ -174,7 +174,7 @@ function M.assoc() goto continue end - if not is_nil(o.callback) and not is_fun(o.callback) then + if not is_fun(o.callback) then M.notify.notify('(user.assoc): Callback is not a function', 'error') goto continue end