From: Yuan Fu <casouri@gmail.com>
To: "Jostein Kjønigsen" <jostein@secure.kjonigsen.net>
Cc: fgallina@gnu.org, 59977@debbugs.gnu.org, jostein@kjonigsen.net
Subject: bug#59977: 29.0.60; python-ts-mode does not fontify function-invocations using font-lock-function-name [PATCH]
Date: Mon, 12 Dec 2022 14:54:32 -0800 [thread overview]
Message-ID: <DC696D93-F62C-4A1F-BD80-F5E99CE8EC5F@gmail.com> (raw)
In-Reply-To: <c7c51fd1-9dc4-0665-5f05-050f9c8a4627@secure.kjonigsen.net>
Jostein Kjønigsen <jostein@secure.kjonigsen.net> writes:
> Open a python buffer, activate python-ts-mode and write a simple statement invoking a function. Example code:
>
> def somefunc(val)
> return val
>
> result = someFunc("123");
>
> Observe how function-name is fontified as function name in the function definition, but not when invoked.
>
> This is inconsistent with how other major-modes fontify function
> names.
Ah, yes. That’s because the "definition" feature, which is by enabled by
default, only highlights definition and ignores invocation. OTOH, the
"function" feature highlights every instance of a function identifier,
but it isn’t enabled by default. Other tree-sitter major modes doesn’t
have "definition" and enable "function" by default, I think.
I’m planning to standardize the features in each major mode according to
the list I showed you earlier. It’d be great if you can have a look at
that list and see if you have any opinions, before we decide on the
final form of it and start to standardize those features in major modes.
(Of course, each language is different, the standard feature list is
just a base upon which major modes will extend/modify.)
Yuan
next prev parent reply other threads:[~2022-12-12 22:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-11 20:27 bug#59977: 29.0.60; python-ts-mode does not fontify function-invocations using font-lock-function-name [PATCH] Jostein Kjønigsen
2022-12-12 22:54 ` Yuan Fu [this message]
2022-12-15 14:07 ` Jostein Kjønigsen
2022-12-16 1:35 ` Yuan Fu
2023-01-02 9:04 ` Jostein Kjønigsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DC696D93-F62C-4A1F-BD80-F5E99CE8EC5F@gmail.com \
--to=casouri@gmail.com \
--cc=59977@debbugs.gnu.org \
--cc=fgallina@gnu.org \
--cc=jostein@kjonigsen.net \
--cc=jostein@secure.kjonigsen.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.