chore: autogen (vimdocs+formating)

This commit is contained in:
shadmansaleh 2022-07-20 13:29:21 +00:00 committed by github-actions[bot]
parent 0ac721d376
commit 8d956c1825
2 changed files with 8 additions and 8 deletions

View File

@ -73,8 +73,8 @@ function M:set_on_click()
if self.options.on_click ~= nil then
if vim.fn.has('nvim-0.8') == 0 then
modules.utils_notices.add_notice(
'### Options.on_click\nSorry `on_click` can only be used in neovim 0.8 or higher.\n'
)
'### Options.on_click\nSorry `on_click` can only be used in neovim 0.8 or higher.\n'
)
self.options.on_click = nil
return
end

View File

@ -6,10 +6,10 @@ local fns = {}
---@param fn function the actual function to store.
---@return number same id that was provided.
function M.register_fn(id, fn)
vim.validate({
id = {id, 'n'},
fn = {fn, 'f'}
})
vim.validate {
id = { id, 'n' },
fn = { fn, 'f' },
}
fns[id] = fn
return id
end
@ -18,8 +18,8 @@ end
---@param id number id of the fn to retrive
---@return function
function M.get_fn(id)
vim.validate({ id = {id, 'n'} })
return fns[id] or function () end
vim.validate { id = { id, 'n' } }
return fns[id] or function() end
end
---Call the function of id with args