fix: default contest config
This commit is contained in:
parent
b41ed5be13
commit
f0fbb15765
2 changed files with 14 additions and 6 deletions
|
|
@ -68,20 +68,27 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
local constants = require('cp.constants')
|
local constants = require('cp.constants')
|
||||||
|
|
||||||
local default_cpp_config = {
|
local default_contest_config = {
|
||||||
cpp = {
|
cpp = {
|
||||||
compile = { 'g++', '-std=c++17', '{source}', '-o', '{binary}' },
|
compile = { 'g++', '-std=c++17', '{source}', '-o', '{binary}' },
|
||||||
debug = { 'g++', '-std=c++17', '-fsanitize=address,undefined', '{source}', '-o', '{binary}' },
|
debug = { 'g++', '-std=c++17', '-fsanitize=address,undefined', '{source}', '-o', '{binary}' },
|
||||||
extension = 'cpp',
|
test = { '{binary}' },
|
||||||
},
|
},
|
||||||
|
python = {
|
||||||
|
test = { '{source}' },
|
||||||
|
debug = { '{source}' },
|
||||||
|
executable = 'python',
|
||||||
|
extension = 'py',
|
||||||
|
},
|
||||||
|
default_language = 'cpp',
|
||||||
}
|
}
|
||||||
|
|
||||||
---@type cp.Config
|
---@type cp.Config
|
||||||
M.defaults = {
|
M.defaults = {
|
||||||
contests = {
|
contests = {
|
||||||
codeforces = default_cpp_config,
|
codeforces = default_contest_config,
|
||||||
atcoder = default_cpp_config,
|
atcoder = default_contest_config,
|
||||||
cses = default_cpp_config,
|
cses = default_contest_config,
|
||||||
},
|
},
|
||||||
snippets = {},
|
snippets = {},
|
||||||
hooks = {
|
hooks = {
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,8 @@ function M.setup_problem(contest_id, problem_id, language)
|
||||||
|
|
||||||
state.set_contest_id(contest_id)
|
state.set_contest_id(contest_id)
|
||||||
state.set_problem_id(problem_id)
|
state.set_problem_id(problem_id)
|
||||||
state.set_run_panel_active(false)
|
-- TODO: why comment this out
|
||||||
|
-- state.set_active_panel('run')
|
||||||
|
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
local ok, err = pcall(function()
|
local ok, err = pcall(function()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue