feat: remove diff mode
This commit is contained in:
parent
13415f18d2
commit
d43d8e4258
3 changed files with 5 additions and 17 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue