mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 19:36:40 +00:00
feat(outline): smaller indentation #34005
This commit is contained in:
@@ -93,12 +93,7 @@ function M.show_toc()
|
|||||||
end
|
end
|
||||||
-- add indentation for nicer list formatting
|
-- add indentation for nicer list formatting
|
||||||
for _, heading in pairs(headings) do
|
for _, heading in pairs(headings) do
|
||||||
if heading.level > 2 then
|
heading.text = (' '):rep(heading.level - 1) .. heading.text
|
||||||
heading.text = ' ' .. heading.text
|
|
||||||
end
|
|
||||||
if heading.level > 4 then
|
|
||||||
heading.text = ' ' .. heading.text
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
vim.fn.setloclist(0, headings, ' ')
|
vim.fn.setloclist(0, headings, ' ')
|
||||||
vim.fn.setloclist(0, {}, 'a', { title = 'Table of contents' })
|
vim.fn.setloclist(0, {}, 'a', { title = 'Table of contents' })
|
||||||
|
Reference in New Issue
Block a user