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
parent
e454482970
commit
5948629c28
|
|
@ -270,3 +270,14 @@ local function toggle_pim()
|
|||
end
|
||||
|
||||
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,
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue