ci: format

This commit is contained in:
Barrett Ruth 2026-03-05 13:32:28 -05:00
parent e30ca4eb16
commit 9db185f4d4
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
13 changed files with 2252 additions and 52 deletions

View file

@ -9,10 +9,6 @@ if printf '%s' "$CMD" | grep -qE '\bgh\b.*\s(-R|--repo)\b'; then
exit 2 exit 2
fi fi
if printf '%s' "$CMD" | grep -qE '\bgh\s+issue\s+create\b'; then
echo "Blocked: gh issue create must be run manually or explicitly approved." >&2
exit 2
fi
if printf '%s' "$CMD" | grep -qE '\bgit\s+push\b'; then if printf '%s' "$CMD" | grep -qE '\bgit\s+push\b'; then
BRANCH=$(git branch --show-current 2>/dev/null || true) BRANCH=$(git branch --show-current 2>/dev/null || true)

View file

@ -34,9 +34,11 @@ Create a pull request from the current branch.
3. Present the title and body. Ask for approval. 3. Present the title and body. Ask for approval.
4. After approval, if `scripts/ci.sh` exists, run it: 4. After approval, if `scripts/ci.sh` exists, run it:
``` ```
bash scripts/ci.sh bash scripts/ci.sh
``` ```
If it fails, show the output and stop. Do NOT create the PR. If it fails, show the output and stop. Do NOT create the PR.
5. Run exactly one Bash command: 5. Run exactly one Bash command:

View file

@ -13,9 +13,11 @@ Create a pull request immediately, no approval step.
If the branch is `main` or `master`, tell the user and stop. If the branch is `main` or `master`, tell the user and stop.
2. If `scripts/ci.sh` exists, run it: 2. If `scripts/ci.sh` exists, run it:
``` ```
bash scripts/ci.sh bash scripts/ci.sh
``` ```
If it fails, show the output and stop. If it fails, show the output and stop.
3. Draft the PR (do NOT present for approval — create it immediately): 3. Draft the PR (do NOT present for approval — create it immediately):
@ -35,12 +37,14 @@ Create a pull request immediately, no approval step.
- Use backticks around code identifiers, function names, and file paths. - Use backticks around code identifiers, function names, and file paths.
Run exactly one Bash command: Run exactly one Bash command:
``` ```
gh pr create --title "<title>" --body "$(cat <<'EOF' gh pr create --title "<title>" --body "$(cat <<'EOF'
<body here> <body here>
EOF EOF
)" )"
``` ```
Print the PR URL from the output. Print the PR URL from the output.
Total: 2-3 Bash calls. Do not run any other commands. Total: 2-3 Bash calls. Do not run any other commands.

View file

