From f01a849139394d4a5ee609b33c32a7ffa1457b14 Mon Sep 17 00:00:00 2001 From: nat Date: Sat, 7 Jun 2025 23:35:44 -0700 Subject: [PATCH] improve syntax-hl script --- www/src/scripts/syntax-hl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/src/scripts/syntax-hl b/www/src/scripts/syntax-hl index 4fb0ff4..0066d6b 100755 --- a/www/src/scripts/syntax-hl +++ b/www/src/scripts/syntax-hl @@ -1,7 +1,7 @@ #!/bin/bash tmpfile=$(mktemp) -timeout 0.6s nvim "$1" -c "set noswapfile" -c "%s/^$/ /g" -c "set conceallevel=0" -c "set nonu | set nornu" -c "autocmd LspAttach * execute 'TOhtml | w! ${tmpfile} | qa!'" >/dev/null || nvim "$1" -c "set noswapfile" -c "%s/^$/ /" -c "set conceallevel=0" -c "set nonu | set nornu" -c "TOhtml | w! ${tmpfile} | qa!" >/dev/null +nvim --headless $1 "+set noswapfile | set nonu | set nornu | set conceallevel=0" "+%s/^$/ /g" "+Lazy! load nvim-treesitter | TSEnable highlight | TOhtml | w! ${tmpfile}" '+qa!' 2>/dev/null cat "${tmpfile}" | pup --pre 'style, pre' | sed '/^$/d'