competitive programming plugin for neovim
  • Lua 62.6%
  • Python 36%
  • Nix 0.9%
  • Shell 0.4%
  • Just 0.1%
Find a file
Barrett Ruth 2cce93de35
All checks were successful
quality / Format (push) Successful in 12s
quality / Lint (push) Successful in 9s
quality / Test (push) Successful in 5s
deploy / LuaRocks (nightly) (push) Successful in 1m4s
docs: update mirror banner wording (#404)
## Summary
- update the README GitHub mirror banner to the active-development wording
- keep the Forgejo link repo-specific and preserve any existing canonical-link note

## Checks
- git diff --check

Reviewed-on: https://git.barrettruth.com/barrettruth/cp.nvim/pulls/404
2026-05-05 21:27:18 +00:00
.forgejo docs: add contributing guide (#403) 2026-05-05 17:52:55 +00:00
.github/workflows port: complete Forgejo migration cleanup (#400) 2026-05-04 23:05:21 +00:00
after/ftplugin rename and simplify things 2025-10-05 11:59:24 -04:00
doc port: complete Forgejo migration cleanup (#400) 2026-05-04 23:05:21 +00:00
lua/cp Normalize notification prefix (#402) 2026-05-05 16:31:35 +00:00
plugin port: complete Forgejo migration cleanup (#400) 2026-05-04 23:05:21 +00:00
scrapers build(nix): use nixpkgs vimdoc-language-server (#380) 2026-04-20 18:33:59 -04:00
scripts ci: make just the task source of truth (#379) 2026-04-20 12:06:48 -04: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
.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
biome.json chore: replace prettier with biome (#381) 2026-04-25 16:16:15 -04:00
CONTRIBUTING.md docs: add contributing guide (#403) 2026-05-05 17:52:55 +00:00
cp.nvim-scm-1.rockspec docs: use Forgejo install URLs for cp.nvim (#383) 2026-05-02 17:48:26 +00:00
flake.lock build(nix): use nixpkgs vimdoc-language-server (#380) 2026-04-20 18:33:59 -04:00
flake.nix chore: replace prettier with biome (#381) 2026-04-25 16:16:15 -04:00
justfile docs: normalize port cleanup metadata (#399) 2026-05-04 21:29:27 +00:00
LICENSE chore: switch license to GPL 2026-05-01 04:51:10 +00:00
pyproject.toml fix: replace curl_cffi with scrapling in codeforces metadata (#334) 2026-03-06 13:25:44 -05:00
README.md docs: update mirror banner wording (#404) 2026-05-05 21:27:18 +00: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.

Note

Due to GitHub's historic unreliability, active development is hosted on Forgejo. GitHub is maintained as a read-only mirror. See :help cp.nvim-migration to optionally update your plugin source configuration.

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

With vim.pack (Neovim 0.12+):

vim.pack.add({
  'https://git.barrettruth.com/barrettruth/cp.nvim',
})

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