feat(nvim): sync CalDAV on startup via background jobstart

Runs vdirsyncer sync + ics-to-calendarim in a detached background job
on VimEnter so the calendar.vim cache stays fresh without blocking startup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
Amir Alexander Abdelbaki 2026-05-26 14:12:24 +02:00
parent e454482970
commit 5948629c28
1 changed files with 11 additions and 0 deletions

View File

@ -270,3 +270,14 @@ local function toggle_pim()
end end
vim.keymap.set("n", "x", toggle_pim, { silent = true }) vim.keymap.set("n", "x", toggle_pim, { silent = true })
-- ── CalDAV background sync on startup ────────────────────────────────────────
vim.api.nvim_create_autocmd("VimEnter", {
once = true,
callback = function()
vim.fn.jobstart(
{ "sh", "-c", "vdirsyncer sync && ics-to-calendarim" },
{ detach = true }
)
end,
})