neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 0412527a407885c01e33068dacd8d6e39fb4dd55
parent 322a6d305d088420b23071c227af07b7c1beb41a
Author: altermo <107814000+altermo@users.noreply.github.com>
Date:   Thu, 22 May 2025 11:21:34 +0200

feat(outline): smaller indentation #34005


Diffstat:
Mruntime/lua/vim/treesitter/_headings.lua | 7+------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/runtime/lua/vim/treesitter/_headings.lua b/runtime/lua/vim/treesitter/_headings.lua @@ -93,12 +93,7 @@ function M.show_toc() end -- add indentation for nicer list formatting for _, heading in pairs(headings) do - if heading.level > 2 then - heading.text = '  ' .. heading.text - end - if heading.level > 4 then - heading.text = '  ' .. heading.text - end + heading.text = (' '):rep(heading.level - 1) .. heading.text end vim.fn.setloclist(0, headings, ' ') vim.fn.setloclist(0, {}, 'a', { title = 'Table of contents' })