diff options
| author | Simon Hauser <Simon-Hauser@outlook.de> | 2021-07-23 17:42:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-23 11:42:37 -0400 |
| commit | 79644ab67731c7ba956c354bf0545282f34e10cc (patch) | |
| tree | e65dbf73b3442ab1aa9fc59fc56a35b4c9edf1e0 /lua/telescope/from_entry.lua | |
| parent | 664690029fdb302bee8d3f27a458383e8477add7 (diff) | |
chore: use stylua for formatting (#1040)
* chore: stylua job and config
* reformat with stylua
Diffstat (limited to 'lua/telescope/from_entry.lua')
| -rw-r--r-- | lua/telescope/from_entry.lua | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lua/telescope/from_entry.lua b/lua/telescope/from_entry.lua index bf63940..937f11f 100644 --- a/lua/telescope/from_entry.lua +++ b/lua/telescope/from_entry.lua @@ -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 |
