[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] feat: add markdown-ts-mode
From: |
Rahul Martim Juliato |
Subject: |
Re: [PATCH] feat: add markdown-ts-mode |
Date: |
Tue, 15 Apr 2025 22:43:46 -0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Yuan Fu <casouri@gmail.com> writes:
>> On Apr 13, 2025, at 11:36 PM, Juri Linkov <juri@linkov.net> wrote:
>>
>>>>> Just tried your patch Yuan.
>>>>>
>>>>> I've gotta admit it's a breeze to see 'stock Emacs' showing LSP
>>>>> documentation (eglot feeding eldoc)
>>>>> properly colored (I hacked eldoc to load markdown-ts-mode, attached
>>>>> screenshot).
>>>>
>>>> Awesome :)
>>>>
>>>>>> +(defvar markdown-ts-code-block-source-mode-map
>>>>>> + '((javascript . js-ts-mode))
>>>>>> + "An alist of supported code block languages and their major mode.")
>>>>>
>>>>> Should we start adding modes here or is it something we're gonna
>>>>> provide a default and let it up to the user?
>>>>
>>>> If this works well, we’ll definitely add other builtin tree-sitter
>>>> modes. We probably should also add something similar to what org mode
>>>> and markdown-mode have, for language that don’t have a tree-sitter
>>>> mode. But I’m not volunteering for that :)
>>>
>>> Should we merge the aforementioned patch?
>>
>> It would be nice to merge it, so we could continue
>> developing the feature that adds more modes automatically.
>
> Cool, merged to master.
>
> Yuan
Outstanding work!
I'm not sure if any other patches were missing, but as it stands,
everything works like a charm.
I only needed to add the following lines:
```
(add-to-list 'treesit-language-source-alist '(markdown
"https://github.com/tree-sitter-grammars/tree-sitter-markdown" "split_parser"
"tree-sitter-markdown/src"))
(add-to-list 'treesit-language-source-alist '(markdown-inline
"https://github.com/tree-sitter-grammars/tree-sitter-markdown" "split_parser"
"tree-sitter-markdown-inline/src"))
```
Just a heads-up: the actively maintained parsers are currently on the
`split_parser` branch, not `master` or `main`.
Thanks again for the great work!
--
Rahul Martim Juliato
- Re: [PATCH] feat: add markdown-ts-mode, Juri Linkov, 2025/04/11
- Re: [PATCH] feat: add markdown-ts-mode, Yuan Fu, 2025/04/12
- Re: [PATCH] feat: add markdown-ts-mode, Juri Linkov, 2025/04/14
- Re: [PATCH] feat: add markdown-ts-mode, Yuan Fu, 2025/04/15
- Re: [PATCH] feat: add markdown-ts-mode,
Rahul Martim Juliato <=
- Re: [PATCH] feat: add markdown-ts-mode, Juri Linkov, 2025/04/16
- Re: [PATCH] feat: add markdown-ts-mode, Juri Linkov, 2025/04/18
- Re: [PATCH] feat: add markdown-ts-mode, Yuri Khan, 2025/04/18
- Re: [PATCH] feat: add markdown-ts-mode, Ship Mints, 2025/04/18
- Re: [PATCH] feat: add markdown-ts-mode, Yuri Khan, 2025/04/18
- Re: [PATCH] feat: add markdown-ts-mode, Juri Linkov, 2025/04/18
- Re: [PATCH] feat: add markdown-ts-mode, Juri Linkov, 2025/04/16