fix(outline): use 2-space indent instead of 1-space

2 spaces is more visually distinct at very little cost.
This commit is contained in:
Justin M. Keyes
2025-10-23 16:34:30 +02:00
parent 6f8ef3bdb4
commit 1f2883e879

View File

@@ -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' })