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
neovim plugin for competitive programming.
https://github.com/user-attachments/assets/cb142535-fba0-4280-8f11-66ad1ca50ca9
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 running and debugging
- Enhanced test viewer
- Templates via LuaSnip
Requirements
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:
- Find a problem
- Browse the remote and find it
- Read it on the remote
- Set up your local environment with
:CP ...
- test cases and expected output automatically scraped
- templates automatically configured
- Solve the problem locally
- easy to run/debug
- easy to diff actual vs. expected output
- Submit the problem (on the remote!)
Similar Projects
TODO
- general
:CP testwindow improvements - fzf/telescope integration (whichever available)
- finer-tuned problem limits (i.e. per-problem codeforces time, memory)
- notify discord members
- handle infinite output/trimming file to 500 lines (customizable)
- update barrettruth.com to post