@ -59,6 +59,7 @@ return {
'snippet_forward', 'snippet_forward',
}, },
}, },
cmdline = { enabled = false },
completion = { completion = {
accept = { accept = {
auto_brackets = { enabled = false }, auto_brackets = { enabled = false },

View file

@ -292,15 +292,22 @@ return {
}, },
{ {
'barrettruth/preview.nvim', 'barrettruth/preview.nvim',
ft = { 'typst', 'tex', 'markdown' }, ft = { 'typst', 'tex', 'markdown', 'plantuml' },
after = function() before = function()
require('preview').setup({ vim.filetype.add({
extension = { puml = 'plantuml', pu = 'plantuml' },
})
vim.g.preview = {
github = true, github = true,
typst = { open = { 'sioyek', '--new-instance' } }, typst = { open = { 'sioyek', '--new-instance' } },
plantuml = true,
mermaid = true,
latex = { latex = {
open = { 'sioyek', '--new-instance' }, open = { 'sioyek', '--new-instance' },
output = function(ctx) output = function(ctx)
return 'build/' .. vim.fn.fnamemodify(ctx.file, ':t:r') .. '.pdf' return ('build/%s.pdf'):format(
vim.fn.fnamemodify(ctx.file, ':t:r')
)
end, end,
args = function(ctx) args = function(ctx)
return { return {
@ -313,8 +320,8 @@ return {
} }
end, end,
}, },
}) }
end, end,
keys = { { '<leader>p', '<cmd>Preview watch<cr>' } }, keys = { { '<leader>p', '<cmd>Preview toggle<cr>' } },
}, },
} }

View file

@ -88,18 +88,6 @@ return {
fzf.setup(opts) fzf.setup(opts)
vim.api.nvim_create_autocmd('FileType', {
pattern = 'fzf',
callback = function()
vim.opt_local.number = false
vim.opt_local.relativenumber = false
end,
group = vim.api.nvim_create_augroup(
'AFzfHighlights',
{ clear = true }
),
})
local ok, fzf_reload = pcall(require, 'config.fzf_reload') local ok, fzf_reload = pcall(require, 'config.fzf_reload')
if ok then if ok then
fzf_reload.setup(opts) fzf_reload.setup(opts)

View file

@ -230,7 +230,6 @@ return {
vim.g.diffs = { vim.g.diffs = {
debug = '/tmp/diffs.log', debug = '/tmp/diffs.log',
fugitive = true, fugitive = true,
neogit = false,
extra_filetypes = { 'diff' }, extra_filetypes = { 'diff' },
hide_prefix = false, hide_prefix = false,
highlights = { highlights = {

View file

@ -20,6 +20,10 @@ return {
}, },
{ {
'echasnovski/mini.ai', 'echasnovski/mini.ai',
keys = {
{ 'a', mode = { 'x', 'o' } },
{ 'i', mode = { 'x', 'o' } },
},
after = function() after = function()
require('mini.ai').setup({ require('mini.ai').setup({
custom_textobjects = { custom_textobjects = {
@ -49,27 +53,6 @@ return {
to = { line = end_line, col = to_col }, to = { line = end_line, col = to_col },
} }
end, end,
l = function(ai_type)
local line_num = vim.fn.line('.')
local line = vim.fn.getline(line_num)
if line == '' then
return {
from = { line = line_num, col = 1 },
to = { line = line_num, col = 1 },
}
end
local start_col, end_col
if ai_type == 'i' then
start_col = line:find('%S') or 1
end_col = line:match('.*%S()') or 1
else
start_col, end_col = 1, line:len()
end
return {
from = { line = line_num, col = start_col },
to = { line = line_num, col = end_col },
}
end,
I = function(ai_type) I = function(ai_type)
local cur_line = vim.fn.line('.') local cur_line = vim.fn.line('.')
local cur_indent = vim.fn.indent(cur_line) local cur_indent = vim.fn.indent(cur_line)
@ -126,10 +109,6 @@ return {
}, },
}) })
end, end,
keys = {
{ 'a', mode = { 'x', 'o' } },
{ 'i', mode = { 'x', 'o' } },
},
}, },
{ {
'monaqa/dial.nvim', 'monaqa/dial.nvim',

View file

@ -76,6 +76,10 @@
"rev": "b7fde3719340946feb75017ef9d75edebdeb0566", "rev": "b7fde3719340946feb75017ef9d75edebdeb0566",
"src": "https://github.com/echasnovski/mini.pairs" "src": "https://github.com/echasnovski/mini.pairs"
}, },
"neogit": {
"rev": "7073f3aafc9030d457838995106784a9d1873b3b",
"src": "https://github.com/NeogitOrg/neogit"
},
"nvim-colorizer.lua": { "nvim-colorizer.lua": {
"rev": "ae0d66307a5b431c7b633806eb27769334ac5f05", "rev": "ae0d66307a5b431c7b633806eb27769334ac5f05",
"src": "https://github.com/catgoose/nvim-colorizer.lua" "src": "https://github.com/catgoose/nvim-colorizer.lua"
@ -104,6 +108,10 @@
"rev": "2802c15182dae2de71f9c82e918d7ba850b90c22", "rev": "2802c15182dae2de71f9c82e918d7ba850b90c22",
"src": "https://github.com/stevearc/overseer.nvim" "src": "https://github.com/stevearc/overseer.nvim"
}, },
"plenary.nvim": {
"rev": "b9fd5226c2f76c951fc8ed5923d85e4de065e509",
"src": "https://github.com/nvim-lua/plenary.nvim"
},
"treesj": { "treesj": {
"rev": "186084dee5e9c8eec40f6e39481c723dd567cb05", "rev": "186084dee5e9c8eec40f6e39481c723dd567cb05",
"src": "https://github.com/Wansmer/treesj" "src": "https://github.com/Wansmer/treesj"

View file

@ -16,6 +16,15 @@ vim.api.nvim_create_autocmd({ 'TermOpen', 'BufWinEnter' }, {
group = aug, group = aug,
}) })
vim.api.nvim_create_autocmd('FileType', {
pattern = { 'fzf', 'TelescopePrompt', 'TelescopeResults' },
callback = function()
vim.opt_local.number = false
vim.opt_local.relativenumber = false
end,
group = aug,
})
vim.api.nvim_create_autocmd('BufReadPost', { vim.api.nvim_create_autocmd('BufReadPost', {
command = 'sil! normal g`"', command = 'sil! normal g`"',
group = aug, group = aug,

File diff suppressed because one or more lines are too long

View file

@ -152,7 +152,18 @@ in
wireplumber = { wireplumber = {
format = "{icon}"; format = "{icon}";
format-muted = "󰖁"; format-muted = "󰖁";
format-icons = [ "󰖁" "󰕿" "󰕿" "󰕿" "󰖀" "󰖀" "󰖀" "󰕾" "󰕾" "󰕾" ]; format-icons = [
"󰖁"
"󰕿"
"󰕿"
"󰕿"
"󰖀"
"󰖀"
"󰖀"
"󰕾"
"󰕾"
"󰕾"
];
node-type = "Audio/Sink"; node-type = "Audio/Sink";
max-volume = 100; max-volume = 100;
scroll-step = 5; scroll-step = 5;
@ -166,7 +177,18 @@ in
"wireplumber#source" = { "wireplumber#source" = {
format = "{icon}"; format = "{icon}";
format-muted = "󰍭"; format-muted = "󰍭";
format-icons = [ "󰍭" "󰍬" "󰍬" "󰍬" "󰍬" "󰍬" "󰍬" "󰍬" "󰍬" "󰍬" ]; format-icons = [
"󰍭"
"󰍬"
"󰍬"
"󰍬"
"󰍬"
"󰍬"
"󰍬"
"󰍬"
"󰍬"
"󰍬"
];
node-type = "Audio/Source"; node-type = "Audio/Source";
max-volume = 100; max-volume = 100;
scroll-step = 5; scroll-step = 5;

View file

@ -170,7 +170,7 @@ in
services.gpg-agent = lib.mkIf hostConfig.isLinux { services.gpg-agent = lib.mkIf hostConfig.isLinux {
enable = true; enable = true;
defaultCacheTtl = 3600; defaultCacheTtl = 7200;
maxCacheTtl = 7200; maxCacheTtl = 7200;
pinentry.package = pkgs.pinentry-curses; pinentry.package = pkgs.pinentry-curses;
}; };