bdf1f90f33
feat: add per-language template file support
...
Problem: new solution files were always created empty, requiring users
to manually paste boilerplate or rely on editor snippets that fire
outside cp.nvim's control.
Solution: add an optional template field to the language config. When
set to a file path, its contents are written into every newly created
solution buffer before the setup_code hook runs. Existing files are
never overwritten.
2026-02-26 22:54:32 -05:00
Harivansh Rathi
e989897c77
style(lua): format URL-open condition in setup
...
Co-authored-by: Codex <noreply@openai.com>
2026-02-22 22:19:51 -05:00
Harivansh Rathi
1c31abe3d6
fix(open_url): open problem URL when switching problems
...
Also fix contest-change detection so URL open logic triggers when either platform or contest changes. This makes :CP next/:CP prev and problem jumps open the correct page when open_url is enabled.
Co-authored-by: Codex <noreply@openai.com>
2026-02-22 22:19:51 -05:00
d23b4e59d1
fix(setup): set language state before setup_code hook on first open
...
Problem: when opening a contest for the first time (metadata not
cached), the setup_code hook fired before state.set_language() was
called, causing state.get_language() to return nil inside the hook.
Solution: call state.set_language(lang) before the hook in the
provisional-buffer branch of setup_contest(). The value is already
computed at that point and is identical to what setup_problem() sets
later, so the early write is idempotent.
2026-02-06 16:29:46 -05:00
282d701327
fix: minor log msg tweak
2026-01-27 16:10:00 -05:00
d40d80c541
fix: race condition & logs
2026-01-27 12:22:53 -05:00
Barrett Ruth
7d8d00c5ad
fix(ui): correct output buf
2025-11-05 13:10:17 -05:00
Barrett Ruth
71efb24cda
fix
2025-11-04 21:32:51 -05:00
Barrett Ruth
aab211902e
feat: multi-test case view
2025-11-04 21:32:40 -05:00
Barrett Ruth
fef73887e4
feat(io): multi-test case view
2025-11-04 08:15:08 -05:00
Barrett Ruth
91f85d066d
cleanup
2025-10-31 23:24:35 -04:00
Barrett Ruth
11b6056d8c
fix
2025-10-24 16:13:52 -04:00
Barrett Ruth
de45fd3393
fix: modernize use of vim.cmd
2025-10-24 15:16:22 -04:00
Barrett Ruth
9bf3438466
fix: defer to previous problem language
2025-10-24 11:49:48 -04:00
Barrett Ruth
c48cf384a4
feat: error on invalid language
2025-10-24 01:21:54 -04:00
Barrett Ruth
48d4c6f113
feat: language
2025-10-24 01:21:16 -04:00
Barrett Ruth
bd30fb626c
feat: start lang refactor
2025-10-24 01:11:19 -04:00
Barrett Ruth
249e84eb5a
feat: customization
2025-10-24 00:26:14 -04:00
Barrett Ruth
7e2e712b56
fix: rename file
2025-10-23 23:55:27 -04:00
Barrett Ruth
59f5066327
fix input display
2025-10-23 20:03:17 -04:00
Barrett Ruth
dc6f2fd5b6
fix: cleanup logs
2025-10-23 18:29:20 -04:00
Barrett Ruth
c312ccbb4d
fix: highlighting
2025-10-23 18:16:36 -04:00
Barrett Ruth
13933fc7fd
feat: clearcol
2025-10-23 12:10:14 -04:00
Barrett Ruth
92b6ce31f9
fix(ui): open panel on problem setup
2025-10-23 10:52:13 -04:00
Barrett Ruth
347be72774
feat: add solution to window state
2025-10-23 10:07:22 -04:00
352f98f26f
fix: open problem-specific url
2025-10-15 11:00:31 -04:00
7f9f60af5b
fix: don't always open new window
2025-10-12 20:31:11 -04:00
14b8bded1d
fix: buffer name
2025-10-12 16:39:06 -04:00
c0e175d84b
feat(config): open url option
2025-10-12 16:19:02 -04:00
e36a40a9ac
fix(ci): typing
2025-10-05 23:57:01 -04:00
6ae9488761
fix: typing
2025-10-05 23:55:23 -04:00
d4df57bd05
fix(scrapers): cses interactive problems
2025-10-05 20:55:43 -04:00
a0b5264761
fix: improve error handling
2025-10-05 16:06:08 -04:00
edbf118c25
feat(interact): only expect test cases on non-interactive problems
2025-10-05 15:46:29 -04:00
cedcd82367
fix: write interaction into cache
2025-10-05 13:50:14 -04:00
fd550bc654
feat(setup): warn no tests found
2025-10-05 13:45:26 -04:00
b68ecbbe96
rename and simplify things
2025-10-05 11:59:24 -04:00
d2bde9bad8
fix(config): better file org
2025-10-04 19:54:53 -04:00
a76d228e3f
feat(doc): update for new config
2025-10-04 19:04:49 -04:00
aae98a5796
disable scraper disabling
2025-10-04 17:45:49 -04:00
ef8ee26edf
remove per-problem language config
2025-10-04 16:26:01 -04:00
3fbbfa9423
normalize scraper behavior
2025-10-04 16:13:04 -04:00
2ac0a4996d
fix: enable :CP next/prev
2025-10-04 15:16:54 -04:00
18dbcd43d2
fix(cache): contest override
2025-10-04 12:48:57 -04:00
34ef7bafd6
fix print order
2025-10-03 14:41:32 -04:00
1520939d4b
some refactors
2025-10-03 14:34:49 -04:00
91e6fbe455
fix caching
2025-10-02 10:18:29 -04:00
7eb314b02c
fix caching
2025-10-01 20:21:11 -04:00
e6c09a4897
fix some cachign
2025-10-01 17:08:36 -04:00
a925686a17
fix(log): improve logging
2025-10-01 16:41:24 -04:00