diff --git a/lua/cp/init.lua b/lua/cp/init.lua index 893a50f..6f49f81 100644 --- a/lua/cp/init.lua +++ b/lua/cp/init.lua @@ -23,16 +23,14 @@ local state = { platform = nil, contest_id = nil, problem_id = nil, - diff_mode = false, saved_layout = nil, saved_session = nil, - temp_output = nil, test_cases = nil, test_states = {}, } local platforms = { "atcoder", "codeforces", "cses" } -local actions = { "run", "debug", "diff", "next", "prev" } +local actions = { "run", "debug", "next", "prev" } local function set_platform(platform) if not vim.tbl_contains(platforms, platform) then @@ -66,19 +64,6 @@ local function setup_problem(contest_id, problem_id, language) ) end - if state.diff_mode then - vim.cmd.diffoff() - if state.saved_session then - vim.fn.delete(state.saved_session) - state.saved_session = nil - end - if state.temp_output then - vim.fn.delete(state.temp_output) - state.temp_output = nil - end - state.diff_mode = false - end - vim.cmd("silent only") state.contest_id = contest_id diff --git a/plugin/cp.lua b/plugin/cp.lua index 9e19695..ee9e817 100644 --- a/plugin/cp.lua +++ b/plugin/cp.lua @@ -4,7 +4,7 @@ end vim.g.loaded_cp = 1 local platforms = { "atcoder", "codeforces", "cses" } -local actions = { "run", "debug", "diff", "next", "prev" } +local actions = { "run", "debug", "next", "prev" } vim.api.nvim_create_user_command("CP", function(opts) local cp = require("cp") diff --git a/readme.md b/readme.md index 0cf652f..bbec5a4 100644 --- a/readme.md +++ b/readme.md @@ -62,6 +62,7 @@ follows: ## Similar Projects - [competitest.nvim](https://github.com/xeluxee/competitest.nvim) +- [assistant.nvim](https://github.com/A7Lavinraj/assistant.nvim) ## TODO @@ -70,3 +71,5 @@ follows: - test case management - USACO support - new video with functionality, notify discord members +- note that codeforces support is scuffed: https://codeforces.com/blog/entry/146423 +- codeforces: use round number & api not the contest id