feat: CP submit subcommand #256
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#256
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
cp.nvim currently has no way to submit solutions. Users must context-switch to a browser for every submission, which is a significant flow interruption — especially in timed contests. The problem URL is already stored in the cache per problem. Tools like
oj(online-judge-tools) andcf-toolprovide CLI submission for AtCoder, Codeforces, and others.Proposed solution
Add
:CP submit [--lang <lang>]as a new action. The workflow:Configuration would look like:
The problem URL (
cache.get_contest_data(platform, contest_id).url) is already tracked.oj submit FILE URLandcf submit -f FILE SPECIFIERare the natural backends.Verdict tracking (polling for the result after submission) can be a follow-up issue.
Alternatives considered
Delegating entirely to an external tool like
cf-toolthat the user invokes from the terminal. This works but loses the integration with cp.nvim's current build/test state.^ NOTE: cf-tool sucks and is archived
NOTE: would have to change the whole "philosphy" section for sure
Submit is shipped and working for CSES, AtCoder, and Codeforces. Remaining platform stubs (CodeChef, Kattis, USACO) tracked in #296.