neovim / tree-sitter-vimdoc

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

Whitespace handling for table line items #117

Closed muhmud closed 11 months ago

muhmud commented 11 months ago

Currently, a table like this:

image

gets rendered like this:

image

Data on the whitespace does not seem to appear in the parsed tree-sitter document in this case, though I do see it for codeblock. Is there something that can be done to handle this better?

clason commented 11 months ago

Nope, that's something that can't be done with a syntax tree, given the loose vimdoc format.

clason commented 11 months ago

(In 90% of cases, the issue is with the docs themselves; if they are meant to be a table, they should be marked up as such.)