[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: |
Tue, 14 Sep 2021 17:50:48 -0700 |
>>
>> I thought you proposed the major mode thing to replace the naming scheme,
>> because we were talking about naming languages and translating language
>> names to library names when you proposed it. So you agree to to the initial
>> plan to translate tree-sitter-<lang> to libtree-sitter-<lang>.so/etc, and to
>> use an override alist for irregular names?
>
> Almost: there's the (minor) problem of obtaining the "<lang>" part by
> the major-mode. I think it would be good to have a utility function
> to do that so that major modes won't need to reinvent the wheel, do
> the research, etc.
That’s where I don’t understand: the major mode is written by major mode
writers, who certainly know the correct “<lang>” name: they need to read the
source of the language definition to use language’s tree-sitter features. You
seem to agree on that because you said that this function can be extended by
major mode writers.
But if you mean an ordinary end user need to know the correct <lang> name, then
it makes more sense. In that case, it is not Emacs’ but major mode writers’
responsibility to teach that function how to map a major mode to one or many
tree-sitter langauge names. Is that what you meant?
Yuan
- Re: Tree-sitter api, (continued)
- 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, 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, 2021/09/14
- Re: Tree-sitter api, Eli Zaretskii, 2021/09/14
- Re: Tree-sitter api,
Yuan Fu <=
- 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
- Re: Tree-sitter api, Eli Zaretskii, 2021/09/15
- Re: Tree-sitter api, Yuan Fu, 2021/09/16
- Re: Tree-sitter api, Eli Zaretskii, 2021/09/17
- Re: Tree-sitter api, Yuan Fu, 2021/09/17
- Re: Tree-sitter api, Eli Zaretskii, 2021/09/17
- Re: Tree-sitter api, Yuan Fu, 2021/09/17