From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: A few questions about c++-ts-mode. Date: Wed, 8 May 2024 21:29:34 -0700 Message-ID: References: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6.1.1\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19674"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 09 06:30:39 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 1s4vQT-00051M-Hz for ged-emacs-devel@m.gmane-mx.org; Thu, 09 May 2024 06:30:37 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4vPo-0006el-Kv; Thu, 09 May 2024 00:29:56 -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 1s4vPj-0006eL-UC for emacs-devel@gnu.org; Thu, 09 May 2024 00:29:52 -0400 Original-Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s4vPg-0002Qz-DV for emacs-devel@gnu.org; Thu, 09 May 2024 00:29:51 -0400 Original-Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1ed96772f92so3564845ad.0 for ; Wed, 08 May 2024 21:29:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715228986; x=1715833786; darn=gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ZrbHXkqcmDbWqns4kowt2Z+WbqOvMQ44d0ScjW8RWzM=; b=H7wQfz+lPsI/1sHxtRGxXGzXcsWFEbqvH9vBMCQlcgovuikHYUemzl1V3EQ6kHcBHO uNXJP0A3agQbTdNnCpBhW1Nr7MDC6TJqEEAyK3ABzNzOTtHsjjeciHnb/+hD/Mp4nwFa 4het7L5HMO3gvCqSNX6MZj6aiA83CZKqRzcAaXSCT5sqYk3mjMaIhh4NiOMd4Kb7Lbbl Hh+oKjveDKe7alV7vSfBY4UKcmNh2vBYbrzSui/ooWTYJ/cROeoZ9x8vPKQOo+14etf/ PqrWxqMvWAA/T8jX8CIzKsJZ/NV+xZwLpld2suwvMtvmRnyC/85MEZmLKU64Sl7ZL9S9 grOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715228986; x=1715833786; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZrbHXkqcmDbWqns4kowt2Z+WbqOvMQ44d0ScjW8RWzM=; b=cvcOeClL/9EUko/qP3IGYa7U3kZQX1JXSx4N0WJFO3FxbuT5x6h9Y/ojRlwl9Bkaaf hxCjCXJTx2Jl/+QOC6rmce6bncFpjqEBjfhoWw70l5Heyts3DVupSVAaHM/GVSQCpA46 H0CSLcbO/mJMo6HAgjjk/7YoiK4Lk4TyZADQQCDWv9SjcV5sdVUtrOPIJsMIzgn1HX13 EFDF8t3ni8WNLZpGDNeDe1YLGo0guzgXFWBiY8DwgetQBTgUvcQb1uDcPzK6pfHsA2IB z4qamGo20w95qhT34YF0YEy9NgR1BpSmY+4CribgtG5jGOQBMfTa+qBTmD3Br9E0qkPK L/sA== X-Gm-Message-State: AOJu0Yx9vI4QPAiG1eQbf71gHjZJq9UGeYvgMTYtysRJz3/L3RmtM6qR jyVJfc1VjgZwvkY/gF2FXc2kpki/4TcWVxD78wLI2lZw1M8qufNb X-Google-Smtp-Source: AGHT+IF5VBrdiEPahmkibCPdMUwPvRkcs1VHe457Wg+VPudG34RLWDXH6NWRB5Sre4/xY0jZtWEhbw== X-Received: by 2002:a17:902:9886:b0:1eb:7603:9ce8 with SMTP id d9443c01a7336-1eeb01831c7mr41940095ad.22.1715228986429; Wed, 08 May 2024 21:29:46 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:641:300:4910:38af:f15:5ce3:fab2]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ef0bf31677sm3986755ad.178.2024.05.08.21.29.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 May 2024 21:29:45 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3731.700.6.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=casouri@gmail.com; helo=mail-pl1-x635.google.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, 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:319035 Archived-At: > On May 7, 2024, at 6:26 PM, Ergus wrote: >=20 > On Tue, May 07, 2024 at 05:19:53PM GMT, Yuan Fu wrote: >>=20 >>=20 >>> On May 7, 2024, at 3:59 PM, Ergus wrote: >>>=20 >>> Hi >>>=20 >>> 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. >>=20 >> AFAIK, the design goal of c++-ts-mode is to follow c++-mode whenever = possible. >>=20 >>>=20 >>> 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) >>=20 >> Then we probably want to fontify namespaces in constant face. Or = perhaps add a namespace-face that inherits from constant face. >>=20 >>> 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? >>=20 >> I=E2=80=99m working on that. I think the best way is to workaround it = in Emacs. >>=20 >>> 3. macros like `#if defined(something)` fontifies the whole macro = with >>> same font (the `identifier` used to have no colors in c++-mode) >>=20 >> We should update the fontification to leave out the identifier. >>=20 >> Yuan >=20 > Hi Yuan: >=20 > Forgot to mention that >=20 > 4. enum and enum class indentation is not working either >=20 > struct send { > | > }; >=20 > class send { > | > }; >=20 > enum send { > | > }; >=20 > enum class send { > | > }; >=20 Could you open a bug report for this? I=E2=80=99ve fixed the other since = they are relatively simple. Yuan=