No description
Find a file
2025-10-01 17:08:36 -04:00
.github/workflows try to fix ci 2025-09-30 20:33:01 -04:00
after fix(ci): format 2025-09-18 20:04:36 -04:00
doc better scraper config 2025-09-30 22:33:36 -04:00
ftdetect fix(ci): format 2025-09-18 20:04:36 -04:00
lua/cp fix some cachign 2025-10-01 17:08:36 -04:00
plugin fix(health): simplify health check 2025-09-30 19:49:10 -04:00
scrapers better scraper config 2025-09-30 22:33:36 -04:00
spec fix(log): improve logging 2025-10-01 16:41:24 -04:00
tests/scrapers fix(test): fix mock 2025-09-30 22:37:59 -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 fix(ci): auto-run formatters 2025-09-20 12:24:38 -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 fix(scraper): use scrapling 2025-09-30 20:16:59 -04:00
README.md Merge pull request #112 from barrett-ruth/feat/interact 2025-10-01 01:57:28 +02: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 fix(scraper): use scrapling 2025-09-30 20:16:59 -04:00
vim.toml fix(ci): some type errors 2025-09-19 14:04:37 -04:00

cp.nvim

⚠️ Warning: as of 27/09/25, CodeForces upgraded their anti-scraping technology and support is thus (temporarily) broken. I am actively researching a way around this.

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/50b19481-8e6d-47b4-bebc-15e16c61a9c9

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

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

Basic Usage

  1. Find a contest or problem on the judge website

  2. Set up locally with :CP <platform> <contest> [<problem>]

    :CP codeforces 1848
    
  3. Code and test with instant feedback and rich diffs

    :CP run
    
  4. Navigate between problems

    :CP next
    :CP prev
    
  5. Submit on the original website

Documentation

:help cp.nvim

See my config for a relatively advanced setup.

Similar Projects