1
0

plugins/wakatime: check if path exists before loading

This commit is contained in:
Patrick Auernig 2024-10-04 10:34:17 +02:00
parent 64b2a61360
commit 15a7611549

View File

@ -1,10 +1,15 @@
return {
local spec = {
"wakatime/vim-wakatime",
event = function()
if os.getenv("WAKATIME_HOME") then
return { "VimEnter" }
else
return {}
end
end
}
spec.event = function()
local wakatime_home = os.getenv("WAKATIME_HOME")
if wakatime_home and vim.loop.fs_stat(wakatime_home) then
return { "VimEnter" }
end
return {}
end
return spec