From a7ebbb485d48f05edbca32f80ad5cfb0a7203fb1 Mon Sep 17 00:00:00 2001 From: JINNOUCHI Yasushi Date: Fri, 16 Aug 2024 13:12:28 +0900 Subject: [PATCH] fix: avoid errors caused by echoing messages (#242) This error below occurs when it takes long time to init the plugin. E5560: nvim_echo must not be called in a lua loop callback --- lua/frecency/klass.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/frecency/klass.lua b/lua/frecency/klass.lua index a192099..855555b 100644 --- a/lua/frecency/klass.lua +++ b/lua/frecency/klass.lua @@ -47,7 +47,7 @@ function Frecency:setup() return done end) if not ok then - log.error("failed to setup:", status == -1 and "timed out" or "interrupted") + error("failed to setup:" .. (status == -1 and "timed out" or "interrupted")) end end end