tree-sitter-grammars / tree-sitter-markdown

Markdown grammar for tree-sitter
MIT License
379 stars 45 forks source link

Table support? #15

Closed ibhagwan closed 1 year ago

ibhagwan commented 2 years ago

First, great job on this and ty for taking ownership on mardown in neovim treesitter :-)

Are tables supported? I'm using treesitter to auto-generate vimdoc for my plugin from the README, I used to do with https://github.com/ikatyang/tree-sitter-markdown which recognized the below as table, this seems not to be the case here.

Are tables supported?

screenshot-1639535526

For reference, here's how it's parsed with the ikatyang: screenshot-1639536128

MDeiml commented 2 years ago

Tables are part of Github flavored markdown which is an extension of the CommonMark spec. I plan to add support for Github flavored markdown including tables, but so far haven't gotten around to it.

ibhagwan commented 2 years ago

Tysm, looking forward to it!

ibhagwan commented 2 years ago

FYI, I updaed my fork of babelfish.nvim to work against your new parser, code is ugly as hell with a couple of hacks to support tables and other minor adjustments (TBH, the original code wasn't all that great to begin with) but it does work, and it does produce a fantastic result for my plugin's vimdoc, in case you wanna check it out:

README vimdoc

MDeiml commented 2 years ago

That looks great. I hope I will get to tables soon so the official repo for babelfish can use this parser. But I think I won't get too much done over Christmas

MDeiml commented 1 year ago

Should work with the newest commit :tada: