From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#61655: [Tree sitter] [Feature Request] font-lock function calls, definitions, separately Date: Wed, 22 Feb 2023 01:24:48 +0200 Message-ID: References: <8DA1B548-B8D2-4EC1-B9F8-F7654003AC89@gmail.com> <56C0998E-3053-49F3-BAE3-46D6432B16F5@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26830"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Cc: Randy Taylor , Yuan Fu , 61655@debbugs.gnu.org To: Jacob Faibussowitsch Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 22 00:25:13 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1pUc0X-0006nr-5y for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Feb 2023 00:25:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUc0O-0004yE-76; Tue, 21 Feb 2023 18:25:04 -0500 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 1pUc0M-0004xr-JW for bug-gnu-emacs@gnu.org; Tue, 21 Feb 2023 18:25:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pUc0M-0002L7-AT for bug-gnu-emacs@gnu.org; Tue, 21 Feb 2023 18:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pUc0M-0000qV-6P for bug-gnu-emacs@gnu.org; Tue, 21 Feb 2023 18:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Feb 2023 23:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61655 X-GNU-PR-Package: emacs Original-Received: via spool by 61655-submit@debbugs.gnu.org id=B61655.16770219003240 (code B ref 61655); Tue, 21 Feb 2023 23:25:02 +0000 Original-Received: (at 61655) by debbugs.gnu.org; 21 Feb 2023 23:25:00 +0000 Original-Received: from localhost ([127.0.0.1]:57467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pUc0J-0000qC-Ug for submit@debbugs.gnu.org; Tue, 21 Feb 2023 18:25:00 -0500 Original-Received: from mail-wm1-f43.google.com ([209.85.128.43]:55230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pUc0I-0000py-0a for 61655@debbugs.gnu.org; Tue, 21 Feb 2023 18:24:58 -0500 Original-Received: by mail-wm1-f43.google.com with SMTP id p26so4413126wmc.4 for <61655@debbugs.gnu.org>; Tue, 21 Feb 2023 15:24:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=RV37ORC/xt6BE0sr3UcSOKIMNfq2kBLQPdErwM7U/tw=; b=ETeh3rhgvXgY5OFrqsGoKgxF2XhkzrReMZllXBlJ5v10VmI9voLtQW4SAB2DkvzTQA kXbR2agiF2duaYqrxWgaA6aG71qCLfYBsepCDKXvNMb/9eZUWKKJRj30t8BMdptDAXJD WKP71JA8DUAaPWEuJJnkVD4BHvo8veUss0Q+X9xnDmRYJaLadSLmH6oICBWohu6U/0uz aT5q1pmSgpy1nxPh2zBU+BQ8l1Yex0p/VcmxfnQ774hcyNbLz+biZBUld2kKlNRsquk1 ucVxN0wZ53GqiDIjnb4tztHmvHnH0+IRdrgsZS23Tekjz+3GEOJqWl2RbGINOJj/CdrH JQGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RV37ORC/xt6BE0sr3UcSOKIMNfq2kBLQPdErwM7U/tw=; b=eHz/WkIdei6Pkg1H30zbnXTVx7qgbdEI1qBLBm0hfvZptD/9SyJc+xOxLbXsWrfDaM SCwUUp9l3g2sLIhT3pqOg6NIAue4OnN+1lfgTzdM+lVz8kWWNmHb//Xe2jKQJeXFbrhR iaXFJpM2IQ2CvmEQoadUyXnZlU9+aw7m2leEtg64A55BYFeyYg6EPHIJBw4/uo3kZtV2 sX1PyV+YIAnsYJ3OrhxxtrEj8ALtHtMT74vo3y4fxj3fRIrV168rwmbM3m5/drp8LpW1 KA1BGoPx/WQzveiV9GobAUwIHuehHYjLXIgOKBVfku9e96NGTIxb+a6QvOCHdx4oFwIb NFXw== X-Gm-Message-State: AO0yUKXl8pWOh85Y5Pz7D1K/UacVVwDnPvL/36bWYCpHQI8fn+JFi9hP SanLJiCdws0rf2yqJKMomgs= X-Google-Smtp-Source: AK7set/t+8vVKMCQCiO0FxD2A+YqZ6//az4Oar3wQNWv1Zj/w9NEEZ6oL5vf9Qda4svRiST74oO6Mw== X-Received: by 2002:a05:600c:4495:b0:3df:b5ae:5289 with SMTP id e21-20020a05600c449500b003dfb5ae5289mr4514288wmo.8.1677021890957; Tue, 21 Feb 2023 15:24:50 -0800 (PST) Original-Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id t4-20020adff044000000b002c5694aef92sm5430310wro.21.2023.02.21.15.24.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Feb 2023 15:24:50 -0800 (PST) Content-Language: en-US In-Reply-To: <56C0998E-3053-49F3-BAE3-46D6432B16F5@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:256314 Archived-At: On 21/02/2023 17:31, Jacob Faibussowitsch wrote: > but maybe a better default is to leave these faces totally blank and > just purely `:inherit` from `font-lock-function-name-face` I believe so. > +(defface font-lock-function-call-face > + '((t :inherit font-lock-function-name-face :foreground "royalblue1")) > + "Font Lock mode face used to highlight function calls." > + :group 'font-lock-faces) This one I was thinking of as well. > +(defface font-lock-member-function-call-face > + '((t :inherit font-lock-function-name-face :foreground "brightred")) > + "Font Lock mode face used to highlight member function calls." > + :group 'font-lock-faces) What's a "member function"? Is it like a method? If people want this distinction, we can add such face. But I'm curious whether some other editors use different colors for these cases. I'm also wondering what face we're supposed to use for "receiver-less" method calls, such as calls to the methods defined in the same class, in e.g. Ruby and Java. Or C++/C#. They don't use 'this'. I think more importantly, we need a new face for variables. font-lock-variable-ref-face ? I also wonder whether we'll need to separate faces for properties: definitions vs. uses. That one we could use to do early, to keep the names uniform, e.g. we'd have: font-lock-function-name-face font-lock-function-call-face font-lock-variable-name-face font-lock-variable-ref-face font-lock-property-name-face font-lock-property-ref-face