cp.nvim/README.md
2025-09-19 22:23:01 -04:00

1.8 KiB

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)
  • Language-agnostic features
  • Automatic problem scraping and test case management
  • Integrated running and debugging
  • Enhanced test viewer
  • Templates via LuaSnip

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