feat: contest start countdown and auto-setup (CP race) #264
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
barrettruth/cp.nvim#264
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
In rated contests, the moment a contest opens the fastest setup wins. Currently users must manually run
:CP codeforces 2050the instant the contest begins.cf-toolhascf race CONTEST_IDwhich counts down to contest start time and automatically parses all problems the instant they become available.Proposed solution
Add
:CP race <platform> <contest_id>which:/api/contest.listendpoint returningstartTimeSeconds)vim.notifyupdates usingvim.uv.new_timersetup_contestflow:CP race stopThe countdown could also be surfaced via
cp.statusline.component()(issue #263).This requires only a
vim.uv.new_timer+ one HTTP/API call, reusing all existing setup infrastructure.Alternatives considered
Manual invocation at contest start. This works but the race mode is a meaningful convenience for regular contest participants — especially since Codeforces contests start at a precise second.