initial commit

This commit is contained in:
Barrett Ruth 2025-09-11 23:52:32 -05:00
commit dcb7debff6
29 changed files with 1276 additions and 0 deletions

13
after/ftdetect/cp.lua Normal file
View file

@ -0,0 +1,13 @@
vim.api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, {
pattern = '*/io/*.in',
callback = function()
vim.bo.filetype = 'cpinput'
end,
})
vim.api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, {
pattern = '*/io/*.out',
callback = function()
vim.bo.filetype = 'cpoutput'
end,
})

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

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

17
after/syntax/cpoutput.vim Normal file
View file

@ -0,0 +1,17 @@
if exists("b:current_syntax")
finish
endif
syntax match cpOutputCode /^\[code\]: .*/
syntax match cpOutputTime /^\[time\]: .*/
syntax match cpOutputDebug /^\[debug\]: .*/
syntax match cpOutputMatchesTrue /^\[matches\]: true$/
syntax match cpOutputMatchesFalse /^\[matches\]: false$/
highlight default link cpOutputCode DiagnosticInfo
highlight default link cpOutputTime Comment
highlight default link cpOutputDebug Comment
highlight default link cpOutputMatchesTrue DiffAdd
highlight default link cpOutputMatchesFalse DiffDelete
let b:current_syntax = "cpoutput"