From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Re: A few questions about c++-ts-mode. Date: Wed, 8 May 2024 03:26:24 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13325"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed May 08 03:27:36 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s4W5n-0003JH-11 for ged-emacs-devel@m.gmane-mx.org; Wed, 08 May 2024 03:27:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4W4r-0005QJ-5c; Tue, 07 May 2024 21:26:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4W4q-0005Q3-6f for emacs-devel@gnu.org; Tue, 07 May 2024 21:26:36 -0400 Original-Received: from sonic314-14.consmr.mail.bf2.yahoo.com ([74.6.132.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s4W4n-0000I1-Oz for emacs-devel@gnu.org; Tue, 07 May 2024 21:26:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1715131591; bh=HImTM3IS1vJ5HOpihRCQIgIBPp7w2DTL3Yd2sPsRHJI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To; b=asCyWLlzinm1JVgE6fVFwI+sWzgUniuuxAA85GKrnqRI6wSpLOr+V4LXsPKXdLSQHqJ3iTaHoDeU6+kPoqYsrIQWDd5l12nKbfFhWRvxO/pRnDa02PGDy7F4htFKWURCnKX96YWIl62hiYMBgSN6Vv3X2gq53XSgQz17N9TC/I9BBNgAzklXpB96xdn/vBjb1CzUaQGjNCXxu4SZ3UDRqkxvWss/LcJ87yxT/KlRczjY6EMYV8fEnK3zJooHIsblToUL+vOimhbzVBMkH2SxYZ0RLrmzK9myv+Ydt68TIOtRpYPmiBIgcDn9exaKAGtfFz4mW/2JKs8+9nzPS/D1tw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1715131591; bh=OpcJ3BJ7Sh77J9RT5IafDZ9NmuM29gCtNjCpnbNIZDT=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=PL/vCzoaRl+Frd4p5/LH37TamXCpi8dLmilqxbdLGqHpnw1J3ZFNzp/YBhelmeyectawfTPMxeuMN+khUALHZMi7GoKNLsQ9nndtvKfXuDmEa67cS6pEXFBmIV++nWZk1d6zm78Kb46JS089W4gtYHHbtAT2SmeO7z1OHZayH3fid4Xou6iI5QAzoBOafLisMVP6SnBqFNGfKajZhr+w1qOsE5qd/gtVWDsxkEh25oCcu3fWYeL9tnhCl4ugd/wDwMfXMrvO3flwFEEfoHmDDehHukWt+WGT+Kglp5pzWXAl0uiyqRnoGHzZUJX8DwE9CcYgB2NsN0nF3cKQZKjCRQ== X-YMail-OSG: kfxLNHgVM1mdDytiIX63SyxlpmrqutxviVWw_3o7phDEJy.Xa8nwiN5ZrBkMOE6 A5mds417pGkD9nXnDCzb602GSWO5arGupSmZRHkNr0pXaykZC0E5GXOtzYB2oTIRCAhq4_VOqMPV fpE_FiK.BbkutKXEVANAxo.GrNGeF2VDBEMNAW9cKFz1HMwTdFkGdVT3MJncSIz66eXB35mq6UQp y1pRGEovddeeX5EQ6bLNpNGWLzUqJLDLOUd6oDSgeWBkigFH1GJB6TDE29FNIXmbInYnJ9CxEXhW edo7Kwf9CW7IsQ9ifliuReCJqMAA0MLiBejc.2nlQIuGE6TxjC7YdX8Oqv.gxEVdjiSebJWa_akJ MyAqYiCqTowAPT3UafvCCXnlIX3ebosExf2glks4gNsinTw7JM0gAu2LL_O1BWhVUA23SEgkxoEX t2dDYPdea1fJiTK6AArlCUdHhO5kqU.pTW5zr77R9dOsJ25SK8O.5szsbgUQhJ4A4_fhlR9xDs85 wgViuBVFSRmvTW_9d3p44BNCTV8OlRxZiHbpGc2S_ZOf1bKyPm45iQI4aR3htnskvuFKonWVurqz vsHFgq5fXy9AeQc_5JV0naVvAZav9LM3bs14ZYhyCz_mh6TnxiOjv9YsbAuVFjdOEG2Ngjuot59C fKqLSbCsN9UNgYiTkiaLGTcZAt6VeG8w_gDAJKmRnOk8ZTWcWnhrPdJeSY8S0DjJZ6uRORgoBgN1 i1iDRRRmO6PbVFSrlfQDVpTBSdXmp2e6ava8vBjBq0sQBVf3BFF9rYolaJqoDddg1M__RaKnczyq ytBscB1Odk08HBar0pbjWAYsShyhhIMvsASaL5JE68 X-Sonic-MF: X-Sonic-ID: 1fd67010-2e4b-4cef-a612-66eefbb26572 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.bf2.yahoo.com with HTTP; Wed, 8 May 2024 01:26:31 +0000 Original-Received: by hermes--production-ir2-7b99fc9bb6-9sm2s (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 539c3726f219bd81969c77745542cc1c; Wed, 08 May 2024 01:26:26 +0000 (UTC) Content-Disposition: inline In-Reply-To: X-Mailer: WebService/1.1.22321 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Received-SPF: pass client-ip=74.6.132.124; envelope-from=spacibba@aol.com; helo=sonic314-14.consmr.mail.bf2.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:318979 Archived-At: On Tue, May 07, 2024 at 05:19:53PM GMT, Yuan Fu wrote: > > >> On May 7, 2024, at 3:59 PM, Ergus 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 { | };