commit 1f2883e879761424151ed1e55743c1655b39a0df
parent 6f8ef3bdb437a57a36e13cbdbed17e5b16287f7b
Author: Justin M. Keyes <justinkz@gmail.com>
Date: Thu, 23 Oct 2025 16:34:30 +0200
fix(outline): use 2-space indent instead of 1-space
2 spaces is more visually distinct at very little cost.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/runtime/lua/vim/treesitter/_headings.lua b/runtime/lua/vim/treesitter/_headings.lua
@@ -95,7 +95,7 @@ function M.show_toc(qf_height)
-- add indentation for nicer list formatting
for _, heading in pairs(headings) do
-- Quickfix trims whitespace, so use non-breaking space instead
- heading.text = ('\194\160'):rep(heading.level - 1) .. heading.text
+ heading.text = ('\194\160'):rep((heading.level - 1) * 2) .. heading.text
end
vim.fn.setloclist(0, headings, ' ')
vim.fn.setloclist(0, {}, 'a', { title = 'Table of contents' })