From: "Jostein Kjønigsen" <jostein@secure.kjonigsen.net>
To: Yuan Fu <casouri@gmail.com>, Theodor Thornhill <theo@thornhill.no>
Cc: 60376@debbugs.gnu.org, eliz@gnu.org
Subject: bug#60376: 29.0.60; Standardize csharp-ts-mode's font-lock features
Date: Mon, 2 Jan 2023 10:59:39 +0100 [thread overview]
Message-ID: <83118080-231f-cadf-a903-58e609a82751@secure.kjonigsen.net> (raw)
In-Reply-To: <0D5F2396-277A-4017-AE0B-371F591BD141@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 963 bytes --]
On 02.01.2023 01:12, Yuan Fu wrote:
> Fantastic! I applied the patch, thanks!
>
> Yuan
Great! Thanks!
Please note: The previous patch removed a very wide (generic_name
(identifier)) selector, which incorrectly caused generic functions to be
highlighted as a types.
This has lead to having to add in more specific (xxx (generic_name
(identifier)) selectors around the codebase to compensate, and the
previous patch evidently didn't have "all" the ones we need.
Attached is a very small patch which should make support for
highlighting generic types more complete. I won't promise it has 100%
coverage, but with this in place, I can't see any obvious places in code
where I'm missing out.
With this in place, the only thing I'd like to improve now (if any) is
indentation for object-creation/initialization expressions. I've made a
few attempts and can't get those to behave properly.
Is this anything you could take a look at, Theo? :)
--
Jostein
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1168 bytes --]
From 77325442de2b3d2d6d4ffc4223e00c0a956cf256 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jostein=20Kj=C3=B8nigsen?= <jostein@kjonigsen.net>
Date: Sun, 1 Jan 2023 20:46:02 +0100
Subject: [PATCH] Further generic-related improvements.
---
lisp/progmodes/csharp-mode.el | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el
index 473e8f49fd3..79afd7f91dc 100644
--- a/lisp/progmodes/csharp-mode.el
+++ b/lisp/progmodes/csharp-mode.el
@@ -773,9 +773,12 @@ csharp-ts-mode--font-lock-settings
(array_type
(identifier) @font-lock-type-face)
(cast_expression (identifier) @font-lock-type-face)
+ (cast_expression (generic_name (identifier) @font-lock-type-face))
["operator"] @font-lock-type-face
(type_parameter_constraints_clause
target: (identifier) @font-lock-type-face)
+ (type_constraint type: (identifier) @font-lock-type-face)
+ (type_constraint type: (generic_name (identifier) @font-lock-type-face))
(type_of_expression (identifier) @font-lock-type-face)
(object_creation_expression
type: (identifier) @font-lock-type-face)
--
2.37.2
next prev parent reply other threads:[~2023-01-02 9:59 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-28 8:25 bug#60376: 29.0.60; Standardize csharp-ts-mode's font-lock features Yuan Fu
2022-12-29 19:55 ` Yuan Fu
2022-12-29 21:03 ` Jostein Kjønigsen
2022-12-30 8:21 ` Eli Zaretskii
2022-12-29 22:16 ` Yuan Fu
2022-12-30 8:19 ` Eli Zaretskii
2022-12-30 13:35 ` Jostein Kjønigsen
2022-12-30 14:15 ` Eli Zaretskii
2022-12-30 14:39 ` Jostein Kjønigsen
2022-12-30 15:39 ` Eli Zaretskii
2022-12-30 17:35 ` Jostein Kjønigsen
2022-12-30 19:30 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-31 9:53 ` Jostein Kjønigsen
2022-12-31 10:32 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-30 14:40 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-30 15:04 ` Jostein Kjønigsen
2022-12-31 22:21 ` Yuan Fu
2023-01-01 16:29 ` Jostein Kjønigsen
2023-01-01 17:24 ` Jostein Kjønigsen
2023-01-01 18:14 ` Jostein Kjønigsen
2023-01-01 18:41 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-02 0:12 ` Yuan Fu
2023-01-02 9:59 ` Jostein Kjønigsen [this message]
2023-01-03 5:43 ` Jostein Kjønigsen
2023-01-05 21:27 ` Jostein Kjønigsen
2023-01-03 6:51 ` Yuan Fu
2023-01-03 7:20 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-06 5:55 ` Yuan Fu
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=83118080-231f-cadf-a903-58e609a82751@secure.kjonigsen.net \
--to=jostein@secure.kjonigsen.net \
--cc=60376@debbugs.gnu.org \
--cc=casouri@gmail.com \
--cc=eliz@gnu.org \
--cc=theo@thornhill.no \
/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.