chore: use stylua for formatting (#1040)

* chore: stylua job and config

* reformat with stylua
This commit is contained in:
Simon Hauser
2021-07-23 17:42:37 +02:00
committed by GitHub
parent 664690029f
commit 79644ab677
75 changed files with 3201 additions and 2809 deletions

View File

@@ -12,9 +12,16 @@ local from_entry = {}
function from_entry.path(entry, validate)
local path = entry.path and vim.fn.fnameescape(entry.path) or nil
if path == nil then path = entry.filename end
if path == nil then path = entry.value end
if path == nil then print("Invalid entry", vim.inspect(entry)); return end
if path == nil then
path = entry.filename
end
if path == nil then
path = entry.value
end
if path == nil then
print("Invalid entry", vim.inspect(entry))
return
end
if validate and not vim.fn.filereadable(path) then
return