unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#61655: [Tree sitter] [Feature Request] font-lock function calls, definitions, separately
@ 2023-02-20 15:54 Jacob Faibussowitsch
  2023-02-20 17:03 ` Eli Zaretskii
  2023-02-21  8:28 ` Yuan Fu
  0 siblings, 2 replies; 24+ messages in thread
From: Jacob Faibussowitsch @ 2023-02-20 15:54 UTC (permalink / raw)
  To: 61655

[-- Attachment #1: Type: text/plain, Size: 852 bytes --]

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)


[-- Attachment #2.1: Type: text/html, Size: 2101 bytes --]

[-- Attachment #2.2: PastedGraphic-4.png --]
[-- Type: image/png, Size: 19909 bytes --]

[-- Attachment #2.3: PastedGraphic-3.png --]
[-- Type: image/png, Size: 19934 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2023-02-28  2:09 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-20 15:54 bug#61655: [Tree sitter] [Feature Request] font-lock function calls, definitions, separately Jacob Faibussowitsch
2023-02-20 17:03 ` Eli Zaretskii
2023-02-20 20:24   ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-20 20:45     ` Jacob Faibussowitsch
2023-02-21  8:28 ` Yuan Fu
2023-02-21  9:55   ` Dmitry Gutov
2023-02-21 15:31     ` Jacob Faibussowitsch
2023-02-21 23:24       ` Dmitry Gutov
2023-02-22 18:07         ` Jacob Faibussowitsch
2023-02-22 21:39           ` Dmitry Gutov
2023-02-22 20:45       ` Yuan Fu
2023-02-22 21:38         ` Dmitry Gutov
2023-02-23 18:15           ` Eli Zaretskii
2023-02-24  2:31             ` Dmitry Gutov
2023-02-24  7:56               ` Eli Zaretskii
2023-02-24 11:31                 ` Dmitry Gutov
2023-02-24 11:44                   ` Eli Zaretskii
2023-02-24 14:24                   ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-25  1:06               ` Randy Taylor
2023-02-25  2:28                 ` Dmitry Gutov
2023-02-25  3:59                   ` Randy Taylor
2023-02-25 13:05                     ` Dmitry Gutov
2023-02-28  2:09                       ` Dmitry Gutov
2023-02-25  8:05                 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).