No description
| .github/workflows | ||
| after | ||
| doc | ||
| ftdetect | ||
| lua/cp | ||
| plugin | ||
| scrapers | ||
| spec | ||
| tests/scrapers | ||
| .busted | ||
| .editorconfig | ||
| .gitignore | ||
| .luarc.json | ||
| .pre-commit-config.yaml | ||
| .python-version | ||
| cp.nvim-scm-1.rockspec | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
| selene.toml | ||
| stylua.toml | ||
| uv.lock | ||
| vim.toml | ||
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
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.
- Find a problem on the judge website
- Set up locally with
:CP <platform> <contest> <problem> - Code and test with instant feedback and rich diffs
- Submit on the original website
Documentation
:help cp.nvim
See my config for a relatively advanced setup.