Commit graph

21 commits

Author SHA1 Message Date
Barrett Ruth
da4e2ebeba
feat: git credential backend for credential storage (#371)
## Problem

Credentials were stored as plaintext JSON in
`stdpath('data')/cp-nvim.json`, with no integration with system
credential managers.

## Solution

Replace file-based credential storage with `git credential
fill/approve/reject`, delegating to whatever credential helper the user
has configured (`cache`, `store`, `libsecret`, macOS Keychain, etc.).

- New `lua/cp/git_credential.lua` module wrapping the git credential
protocol
- All credential consumers (`credentials.lua`, `submit.lua`,
`scraper.lua`) use `git_credential` directly — `cache.lua` no longer
handles credentials
- CSES API token packed into the password field (`password<TAB>token`)
so it works with helpers that ignore the `path` field
- `has_helper()` guard on `:CP login`, `:CP logout`, and `:CP submit`
with an error message if no helper is configured
- Healthcheck split into `[required]`/`[optional]` sections; git version
and credential helper status shown
- `git` checked at startup in `check_required_runtime()`
- Cache version system (`CACHE_VERSION`, v1→v2 migration) removed — the
cache file is now a plain JSON blob
- `:CP` command gets `bar = true`
2026-03-07 20:15:06 -05:00
Barrett Ruth
3c11d609f5
feat(codechef): implement full CodeChef support (#354)
## Problem

CodeChef had no working login, submit, or contest list. The browser
selectors were wrong, the contest list was missing present/past
contests,
and problem/contest URLs were unset.

## Solution

Fix login and submit selectors for the Drupal-based site. Paginate
`/api/list/contests/past` to collect all 228 Starters, then expand each
parent contest into individual division entries (e.g. `START228 (Div.
4)`).
Add language IDs, correct `url`/`contest_url`/`standings_url` in
metadata,
and make `:CP <platform>` open the contest picker directly.
2026-03-06 23:10:44 -05:00
3cb872a65f fix: replace deprecated vim.loop with vim.uv
Problem: vim.loop is deprecated since Neovim 0.10 in favour of vim.uv.
Five call sites across scraper.lua, setup.lua, utils.lua, and health.lua
still referenced the old alias.

Solution: replace every vim.loop reference with vim.uv directly.
2026-02-26 22:45:07 -05:00
2148d9bd07 feat(nix): add health 2026-02-18 14:13:37 -05:00
1162e7046b try to fix the setup 2026-02-18 14:13:37 -05:00
b68ecbbe96 rename and simplify things 2025-10-05 11:59:24 -04:00
5991670ef2 fix health and hl groups 2025-10-03 09:34:25 -04:00
5fdb522095 feat(health): better organization 2025-10-02 22:43:38 -04:00
d9537e72ba many fixes 2025-10-02 22:35:30 -04:00
dc4326524c fix(health): simplify health check 2025-09-30 19:49:10 -04:00
58f9be5f9a fix: refactor 2025-09-21 11:19:00 -04:00
bc315818e4 fix(ci): format 2025-09-18 20:04:36 -04:00
67d2a8054c feat: local state over vim.g 2025-09-15 07:05:31 -05:00
c1c1194945 fix(ci): update typing 2025-09-14 00:11:09 -05:00
c1c9674503 feat: lazy load 2025-09-14 00:05:09 -05:00
e66c57530e fix: remove old state variables, migrate to vim.g 2025-09-13 23:50:14 -05:00
649d1c19ea fix: remove redundant vresioning 2025-09-13 00:44:36 -05:00
04274186cc feat(ci): Format 2025-09-13 00:41:51 -05:00
f13a05c806 feat: include versioning 2025-09-13 00:39:53 -05:00
9b30ceed95 fix(health): cp nvim health checkup 2025-09-12 18:15:10 -05:00
94f5828a0a feat: modernize the plugin 2025-09-12 17:29:55 -05:00