feat: provide default contest config

This commit is contained in:
Barrett Ruth 2025-09-26 09:15:43 -04:00
parent bf191d7f67
commit b41ed5be13

View file

@ -68,27 +68,20 @@
local M = {}
local constants = require('cp.constants')
local default_cpp_config = {
cpp = {
compile = { 'g++', '-std=c++17', '{source}', '-o', '{binary}' },
debug = { 'g++', '-std=c++17', '-fsanitize=address,undefined', '{source}', '-o', '{binary}' },
extension = 'cpp',
},
}
---@type cp.Config
M.defaults = {
contests = {
default = {
cpp = {
compile = { 'g++', '{source}', '-o', '{binary}', '-std=c++17' },
test = { '{binary}' },
debug = {
'g++',
'{source}',
'-o',
'{binary}',
'-std=c++17',
'-g',
'-fsanitize=address,undefined',
},
},
python = {
test = { 'python3', '{source}' },
},
},
codeforces = default_cpp_config,
atcoder = default_cpp_config,
cses = default_cpp_config,
},
snippets = {},
hooks = {