chore: autogen (vimdocs+formating)
This commit is contained in:
parent
0ac721d376
commit
8d956c1825
|
@ -6,10 +6,10 @@ local fns = {}
|
||||||
---@param fn function the actual function to store.
|
---@param fn function the actual function to store.
|
||||||
---@return number same id that was provided.
|
---@return number same id that was provided.
|
||||||
function M.register_fn(id, fn)
|
function M.register_fn(id, fn)
|
||||||
vim.validate({
|
vim.validate {
|
||||||
id = {id, 'n'},
|
id = { id, 'n' },
|
||||||
fn = {fn, 'f'}
|
fn = { fn, 'f' },
|
||||||
})
|
}
|
||||||
fns[id] = fn
|
fns[id] = fn
|
||||||
return id
|
return id
|
||||||
end
|
end
|
||||||
|
@ -18,8 +18,8 @@ end
|
||||||
---@param id number id of the fn to retrive
|
---@param id number id of the fn to retrive
|
||||||
---@return function
|
---@return function
|
||||||
function M.get_fn(id)
|
function M.get_fn(id)
|
||||||
vim.validate({ id = {id, 'n'} })
|
vim.validate { id = { id, 'n' } }
|
||||||
return fns[id] or function () end
|
return fns[id] or function() end
|
||||||
end
|
end
|
||||||
|
|
||||||
---Call the function of id with args
|
---Call the function of id with args
|
||||||
|
|
Loading…
Reference in New Issue