From 8c3f7b8d77d3bb402874571e6a2f0a31d6612d9a Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Mon, 13 Apr 2026 20:38:15 +0200 Subject: [PATCH] fix(util): replace vim.fn.readfile with io.open --- lua/util.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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