From aefdc6783cb77f09786542c90901a9e7120bea42 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 9 May 2022 11:23:51 +0200 Subject: chore: format runtime with stylua --- runtime/lua/vim/F.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'runtime/lua/vim/F.lua') diff --git a/runtime/lua/vim/F.lua b/runtime/lua/vim/F.lua index 9327c652db..bca5ddf68b 100644 --- a/runtime/lua/vim/F.lua +++ b/runtime/lua/vim/F.lua @@ -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 -- cgit