emacs-devel
[Top][All Lists]
Advanced

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

Re: Tree-sitter doc question


From: Felix
Subject: Re: Tree-sitter doc question
Date: Thu, 08 Dec 2022 16:08:39 +0100
User-agent: mu4e 1.9.3; emacs 30.0.50

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Thu, 8 Dec 2022 15:52:46 +0100
>> From: Ergus <spacibba@aol.com>
>>
>> >The modes that rely on it know how to check that.
>> >
>> Yes, but as I was trying to use it in C I didn't know if it was actually
>> working or not as I don't see any change.
>
> You need to turn on c-ts-mode manually, it is an opt-in feature (and
> will probably remain like that in Emacs 29).
>
>> >The colors are our faces, so the answer is "neither".
>> >
>> I know; maybe I needed to be more specific. As I don't know if it is
>> working I don't know who was setting the syntax info.
>
> The faces are set based on the results of parsing by the tree-sitter
> library.

What would be the recommended way to enable the *-ts-mode for a certain
language?
Adding a hook to a major-mode to enable another major-mode seems a bit
backward. This is what i did first, now i added entries to auto-mode-alist.
It would be nice to have an customization variable that controls which
major-modes are replaced.
For more user feedback, it would be beneficial to have an easy way to
enable and try tree-sitter.



reply via email to

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