No description
Find a file
2025-09-19 00:26:18 -04:00
.github/workflows feat(ci): reorganize 2025-09-18 23:33:13 -04:00
after fix(ci): format 2025-09-18 20:04:36 -04:00
doc fix(doc): alignment 2025-09-19 00:21:57 -04:00
ftdetect fix(ci): format 2025-09-18 20:04:36 -04:00
lua/cp fix(ci): fix tests 2025-09-19 00:26:18 -04:00
plugin feat: base testing files 2025-09-18 22:25:40 -04:00
scrapers fix(ci): type scrapers 2025-09-18 22:14:13 -04:00
spec fix(ci): fix tests 2025-09-19 00:26:18 -04:00
tests/scrapers fix(ci): include scrapers, though 2025-09-18 22:17:14 -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
.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: ignore missing clourscrapers 2025-09-18 22:02:21 -04:00
README.md feat(doc): update project goals 2025-09-18 23:49:29 -04:00
selene.toml try to fix 2025-09-18 20:14:48 -04:00
stylua.toml fix: imports 2025-09-18 20:12:01 -04:00
uv.lock feat(ci): pytest 2025-09-18 22:01:40 -04:00
vim.toml fix: typing 2025-09-18 21:31:56 -04:00

cp.nvim

neovim plugin for competitive programming.

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

video config

Sample test data from codeforces is scraped via cloudscraper. Use at your own risk.

Features

  • Support for multiple online judges (AtCoder, Codeforces, CSES)
  • Multi-language support (C++, Python)
  • Automatic problem scraping and test case management
  • Integrated build, run, and debug commands
  • Enhanced test viewer with individual test case management
  • LuaSnip integration for contest-specific snippets

Requirements

  • Neovim 0.10.0+
  • uv: problem scraping (optional)
  • LuaSnip: contest-specific snippets (optional)

Documentation

:help cp.nvim

Philosophy

This plugin is highly tuned to my workflow and may not fit for you. Personally, I believe there are two aspects of a cp workflow:

  • local work (i.e. coding, running test cases)
  • site work (i.e. problem reading, submitting)

Namely, I do not like the idea of submitting problems locally - the experience will never quite offer what the remote does. Therefore, cp.nvim works as follows:

  1. Find a problem
  • Browse the remote and find it
  • Read it on the remote
  1. Set up your local environment with :CP ...
  • test cases and expected output automatically scraped
  • templates automatically configured
  1. Solve the problem locally
  • easy to run/debug
  • easy to diff actual vs. expected output
  1. Submit the problem (on the remote!)

Similar Projects

TODO

  • general :CP test window improvements
  • fzf/telescope integration (whichever available)
  • finer-tuned problem limits (i.e. per-problem codeforces time, memory)
  • notify discord members