No description
Find a file
Barrett Ruth 031d531436
Some checks are pending
quality / changes (push) Waiting to run
quality / Lua Format Check (push) Blocked by required conditions
quality / Lua Lint Check (push) Blocked by required conditions
quality / Lua Type Check (push) Blocked by required conditions
quality / Python Format Check (push) Blocked by required conditions
quality / Python Lint Check (push) Blocked by required conditions
quality / Python Type Check (push) Blocked by required conditions
quality / Markdown Format Check (push) Blocked by required conditions
tests / changes (push) Waiting to run
tests / Python Tests (push) Blocked by required conditions
ci: format
2026-03-07 20:17:01 -05:00
.github ci: nix config migration 2026-02-23 18:04:17 -05:00
after/ftplugin rename and simplify things 2025-10-05 11:59:24 -04:00
doc feat: git credential backend for credential storage (#371) 2026-03-07 20:15:06 -05:00
lua/cp feat: git credential backend for credential storage (#371) 2026-03-07 20:15:06 -05:00
plugin feat: git credential backend for credential storage (#371) 2026-03-07 20:15:06 -05:00
scrapers ci: format 2026-03-07 20:15:25 -05:00
scripts feat(atcoder): extract submit helpers; add live status notifications (#294) 2026-03-04 19:27:29 -05:00
tests feat(codechef): implement full CodeChef support (#354) 2026-03-06 23:10:44 -05:00
.editorconfig fix: imports 2025-09-18 20:12:01 -04:00
.gitignore fix(scrapers): cookie fast paths, centralized storage, and reauth hardening (#363) 2026-03-07 16:10:51 -05:00
.luarc.json feat(atcoder): extract submit helpers; add live status notifications (#294) 2026-03-04 19:27:29 -05:00
.pre-commit-config.yaml format yml too in pre-commit 2026-02-03 01:43:13 -05:00
.prettierignore some misc fixes 2025-12-07 16:09:17 -06:00
.prettierrc fix: scrapers 2025-10-05 22:10:26 -04:00
.python-version initial commit 2025-09-11 23:52:32 -05:00
.styluaignore feat(atcoder): extract submit helpers; add live status notifications (#294) 2026-03-04 19:27:29 -05:00
cp.nvim-scm-1.rockspec fix(ci): fix rockspec url 2026-02-01 17:01:29 -05:00
flake.lock try to fix the setup 2026-02-18 14:13:37 -05:00
flake.nix fix: replace curl_cffi with scrapling in codeforces metadata (#334) 2026-03-06 13:25:44 -05:00
LICENSE fix(ci): format 2025-09-18 20:04:36 -04:00
pyproject.toml fix: replace curl_cffi with scrapling in codeforces metadata (#334) 2026-03-06 13:25:44 -05:00
README.md ci: format 2026-03-07 20:17:01 -05:00
selene.toml ci: nix config migration 2026-02-23 18:04:17 -05:00
stylua.toml fix: imports 2025-09-18 20:12:01 -04:00
uv.lock fix: remove curl_cffi 2026-03-06 15:05:42 -05:00
vim.yaml fix(config): add bit to ignored filetypes 2026-02-26 19:09:16 -05:00

cp.nvim

The definitive competitive programming environment for Neovim

Scrape problems, run tests, and debug solutions across multiple platforms with zero configuration.

https://github.com/user-attachments/assets/e81d8dfb-578f-4a79-9989-210164fc0148

Features

  • Multi-platform support: AtCoder, CodeChef, Codeforces, USACO, CSES, Kattis
  • Online Judge Integration: Submit problems and view contest standings
  • Live Contest Support: Participate in real-time contests
  • Automatic setup: Scrape test cases and metadata in seconds
  • Streamlined Editing: Configure coding view, edit test cases, stress-test solutions, run interactive problems, and more
  • Rich output: 256 color ANSI support for compiler errors and program output
  • Language agnosticism: Configure with any language
  • Security: Passwords go untampered

Installation

Install using your package manager of choice or via luarocks:

luarocks install cp.nvim

Dependencies

Quick Start

  1. Find a contest:
:CP pick
  1. View the problem:
:CP open
  1. Code and test
:CP run
  1. Navigate between problems
:CP next
:CP prev
:CP e1
  1. Debug and edit test cases
:CP edit
:CP panel --debug
  1. Submit:
:CP submit
  1. View contest standings:
:CP open standings

Documentation

:help cp.nvim

See my config for the setup in the video shown above.

Motivation

I could not find a neovim-centric, efficient, dependency-free, flexible, and easily customizable competitive programming workflow that "just works"--so I made it myself. I conferenced with top competitive programmers at Carnegie Mellon Univerity and the University of Virginia and covered their (and my) pain points:

  • Scraping: contests are automatically loaded asynchronously
  • Test Case Management: test case editor (:CP edit)
  • UI: both run and panel layouts cover common formats
  • Extensibility: snippet plugins, compilation, etc. are left to the programmer

Similar Projects