[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tree-sitter api
From: |
Yuan Fu |
Subject: |
Re: Tree-sitter api |
Date: |
Mon, 13 Sep 2021 11:29:01 -0700 |
> On Sep 13, 2021, at 11:07 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Mon, 13 Sep 2021 11:01:47 -0700
>> Cc: Tuấn-Anh Nguyễn <ubolonton@gmail.com>,
>> Theodor Thornhill <theo@thornhill.no>,
>> Clément Pit-Claudel <cpitclaudel@gmail.com>,
>> Emacs developers <emacs-devel@gnu.org>,
>> Stefan Monnier <monnier@iro.umontreal.ca>,
>> stephen_leake@stephe-leake.org
>>
>>> It makes little sense to me to request each major mode to figure this
>>> out. It should IMO be a service provided by the TS integration into
>>> Emacs.
>>
>> This is IMO the easiest and least confusing way for major-mode authors. But
>> before we continue, what is the way you envisioned? I’m not sure what
>> exactly is the service you want Emacs to provide.
>
> What I had in mind is a function that give the major-mode symbol will
> return the name of the corresponding TS language module (or a list of
> modules, if there's more than one).
My problem with such a function is that Emacs can’t possibly cover all the
major-modes and tree-sitter languages. What if there is a new language, and
someone wrote a tree-sitter language definition for it, and then want to write
an Emacs major mode using tree-sitter features?
Yuan
- Re: Tree-sitter api, (continued)
- Re: Tree-sitter api, Eli Zaretskii, 2021/09/11
- Re: Tree-sitter api, Yuan Fu, 2021/09/11
- Re: Tree-sitter api, Eli Zaretskii, 2021/09/11
- Re: Tree-sitter api, Eli Zaretskii, 2021/09/11
- Re: Tree-sitter api, Yuan Fu, 2021/09/11
- Re: Tree-sitter api, Eli Zaretskii, 2021/09/12
- Re: Tree-sitter api, Yuan Fu, 2021/09/13
- Re: Tree-sitter api, Eli Zaretskii, 2021/09/13
- Re: Tree-sitter api, Yuan Fu, 2021/09/13
- Re: Tree-sitter api, Eli Zaretskii, 2021/09/13
- Re: Tree-sitter api,
Yuan Fu <=
- Re: Tree-sitter api, Eli Zaretskii, 2021/09/13
- Re: Tree-sitter api, Yuan Fu, 2021/09/13
- Re: Tree-sitter api, Eli Zaretskii, 2021/09/13
- Re: Tree-sitter api, Yuan Fu, 2021/09/14
- Re: Tree-sitter api, Eli Zaretskii, 2021/09/14
- Re: Tree-sitter api, Yuan Fu, 2021/09/14
- Re: Tree-sitter api, Eli Zaretskii, 2021/09/15
- Re: Tree-sitter api, Yuan Fu, 2021/09/15
- Re: Tree-sitter api, Eli Zaretskii, 2021/09/15
- Re: Tree-sitter api, Stefan Monnier, 2021/09/15