-
Notifications
You must be signed in to change notification settings - Fork 0
/
competitest.lua
47 lines (45 loc) · 1.85 KB
/
competitest.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
return {
"xeluxee/competitest.nvim",
dependencies = "MunifTanjim/nui.nvim",
config = function()
require("competitest").setup({
save_current_file = true,
compile_directory = ".",
compile_command = {
c = { exec = "gcc", args = { "-Wall", "$(FNAME)", "-o", "$(FNOEXT)" } },
cpp = { exec = "g++", args = { "-Wall", "$(FNAME)", "-o", "$(FNOEXT)" } },
rust = { exec = "rustc", args = { "$(FNAME)" } },
java = { exec = "javac", args = { "$(FNAME)" } },
},
running_directory = ".",
run_command = {
c = { exec = "./$(FNOEXT)" },
cpp = { exec = "./$(FNOEXT)" },
rust = { exec = "./$(FNOEXT)" },
python = { exec = "python", args = { "$(FNAME)" } },
java = { exec = "java", args = { "$(FNOEXT)" } },
},
multiple_testing = -1,
view_output_diff = true,
testcases_directory = "./tests/",
testcases_input_file_format = "$(TCNUM).in",
testcases_output_file_format = "$(TCNUM).out",
template_file = "~/OI/.templates/template.$(FEXT)",
date_format = "%Y-%m-%d %H:%M:%S",
received_problems_path = "$(HOME)/OI/$(JUDGE)/$(CONTEST)/$(PROBLEM)/main.$(FEXT)",
received_contests_directory = "$(HOME)/OI/$(JUDGE)/$(CONTEST)",
received_contests_problems_path = "$(PROBLEM)/main.$(FEXT)",
evaluate_template_modifiers = true,
})
end,
commander = {
{
cmd = "<CMD>CompetiTest receive problem<CR>",
desc = "Receive problem with CompetiTest",
},
{
cmd = "<CMD>CompetiTest receive contest<CR>",
desc = "Receive contest with CompetiTest",
},
}
}