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: Tue, 7 May 2024 17:19:53 -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="26286"; 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 Wed May 08 02:22:46 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 1s4V53-0006f9-5a for ged-emacs-devel@m.gmane-mx.org; Wed, 08 May 2024 02:22:45 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4V3F-0001xw-Px; Tue, 07 May 2024 20:20: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 1s4V2g-0001TH-LM for emacs-devel@gnu.org; Tue, 07 May 2024 20:20:21 -0400 Original-Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s4V2b-000502-Au for emacs-devel@gnu.org; Tue, 07 May 2024 20:20:18 -0400 Original-Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-5d3907ff128so2961557a12.3 for ; Tue, 07 May 2024 17:20:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715127607; x=1715732407; 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=HMKAHPag+RrOjZkq5Z64fuqA31HItugngzFkw8/snTc=; b=T4+bwNlhkSHkpCEjEc6VAll+lEqZwACtULCgpIbEvZ709V3Dcv8bVQ2bSHxasGobJk mu8lI+uyck9cxx+4exb6YoySVt1XKvcOvCwgbG9CrYVV/F2hGT7qfKWWlHy66RDx/TMU EsvdpLJrjCFbfsGrkc+TAaxqp3GeJ1ijeAAtDISp3alD5QECVGtpswAwZunWlaZ0xoMF phFq4e/i35xE+XSUd3cKAcL1TPexQh8jVR9t8Y26EHlKfrCvkbdai8InMkgduDg52GWM I4uyQAt+Tgc6br57GOqzgzjn9Ns64ze4ePq+cDcrLnKdPWt9EHRWAdETyZkzr9fs7Wr0 rBSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715127607; x=1715732407; 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=HMKAHPag+RrOjZkq5Z64fuqA31HItugngzFkw8/snTc=; b=EmDhaHwhyhQ5TOAKIBiYF2S1pIlazcQ5DcHPzFyDSPELr+AobbW+Tp0+HLqnC8FoEr WBFKnjdoVLrBTQOUba93Wx5Mos06dWWxSO0vqtuN+Uv87dwhfAPIW8fWYZyVsYgeKxzA CO/LUur/8acKWW6KbUAkA6WmxLM4ea6yP3LkfGoJH+ekwniwONxwWvW31sl1HxR5WgPX U0ncrVR7JrMnHL5Dpp3NDYVjfQz3sEDmd7luRoB2uPVLMD2jKLvk+7rhKR98OjNKV6Y5 2mR00uKVQBPQL7+8U53/2tW78Z93tntjJkJ3ijh4N44xmgrmCkiZOFtDKREPj7jRj8f7 /sPg== X-Gm-Message-State: AOJu0YwtPMVLbu3AdgI9pSvz9jIKAnrPbVLDOWl0Ix/AWtXKjB376brN 3elikQTx5/yHb3pRJVviGiD3iH76G9Hw5DRLD8PVbo+5k9AUyP4fZfaR1Q== X-Google-Smtp-Source: AGHT+IETnHe+k3vvoi3Flmzwo9kBnRCzq+uc4q0Q+aoL9b2AgaROSLWwCmxS5eKCfxRlf3A1XtEWsw== X-Received: by 2002:a05:6a20:3ca4:b0:1a7:5fbf:3774 with SMTP id adf61e73a8af0-1afc8dc86abmr1878025637.55.1715127607361; Tue, 07 May 2024 17:20:07 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:641:300:4910:d577:bf14:dc7d:56b4]) by smtp.gmail.com with ESMTPSA id p40-20020a056a0026e800b006f44d0df062sm8118546pfw.125.2024.05.07.17.20.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 May 2024 17:20:06 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3731.700.6.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::532; envelope-from=casouri@gmail.com; helo=mail-pg1-x532.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, T_SPF_TEMPERROR=0.01 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:318976 Archived-At: > 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. AFAIK, the design goal of c++-ts-mode is to follow c++-mode whenever = possible. >=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) 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=E2=80=99m 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=