From c487919b66f0f3863569ee5903e019e96fa27d64 Mon Sep 17 00:00:00 2001 From: Xinqi Bao Date: Mon, 5 Oct 2026 20:45:10 +0800 Subject: [PATCH 1/1] style(nvim): render compact indented fold summaries Show the hidden line count on a distinct Folded summary row. Align it one shiftwidth beyond the retained first line so continuation alignment does not affect its position, and leave the remainder blank. --- .config/nvim/init.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 4b7fb6c..32c39ac 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -38,6 +38,9 @@ set foldmethod=expr set foldexpr=0 set foldlevelstart=99 set foldlevel=99 +" Indent summaries one level past the retained first line, not a continuation. +let &foldtext = 'repeat(" ", indent(v:foldstart - 1) + shiftwidth()) . printf("… %d lines …", v:foldend - v:foldstart + 1)' +set fillchars+=fold:\ " Leave the rest of the summary line blank. " Interaction and persistence set mouse=a -- 2.20.1