neovim / tree-sitter-vimdoc

Tree-sitter parser for Vim help files
Apache License 2.0
97 stars 13 forks source link

feat: better structured headings #134

Closed clason closed 3 months ago

clason commented 3 months ago

Problems: Header titles cannot be extracted easily (e.g., for generating a table of contents).

Solution: Expose nodes for separators (separator) and actual heading text (heading).

Closes #133

clason commented 3 months ago

@justinmk that should simplify some header handling in gen_help_html quite a bit (I hope).

clason commented 3 months ago

I'll let this cook on nvim-treesitter a bit, then I'll make a release and update the bundled parser in Neovim.

justinmk commented 2 months ago

Is it expected that this didn't change any of the h1/h2 test cases? https://github.com/neovim/tree-sitter-vimdoc/blob/2249c44ecd3f5cf22da3dcccfb74f816ddb29245/test/corpus/heading1_2.txt#L2