feat: use new filetype structure

This commit is contained in:
Barrett Ruth 2025-09-15 08:23:56 -05:00
parent 0c6ed73dde
commit 259ffcaab1
5 changed files with 22 additions and 2 deletions

6
after/ftplugin/cpin.lua Normal file
View file

@ -0,0 +1,6 @@
vim.opt_local.number = false
vim.opt_local.relativenumber = false
vim.opt_local.statuscolumn = ""
vim.opt_local.signcolumn = "no"
vim.opt_local.wrap = true
vim.opt_local.linebreak = true

7
after/ftplugin/cpout.lua Normal file
View file

@ -0,0 +1,7 @@
vim.opt_local.number = false
vim.opt_local.relativenumber = false
vim.opt_local.statuscolumn = ""
vim.opt_local.signcolumn = "no"
vim.opt_local.wrap = true
vim.opt_local.linebreak = true
vim.opt_local.modifiable = false

6
ftdetect/cp.lua Normal file
View file

@ -0,0 +1,6 @@
vim.filetype.add({
extension = {
cpin = "cpin",
cpout = "cpout",
},
})

View file

@ -27,8 +27,8 @@ function M.create_context(contest, contest_id, problem_id, config)
problem_id = problem_id,
source_file = source_file,
binary_file = ("build/%s.run"):format(base_name),
input_file = ("io/%s.in"):format(base_name),
output_file = ("io/%s.out"):format(base_name),
input_file = ("io/%s.cpin"):format(base_name),
output_file = ("io/%s.cpout"):format(base_name),
expected_file = ("io/%s.expected"):format(base_name),
problem_name = base_name,
}

View file

@ -67,3 +67,4 @@ follows:
- better highlighting
- test case management
- USACO support
- new video with functionality, notify discord members