Commit graph

39 commits

Author SHA1 Message Date
c689b3e462
refactor(credentials): rename set/clear to login/logout/clear
Problem: the `set` and `clear` subcommands don't clearly convey their
intent — `set` reads like a generic setter rather than an auth action,
and `clear` overloads single-platform and all-platform semantics in one
subcommand.

Solution: rename `set` to `login`, split `clear` into `logout`
(per-platform, defaults to active) and `clear` (all platforms). Update
parser, dispatcher, tab completion, and vimdoc.
2026-03-04 12:48:55 -05:00
a04702d87c refactor: replace :CP login with :CP credentials subcommand
Problem: :CP login was a poor API — no way to clear credentials without
raw Lua, and the single command didn't scale to multiple operations.

Solution: replace login with a :CP credentials subcommand following the
same pattern as :CP cache. :CP credentials set [platform] prompts and
saves; :CP credentials clear [platform] removes one or all platforms.
Add cache.clear_credentials(), rename login.lua to credentials.lua,
update parse/dispatch/tab-complete, and rewrite vimdoc accordingly.
2026-03-03 16:46:07 -05:00
3e0b7beabf feat: add :CP login command for explicit credential management
Problem: credentials were only set implicitly on first :CP submit.
There was no way to update wrong credentials, log out, or set
credentials ahead of time without editing the cache JSON manually.

Solution: add :CP login [platform] which always prompts for username
and password and overwrites any saved credentials for that platform.
Omitting the platform falls back to the active platform. Wire the
command through constants, parse_command, handle_command, and add
tab-completion (suggests platform names). Document in vimdoc under
the SUBMIT section and in the commands reference.
2026-03-03 16:28:54 -05:00
bfa2cf893c feat: wire race, stress, and submit commands and keymaps
Add command parsing and dispatch for :CP race, :CP race stop, :CP stress,
and :CP submit. Add tab-completion for race (platform/contest/--lang),
stress (cwd executables at arg 2 and 3), and race stop. Add
<Plug>(cp-stress), <Plug>(cp-submit), and <Plug>(cp-race-stop) keymaps.
2026-03-03 15:09:41 -05:00
Barrett Ruth
1b0d5e4d77 feat: fix typign 2025-11-04 22:08:07 -05:00
Barrett Ruth
e1c8c4beaf feat(cli): :CP run with numbered test cases 2025-11-04 21:45:45 -05:00
Barrett Ruth
aab211902e feat: multi-test case view 2025-11-04 21:32:40 -05:00
Barrett Ruth
4b1b75fd6e fix(config): padding spacing 2025-10-24 14:44:33 -04:00
Barrett Ruth
3daf582b7a feat(cache): update cache 2025-10-24 14:26:51 -04:00
Barrett Ruth
9d848eba22 feat: improve autocomplete 2025-10-24 01:44:06 -04:00
Barrett Ruth
bd30fb626c feat: start lang refactor 2025-10-24 01:11:19 -04:00
Barrett Ruth
7e2e712b56 fix: rename file 2025-10-23 23:55:27 -04:00
Barrett Ruth
82021e3d97 fix ci 2025-10-23 23:48:32 -04:00
Barrett Ruth
6a6cf2c594 feat: bindings and --debug flag 2025-10-23 23:36:09 -04:00
Barrett Ruth
60e5aabd99 fix types 2025-10-23 20:15:16 -04:00
Barrett Ruth
59f5066327 fix input display 2025-10-23 20:03:17 -04:00
Barrett Ruth
c312ccbb4d fix: highlighting 2025-10-23 18:16:36 -04:00
Barrett Ruth
114187164e improve some refactors 2025-10-23 11:16:13 -04:00
Barrett Ruth
018d801121 fix: rename run panel to panel 2025-10-23 09:54:55 -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
41a8d1a75b feat: interactive mode 2025-10-05 15:36:28 -04:00
44bfc7317d feat(cli): :CP <problem_id> 2025-10-05 12:59:50 -04:00
91864b2992 fix(ci): type check 2025-10-05 12:40:23 -04:00
f5a72a3a8f doc cleanups 2025-10-05 12:32:43 -04:00
b68ecbbe96 rename and simplify things 2025-10-05 11:59:24 -04:00
ef8ee26edf remove per-problem language config 2025-10-04 16:26:01 -04:00
1974addbd2 fix(lua): bunch of typing 2025-10-02 14:18:26 -04:00
6b8a1e2087 more docs 2025-10-01 21:36:53 -04:00
7eb314b02c fix caching 2025-10-01 20:21:11 -04:00
62af1965f8 fix a lot of logic 2025-10-01 15:15:04 -04:00
b406c0ce4e fix: synchronous problem fetch 2025-10-01 12:25:07 -04:00
316b6628db indeed it toggles 2025-09-26 08:36:00 -04:00
7efd6404b6 feat: interactive terminal 2025-09-26 08:28:19 -04:00
f9cf5b1614 possibly working 2025-09-23 10:17:22 -04:00
e171017ab0 fixup 2025-09-23 09:42:45 -04:00
a32fd396d3 feat: async scraper 2025-09-22 22:59:57 -04:00
9c2be9c6b0 feat: some more updates 2025-09-22 19:11:11 -04:00
5a6902633f refactor: massive file restructure 2025-09-22 19:00:36 -04:00