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: Sun, 12 May 2024 22:11:41 +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="40643"; 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 Sun May 12 22:13:00 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 1s6FZ6-000AO4-Cw for ged-emacs-devel@m.gmane-mx.org; Sun, 12 May 2024 22:13:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s6FY3-0004EF-MG; Sun, 12 May 2024 16:11:55 -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 1s6FY1-0004Dw-OJ for emacs-devel@gnu.org; Sun, 12 May 2024 16:11:53 -0400 Original-Received: from sonic313-14.consmr.mail.bf2.yahoo.com ([74.6.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s6FY0-0004Ww-3r for emacs-devel@gnu.org; Sun, 12 May 2024 16:11:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1715544705; bh=LFYtDThOM9udFGmTugEctWWHxlv2ZnG10twmQvlWKuI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To; b=M/jEIc0Jt0EzfQTAkc5xKkagFmGVDXzJaffNnSKWDCrw+rtCf5RdQS/JSNGnNqnCzcBOvhMuRVs/aUWNT0Wl4K4Tv6TQXyBcgVcznEIu3jBfBcwpBFZazHvj0Q3lUhM4svGyZQ+kHW0UrR79WANkr/HzPdS5LK3kof76yNAYbvb13OEsBqdx4m1s7UUtvMfwD/w2IDi7ov3Krpk9NJDbw2TCGC++mFLD01x8ovPjCIpn6QDO6UGqar/G5lybfBC1GwnHk+HpDNSdkICVxi628bHl6PVM07z7JTBBAh2POpVb4pKWjHO5r/LQ928hyW6xBdIi6gZfJvG1O1GgZ8YOkw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1715544705; bh=CcbETC8GbrfVZ2fUUScAeI4l9RVhy7Orxof+wYbTkst=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=O1q1yN4rgPcfj1Xj03bx+vgHjdrnay8UzTh1/3ZW283tO4AvMF8we0R5rdZKg2jTwkATViXxmbk5dvsXQLo4U6gzXQPWRuCYNLn8W104nlGM3faPsiTclTr+T2Ac6kuZtzTmkdIXeZVnRClI2LQNyp0x9g4WxGK3L+R4APux7JECq4H2TF8uUQE+Enx0clAxRSj+rLPP+J1CQmVNYYB5x7vYMHk842dq+1fpAiwhgQqsNL6jsM41oCCgy9OGSeDRvKtIlWaIY8uTIBbCZz4gGMLO+bytu7GWQzNgG6/zgC86eEElAFUFkg0jDImwTnPAuZgDuM5Y/+UFV3pJkdc7qQ== X-YMail-OSG: KvbbHkUVM1nGIJOPGBs5_rDT0.XahADOp_z1qLssEQVjke11glfyYB7isc2jBTw WDhvPV77803BGIGMP71GZWYUh0sFkmU2N.4hlMPdp2W7j_DcCbRBaZAhPCEI2AU9jhhoROyxgkzK NEossaHGZiW.gE_E1MANhcWAVpTtsfYwr_PH.1K5uNrLTsEf3xWXsyjhygKzKFBfBv3A9UzRLeVH k1TvYmljiEhPh5vDEV2VS4HXPZALmhhKfYAYHSUJtpZ_4JomGWutoPqi15hPTrFdf15Eb7EjRoCL xIt2NG2AdV7MWaga4L9IX4thrdN6oqk2_xteDY0m6gFqZHQEOtG21CwFUF78bAtEpKMLJ.WpYvfK unkVf_qcmzNFfhy6NV2zzVQlVY9yGCKwrQYHUTFRSPRZpkLisFZpmLtnM_hdr1csGCtjf4j6NIi3 FpbyTleVQ7rFFhapFlCF8_PN_we1TAbdPvXWSQS_XHI4kiJ7hfPz8mVzX7oOTU_etnxCWHcCzLSs sd9JcG3UECWE6EYxBjvSVtjGPtyLWewv.PdrVfZdwrL_OsMKb2S_9pMQa5j.M4vugq13ScWnqW6C Wk2.0maudhsH_.R3uRw.yLGhSueyaUfPxukkUhkNEpanIErgatPvR5JS6mCMbSTRcs._JFuIktnP 3X4fU7UOrqmUhf9fZdnXiCyDHb5PQaYqNEyGh.Z52R2IsKMQ6SuzhrdR5.zEFkj1d6dpTh6Y9S7Q 5zyrx7V87IRoK1y6q3dO3jLi001V1r7_9DNf_yse3JRecfE.mnh4HkYkdJIeMhf4Z_74eaP4JXM. 608lYDa6cYQAISiW2MqxO1ZkTN_sAT3kcEVnHG4LkL X-Sonic-MF: X-Sonic-ID: ff534768-ad15-4d01-bfc6-f1ee0f4f4148 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.bf2.yahoo.com with HTTP; Sun, 12 May 2024 20:11:45 +0000 Original-Received: by hermes--production-ir2-7b99fc9bb6-mz6k9 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 9a9f2bb4966c23e0ee55e0a8aa2de095; Sun, 12 May 2024 20:11:42 +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.133.124; envelope-from=spacibba@aol.com; helo=sonic313-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:319191 Archived-At: On Wed, May 08, 2024 at 09:29:34PM GMT, Yuan Fu wrote: > > >> On May 7, 2024, at 6:26 PM, Ergus wrote: >> >> 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 { >> | >> }; >> > >Could you open a bug report for this? I’ve fixed the other since they are relatively simple. > >Yuan Hi Yuan: Sorry for the delay. I saw your fixes, and it looks like 2 and 3 are fixed; very thanks. But 1 is still there. I will report the indentation issue, but it seems to happen only somethimes, so I'm looking for a pattern to reproduce it. Best, Ergus