No description
Find a file
2025-09-20 19:42:11 +02:00
.github/workflows fix(ci): pnpm markdown cache 2025-09-20 12:26:55 -04:00
after fix(ci): format 2025-09-18 20:04:36 -04:00
doc feat(doc): make more informative 2025-09-20 13:15:45 -04:00
ftdetect fix(ci): format 2025-09-18 20:04:36 -04:00
lua/cp fix(ci): use proper redirection with un-mocked vim.system in integration tests 2025-09-20 13:36:27 -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 fix(ci): typing 2025-09-20 13:40:32 -04:00
tests/scrapers feat(test): test ansi colors with stderr/stdout merged output 2025-09-20 13:03:07 -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 feat(ci): pre-commit 2025-09-19 16:01:17 -04:00
README.md fix(doc): communicate lack of windows support 2025-09-20 12:38:32 -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: cp.nvim webs crapes data from competitive programming platforms - 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

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

Basic Usage

  1. Find a problem on the judge website

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

    :CP codeforces 1848 A
    
  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

TODO

  • Windows support