feat: problem statement panel #260
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
barrettruth/cp.nvim#260
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
cp.nvim has
open_url = truewhich opens the problem page in a browser. This requires context-switching out of Neovim. No CP tool currently renders the problem statement within Neovim itself, which would be a meaningful differentiator.Proposed solution
Extend the Python scrapers to extract the problem statement as Markdown (in addition to test cases) and cache it. Add a
:CP statementcommand that opens the Markdown content in a floating or split buffer.The statement buffer could use
render-markdown.nvim(if installed) for rendering, falling back to plain Markdown text. The Competitive Companion JSON payload also contains aurlfield which could support fetching viapandocor similar for platforms not in the scraper set.Configuration:
Alternatives considered
open_url+ browser (current approach, no Neovim integration)vim.ui.openfor the URL (same as current, no rendering)The scraper-based approach is the most self-contained and works offline with cached data.
NOTE: I don't really like this at all