mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
chore: format runtime with stylua
This commit is contained in:
@@ -5,13 +5,17 @@ local F = {}
|
||||
---@param a
|
||||
---@param b
|
||||
function F.if_nil(a, b)
|
||||
if a == nil then return b end
|
||||
if a == nil then
|
||||
return b
|
||||
end
|
||||
return a
|
||||
end
|
||||
|
||||
-- Use in combination with pcall
|
||||
function F.ok_or_nil(status, ...)
|
||||
if not status then return end
|
||||
if not status then
|
||||
return
|
||||
end
|
||||
return ...
|
||||
end
|
||||
|
||||
@@ -29,7 +33,7 @@ end
|
||||
|
||||
--- like {...} except preserve the length explicitly
|
||||
function F.pack_len(...)
|
||||
return {n=select('#', ...), ...}
|
||||
return { n = select('#', ...), ... }
|
||||
end
|
||||
|
||||
--- like unpack() but use the length set by F.pack_len if present
|
||||
|
Reference in New Issue
Block a user