emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] feat: add markdown-ts-mode


From: Juri Linkov
Subject: Re: [PATCH] feat: add markdown-ts-mode
Date: Mon, 14 Apr 2025 09:42:14 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)

>> +(defvar c-ts-mode--language-source-alist
>> +  '((c
>> +     "https://github.com/tree-sitter/tree-sitter-c";
>> +     "v0.23.4-1-g3aa2995")
>> +    (cpp
>> +     "https://github.com/tree-sitter/tree-sitter-cpp";
>> +     "v0.23.4-1-gf41b4f6")
>> +    (doxygen
>> +     "https://github.com/tree-sitter-grammars/tree-sitter-doxygen";
>> +     "v1.1.0"))
>> +  "Tree-sitter language grammars used by `c-ts-mode'.")
>> +
>> +(setq treesit-language-source-alist
>> +      (append treesit-language-source-alist
>> +              c-ts-mode--language-source-alist))
>
> What is the reason that you declare the
> `c-ts-mode--language-source-alist' variable?  Why not just insert it
> directly into `treesit-language-source-alist'?

Only to follow the existing practice of
mhtml-ts-mode--language-source-alist and
php-ts-mode--language-source-alist.
But they used this only for 'mhtml-ts-mode-install-parsers'
that is not needed anymore.  So we can just
insert it directly into `treesit-language-source-alist'.

For the remaining problem could you suggest which form is more
preferable for the git-describe output like "v0.23.4-1-g3aa2995":

  (treesit--install-language-grammar-1 out-dir 'c
   "https://github.com/tree-sitter/tree-sitter-c";
   "v0.23.4" nil nil nil "3aa2995")

or

  (treesit--install-language-grammar-1 out-dir 'c
   "https://github.com/tree-sitter/tree-sitter-c";
   "v0.23.4" nil nil nil nil)

or

  (treesit--install-language-grammar-1 out-dir 'c
   "https://github.com/tree-sitter/tree-sitter-c";
   nil nil nil nil "3aa2995")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]