GNU bug report logs - #61655
[Tree sitter] [Feature Request] font-lock function calls, definitions, separately

Previous Next

Package: emacs;

Reported by: Jacob Faibussowitsch <jacob.fai <at> gmail.com>

Date: Mon, 20 Feb 2023 15:55:01 UTC

Severity: wishlist

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#61655: closed ([Tree sitter] [Feature Request] font-lock
 function calls, definitions, separately)
Date: Tue, 28 Feb 2023 02:11:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 28 Feb 2023 04:09:55 +0200
with message-id <3c515b2c-37c3-c6b3-c03e-f8fb20dba9cb <at> yandex.ru>
and subject line Re: bug#61655: [Tree sitter] [Feature Request] font-lock function calls, definitions, separately
has caused the debbugs.gnu.org bug report #61655,
regarding [Tree sitter] [Feature Request] font-lock function calls, definitions, separately
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
61655: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61655
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Jacob Faibussowitsch <jacob.fai <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [Tree sitter] [Feature Request] font-lock function calls,
 definitions, separately
Date: Mon, 20 Feb 2023 10:54:42 -0500
[Message part 3 (text/plain, inline)]
Hello,

Is it possible to have the builtin tree sitter give differentiate font-locking for function calls and function definitions?

The 3rd party tree-sitter package (https://github.com/emacs-tree-sitter/elisp-tree-sitter) has this feature and it is quite nice. In fact it goes further, allowing you to additionally distinguish between builtin calls, macro calls, method calls, etc. (see https://github.com/emacs-tree-sitter/elisp-tree-sitter/blob/master/lisp/tree-sitter-hl.el).

As far as I could see, the builtin mode only provides `font-lock-function-name-face`. I have set treesit-font-lock-level to 4. 

Examples below are for C/C++ mode, but this would apply to any number of languages.

Desired (i.e. what 3rd party package produces):



Current:



Best regards,

Jacob Faibussowitsch
(Jacob Fai - booss - oh - vitch)

[Message part 4 (text/html, inline)]
[PastedGraphic-4.png (image/png, inline)]
[PastedGraphic-3.png (image/png, inline)]
[Message part 7 (message/rfc822, inline)]
From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Randy Taylor <dev <at> rjt.dev>
Cc: casouri <at> gmail.com, jacob.fai <at> gmail.com,
 Theodor Thornhill <theo <at> thornhill.no>, 61655-done <at> debbugs.gnu.org,
 Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#61655: [Tree sitter] [Feature Request] font-lock function
 calls, definitions, separately
Date: Tue, 28 Feb 2023 04:09:55 +0200
On 25/02/2023 15:05, Dmitry Gutov wrote:
> I suppose we should go with -use-, unless more alternatives are suggested.

And done. Thanks all!


This bug report was last modified 2 years and 88 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.