diff --git a/lua/util.lua b/lua/util.lua index 5854612..8a39890 100644 --- a/lua/util.lua +++ b/lua/util.lua @@ -132,7 +132,12 @@ function Util.format(opts) local tmp_out if tmp then - tmp_out = table.concat(vim.fn.readfile(tmp), "\n") + local f = io.open(tmp, "r") + if not f then + return + end + tmp_out = f:read("*a") + f:close() os.remove(tmp) end