From 3b48153637e34b5d928c319b532cf9fe287fa4df Mon Sep 17 00:00:00 2001 From: Patrick Auernig Date: Sat, 9 Sep 2023 18:28:48 +0200 Subject: [PATCH] Use event instead of cond for wakatime cond doesn't work as expected --- lua/valeth/plugins/wakatime.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lua/valeth/plugins/wakatime.lua b/lua/valeth/plugins/wakatime.lua index 1f68ae8..fa5311e 100644 --- a/lua/valeth/plugins/wakatime.lua +++ b/lua/valeth/plugins/wakatime.lua @@ -1,6 +1,10 @@ return { "wakatime/vim-wakatime", - cond = function() - return not (os.getenv("WAKATIME_HOME") == nil) + event = function() + if os.getenv("WAKATIME_HOME") then + return { "VimEnter" } + else + return {} + end end }