No description
Find a file
2025-09-20 12:02:09 -04:00
.github/workflows fix(ci): run as modukle 2025-09-19 21:20:31 -04:00
after fix(ci): format 2025-09-18 20:04:36 -04:00
doc feat(doc): comprehensive documentation on missing things 2025-09-19 23:51:58 -04:00
ftdetect fix(ci): format 2025-09-18 20:04:36 -04:00
lua/cp feat: test -> run on filenames 2025-09-20 11:47:16 -04:00
plugin feat: base testing files 2025-09-18 22:25:40 -04:00
scrapers fix(ci): run as modukle 2025-09-19 21:20:31 -04:00
spec Merge branch 'main' into feat/color 2025-09-20 11:48:49 -04:00
tests/scrapers fix(test): fix the scrapers 2025-09-19 20:32:58 -04:00
.busted fix(ci): revamp 2025-09-18 19:59:07 -04:00
.editorconfig fix: imports 2025-09-18 20:12:01 -04:00
.gitignore fix(ci): unused vars 2025-09-18 23:51:59 -04:00
.luarc.json fix(ci): proper luarc runtime 2025-09-18 19:44:38 -04:00
.pre-commit-config.yaml feat(ci): pre-commit 2025-09-19 16:01:17 -04:00
.python-version initial commit 2025-09-11 23:52:32 -05:00
cp.nvim-scm-1.rockspec remove; 2025-09-18 20:17:51 -04:00
LICENSE fix(ci): format 2025-09-18 20:04:36 -04:00
pyproject.toml feat(ci): pre-commit 2025-09-19 16:01:17 -04:00
README.md feat(doc): more appealing readme 2025-09-20 12:02:09 -04:00
selene.toml fix(ci): fix the tests 2025-09-19 18:46:00 -04:00
stylua.toml fix: imports 2025-09-18 20:12:01 -04:00
uv.lock feat(ci): pre-commit 2025-09-19 16:01:17 -04:00
vim.toml fix(ci): some type errors 2025-09-19 14:04:37 -04:00

cp.nvim

Fast, minimal competitive programming environment for Neovim

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

Disclaimer: This plugin scrapes data from competitive programming websites. Use at your own risk.

https://github.com/user-attachments/assets/cb142535-fba0-4280-8f11-66ad1ca50ca9

Features

  • Multi-platform support: AtCoder, Codeforces, CSES with consistent interface
  • Automatic problem setup: Scrape test cases and metadata in seconds
  • Rich test output: ANSI color support for compiler errors and program output
  • Language agnostic: Works with any compiled language
  • Template integration: Contest-specific snippets via LuaSnip
  • Diff viewer: Compare expected vs actual output with precision

Optional Dependencies

  • uv for problem scraping
  • LuaSnip for templates

Quick Start

Set up a Codeforces problem with contest ID 1848:

:CP codeforces 1848 A

Navigate between problems:

:CP next
:CP prev

Run tests:

:CP run

Workflow

cp.nvim follows a simple principle: solve locally, submit remotely.

  1. Find a problem on the judge website
  2. Set up locally with :CP <platform> <contest> <problem>
  3. Code and test with instant feedback and rich diffs
  4. Submit on the original website

Documentation

:help cp.nvim

See my config for a relatively advanced setup.

Similar Projects