emacs-devel
[Top][All Lists]
Advanced

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

Re: A few questions about c++-ts-mode.


From: Yuan Fu
Subject: Re: A few questions about c++-ts-mode.
Date: Wed, 8 May 2024 21:29:34 -0700


> On May 7, 2024, at 6:26 PM, Ergus <spacibba@aol.com> wrote:
> 
> On Tue, May 07, 2024 at 05:19:53PM GMT, Yuan Fu wrote:
>> 
>> 
>>> On May 7, 2024, at 3:59 PM, Ergus <spacibba@aol.com> wrote:
>>> 
>>> Hi
>>> 
>>> There are a few differences between c++-ts-mode and c++-mode that I
>>> don't know if should be reported or they are like that due to some
>>> design choice.
>> 
>> AFAIK, the design goal of c++-ts-mode is to follow c++-mode whenever 
>> possible.
>> 
>>> 
>>> 1. namespaces are not fontified like in c-mode (i.e in std::string the
>>> `std` used to have font-lock-constant-face while `string` used to have
>>> font-lock-type-face). It seems like tresitter identifies properly them
>>> like (namespace_identifier) and (type_identifier)
>> 
>> Then we probably want to fontify namespaces in constant face. Or perhaps add 
>> a namespace-face that inherits from constant face.
>> 
>>> 2. Doc string comments are fontified like normal comments. It looks like
>>> treesiter does not recognize them at all. Is this something we need to
>>> report to treesitter or we need to workaround it in emacs side?
>> 
>> I’m working on that. I think the best way is to workaround it in Emacs.
>> 
>>> 3. macros like `#if defined(something)` fontifies the whole macro with
>>> same font (the `identifier` used to have no colors in c++-mode)
>> 
>> We should update the fontification to leave out the identifier.
>> 
>> Yuan
> 
> Hi Yuan:
> 
> Forgot to mention that
> 
> 4. enum and enum class indentation is not working either
> 
> struct send {
>     |
> };
> 
> class send {
>     |
> };
> 
> enum send {
> |
> };
> 
> enum class send {
>     |
> };
> 

Could you open a bug report for this? I’ve fixed the other since they are 
relatively simple.

Yuan


reply via email to

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