I finally decided to give #Emacs tree-sitter modes a try, starting with markdown...
Omar Antolín @oantolin@mathstodon.xyz
I finally decided to give #Emacs tree-sitter modes a try, starting with markdown-ts-mode. The initial impression was good: it told me I needed the markdown grammar and offered to download and compile it, which went well, then the same thing for the markdown-inline grammar, which also worked. Then I tried opening a test file¹ and Emacs kept hanging! I guessed the problem was that it didn't know how to tell me it needed a bunch of other grammars too. The test file has a list of needed grammars at the top, in fact, so I just switched a buffer successively to python-ts-mode, html-ts-mode, yaml-ts-mode, etc., and for each one I got asked if I wanted to install the grammar, each time I said yes. Afterwards, opening the markdown test file worked fine!
So the problem was easy to guess and work around, but still, not the nicest experience. Now I'll feel slightly nervous when opening a markdown file I didn't write myself. 😅 Of course, this problem can only happen finitely many more times (and not *that* many either).
¹ https://github.com/LionyxML/markdown-ts-mode-lab/blob/main/test.md