cp.nvim/README.md
2025-10-01 20:21:11 -04:00

1.6 KiB

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/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> [--{lang=<lang>,debug}]

    :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