fix: expand language IDs, fix AtCoder submit, normalize logging (#353)
## Problem Language version coverage was incomplete across all platforms, AtCoder submit used a stale cookie fast-path that caused silent failures, and raw `vim.notify` calls throughout the codebase produced inconsistent or missing `[cp.nvim]:` prefixes. ## Solution Remove cookie persistence from AtCoder login/submit (always fresh login), increase the submit nav timeout to 40s, and switch to in-memory buffer upload with the correct per-language extension from a full `_LANGUAGE_ID_EXTENSION` map covering all 116 AtCoder languages. Expand `LANGUAGE_VERSIONS` in `constants.lua` with all AtCoder languages, 15 new CF languages with full version variants, and 50+ Kattis languages. Fix AtCoder `prolog` ID (`6079`→`6081`, was Pony) and remove the non-existent `racket` entry. Replace all raw `vim.notify` calls with `logger.log`. Simplify the submit language doc to point at `constants.lua` rather than maintaining a static table.
This commit is contained in:
parent
1ac521a126
commit
291de4e137
13 changed files with 356 additions and 114 deletions
|
|
@ -142,7 +142,10 @@ local function discover_nix_submit_cmd()
|
|||
|
||||
local plugin_path = M.get_plugin_path()
|
||||
vim.cmd.redraw()
|
||||
vim.notify('Building submit environment...', vim.log.levels.INFO)
|
||||
logger.log(
|
||||
'Building submit environment...',
|
||||
{ level = vim.log.levels.INFO, override = true, sync = true }
|
||||
)
|
||||
vim.cmd.redraw()
|
||||
local result = vim
|
||||
.system(
|
||||
|
|
@ -209,7 +212,10 @@ local function discover_nix_python()
|
|||
end
|
||||
|
||||
local plugin_path = M.get_plugin_path()
|
||||
vim.notify('[cp.nvim] Building Python environment with nix...', vim.log.levels.INFO)
|
||||
logger.log(
|
||||
'Building Python environment with nix...',
|
||||
{ level = vim.log.levels.INFO, override = true, sync = true }
|
||||
)
|
||||
vim.cmd.redraw()
|
||||
local result = vim
|
||||
.system(
|
||||
|
|
@ -263,7 +269,10 @@ function M.setup_python_env()
|
|||
if not on_nixos and vim.fn.executable('uv') == 1 then
|
||||
local plugin_path = M.get_plugin_path()
|
||||
logger.log('Python env: uv sync (dir=' .. plugin_path .. ')')
|
||||
vim.notify('[cp.nvim] Setting up Python environment...', vim.log.levels.INFO)
|
||||
logger.log(
|
||||
'Setting up Python environment...',
|
||||
{ level = vim.log.levels.INFO, override = true, sync = true }
|
||||
)
|
||||
vim.cmd.redraw()
|
||||
|
||||
local env = vim.fn.environ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue