3 ms·
“You probably heard of this new markdown-ts-mode and decided to check it out.” Uhm, no, I haven’t. Why should I care if the Markdown mode uses Treesitter or n
by cpach 1mo ago
“You probably heard of this new markdown-ts-mode and decided to check it out.”
Uhm, no, I haven’t.
Why should I care if the Markdown mode uses Treesitter or not…? Does it affect the performance or UX somehow?
- mplanchard 1mo agoOne option would be to read the section of the linked article talking about features: https://rahuljuliato.com/posts/markdown-ts-mode-emacs-31#a-quick-look-at-markdown-ts-mode-features https://rahuljuliato.com/posts/markdown-ts-mode-emacs-31#a-q...
- jlokier 1mo agoIt's still reasonable to ask what's different about markdown-ts-mode compared with markdown-mode. I read that article, and I didn't notice anything that stands out as different from markdown-mode (the non Tree Sitter version). Regular markdown-mode also highlights everything, hides markup if you like, cycles section visibility if you like, fills paragraphs in bullets, etc. With poly-markdown-mode it also does language-specific syntax highlighting in code blocks, and even language-specific structural editing, automatic indentation, etc. With math-preview it displays TeX/LaTeX math as rendered formulae.
- skydhash 1mo agoI think the appeal of tree sitter is to have a single query api for traversal of the nodes in the abstract tree of the language. So it become easier to adjust or adapt the parser.
- mplanchard 1mo agoMostly same as with any treesitter mode: it’s easier to build structurally-aware features, and it automatically supports any minor mode that’s enabled by treesitter (examples from my own config include structural movement, folding, selection, indentation guides, etc.). So, rather than every language having to reinvent the wheel, and every user having to install six different language-specific packages to get feature parity, more stuff just works. You mention eg poly mode, which has always been extremely finicky for me. Syntax highlighting in treesitter modes is both more capable and more consistent.
- cpach 1mo agoThat sounds like an improvement. Thank you for explaining!