unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jostein Kjønigsen" <jostein@secure.kjonigsen.net>
To: 59660@debbugs.gnu.org, Theodor Thornhill <theo@thornhill.no>,
	Yuan Fu <casouri@gmail.com>
Subject: bug#59660: lisp/progmodes/typescript-ts-mode.el: restore method-name fontification
Date: Mon, 28 Nov 2022 17:53:45 +0100	[thread overview]
Message-ID: <fd600c73-9bd8-0f15-eeb9-993e495f80b3@secure.kjonigsen.net> (raw)
In-Reply-To: <00b6627a-860b-f86c-06a9-5166da99a965@secure.kjonigsen.net>


[-- Attachment #1.1: Type: text/plain, Size: 826 bytes --]

And another improvement.

--
Kind regards
*Jostein Kjønigsen*

jostein@kjonigsen.net 🍵 jostein@gmail.com
https://jostein.kjønigsen.no <https://jostein.kjønigsen.no>
On 28.11.2022 17:44, Jostein Kjønigsen wrote:
>
> This additional patch further improves fontification by fontifying 
> function-arguments as variables too.
>
> --
>
> Kind regards
> *Jostein Kjønigsen*
>
> jostein@kjonigsen.net 🍵 jostein@gmail.com
> https://jostein.kjønigsen.no <https://jostein.kjønigsen.no>
> On 28.11.2022 16:09, Jostein Kjønigsen wrote:
>>
>> Attached is a simple patch which addresses this font-lock issue and 
>> makes typescript-ts-mode much better to use.
>>
>> -- 
>> Kind regards
>> *Jostein Kjønigsen*
>>
>> jostein@kjonigsen.net 🍵 jostein@gmail.com
>> https://jostein.kjønigsen.no <https://jostein.kjønigsen.no>

[-- Attachment #1.2: Type: text/html, Size: 2626 bytes --]

[-- Attachment #2: 0006-lisp-progmodes-typescript-ts-mode.el-Fontify-all-typ.patch --]
[-- Type: text/x-patch, Size: 1018 bytes --]

From 7fdcbf5821bf2cd2ddbec1fdd6c1035441fbc0b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jostein=20Kj=C3=B8nigsen?= <jostein@kjonigsen.net>
Date: Mon, 28 Nov 2022 17:51:19 +0100
Subject: [PATCH 6/6] lisp/progmodes/typescript-ts-mode.el: Fontify all types
 in class-declarations

Without this patch, extends-clausing like "Bar" in the following code
will not be highlighted as a type:

````ts
class Foo extends Bar implements Baz {
}
````
---
 lisp/progmodes/typescript-ts-mode.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el
index bb00d873161..43efe87aae1 100644
--- a/lisp/progmodes/typescript-ts-mode.el
+++ b/lisp/progmodes/typescript-ts-mode.el
@@ -158,6 +158,8 @@ typescript-ts-mode--font-lock-settings
 
      (enum_declaration (identifier) @font-lock-type-face)
 
+     (extends_clause value: (identifier) @font-lock-type-face)
+
      (arrow_function
       parameter: (identifier) @font-lock-variable-name-face)
 
-- 
2.37.2


  reply	other threads:[~2022-11-28 16:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-28 15:04 bug#59660: 29.0.50; typescript-ts-mode consistently fontifies method-names incorrectly Jostein Kjønigsen
2022-11-28 15:09 ` bug#59660: lisp/progmodes/typescript-ts-mode.el: restore method-name fontification Jostein Kjønigsen
2022-11-28 16:44   ` Jostein Kjønigsen
2022-11-28 16:53     ` Jostein Kjønigsen [this message]
2022-11-28 17:08       ` Jostein Kjønigsen
2022-11-28 17:27         ` Eli Zaretskii
2022-11-28 18:00           ` Jostein Kjønigsen
2022-11-28 23:02         ` Yuan Fu
2022-11-28 23:06 ` bug#59660: 29.0.50; typescript-ts-mode consistently fontifies method-names incorrectly Yuan Fu
2022-11-29 12:10   ` Eli Zaretskii
2022-11-29 13:58     ` Jostein Kjønigsen
2022-11-29 14:30       ` Eli Zaretskii
2022-11-29 15:10       ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-29 16:35         ` Jostein Kjønigsen
2022-11-29 16:39           ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fd600c73-9bd8-0f15-eeb9-993e495f80b3@secure.kjonigsen.net \
    --to=jostein@secure.kjonigsen.net \
    --cc=59660@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    --cc=jostein@kjonigsen.net \
    --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 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).