🪴 my neovim config:)
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

init: use metatable for `vim.augroup`

robin 1601ca97 673de220

+9 -6
+9 -6
config/lua/ivy/on.lua
··· 16 16 ---@param clear boolean 17 17 ---@return vim.on 18 18 vim.augroup = function(name, clear) 19 - local augroup = vim.api.nvim_create_augroup(name, { clear = clear }) 20 - 21 - return function(event, pattern, opts, f) 22 - opts.group = augroup 23 - return vim.on(event, pattern, opts, f) 24 - end 19 + ---@diagnostic disable-next-line: return-type-mismatch 20 + return setmetatable({ 21 + groupid = vim.api.nvim_create_augroup(name, { clear = clear }), 22 + }, { 23 + __call = function(self, event, pattern, opts, f) 24 + opts.group = self.groupid 25 + return vim.on(event, pattern, opts, f) 26 + end, 27 + }) 25 28 end