feat(help): use treesitter for table of contents

Problem: Creating the table of contents for `gO` is complicated.

Solution: Use treesitter instead.
This commit is contained in:
Christian Clason
2024-06-08 10:49:15 +02:00
parent 105a9e3dcf
commit 6592873f77
4 changed files with 44 additions and 74 deletions

View File

@@ -26,3 +26,7 @@ elseif vim.endswith(bufname, '/doc/lsp.txt') then
{ start = [[\*lsp-semantic-highlight\*]], stop = '^======', match = '^@[%w%p]+' },
})
end
vim.keymap.set('n', 'gO', function()
require('vim.vimhelp').show_toc()
end, { buffer = 0, silent = true })