ci: format

This commit is contained in:
Barrett Ruth 2026-03-03 00:42:25 -05:00
parent 310bd074e7
commit 25b821a4fd
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
8 changed files with 374 additions and 331 deletions

View file

@ -226,12 +226,16 @@ return {
enabled_languages = { 'cpp', 'python' },
default_language = 'cpp',
overrides = {
cpp = { template = '~/.config/nix/config/cp/template_single.cc' },
cpp = {
template = '~/.config/nix/config/cp/template_single.cc',
},
},
},
cses = {
overrides = {
cpp = { template = '~/.config/nix/config/cp/template_single.cc' },
cpp = {
template = '~/.config/nix/config/cp/template_single.cc',
},
},
},
},
@ -242,24 +246,39 @@ return {
hooks = {
setup = {
contest = function(state)
local dir = vim.fn.fnamemodify(state.get_source_file(state.get_language()), ':h')
local dir = vim.fn.fnamemodify(
state.get_source_file(state.get_language()),
':h'
)
local path = dir .. '/.clang-format'
if vim.fn.filereadable(path) == 0 then
vim.fn.system({ 'cp', vim.fn.expand('~/.config/nix/config/cp/.clang-format'), path })
vim.fn.system({
'cp',
vim.fn.expand(
'~/.config/nix/config/cp/.clang-format'
),
path,
})
end
end,
code = function(_)
vim.opt_local.foldlevel = 0
vim.opt_local.foldlevel = 0
vim.opt_local.foldmethod = 'marker'
vim.opt_local.foldmarker = '{{{,}}}'
vim.opt_local.foldtext = ''
vim.opt_local.foldtext = ''
vim.diagnostic.enable(false)
end,
},
on = {
enter = function(_) vim.opt_local.winbar = '' end,
run = function(_) require('config.lsp').format() end,
debug = function(_) require('config.lsp').format() end,
enter = function(_)
vim.opt_local.winbar = ''
end,
run = function(_)
require('config.lsp').format()
end,
debug = function(_)
require('config.lsp').format()
end,
},
},
filename = function(_, _, problem_id)
@ -267,6 +286,9 @@ return {
end,
}
end,
after = function()
vim.cmd.packadd('fzf-lua')
end,
},
{
'barrettruth/preview.nvim',

View file

@ -10,7 +10,8 @@ end
vim.api.nvim_create_autocmd('VimEnter', {
once = true,
callback = function()
vim.o.statusline = ' %{v:lua._fugitive_stl()}' .. vim.o.statusline:sub(2)
vim.o.statusline = ' %{v:lua._fugitive_stl()}'
.. vim.o.statusline:sub(2)
end,
})