From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: "Jostein Kjønigsen" <jostein@secure.kjonigsen.net>,
"Eli Zaretskii" <eliz@gnu.org>, "Yuan Fu" <casouri@gmail.com>
Cc: 59660@debbugs.gnu.org, jostein@kjonigsen.net
Subject: bug#59660: 29.0.50; typescript-ts-mode consistently fontifies method-names incorrectly
Date: Tue, 29 Nov 2022 16:10:06 +0100 [thread overview]
Message-ID: <87h6yhajap.fsf@thornhill.no> (raw)
In-Reply-To: <5c6866bb-c353-58ee-39e4-9d861965e943@secure.kjonigsen.net>
Jostein Kjønigsen <jostein@secure.kjonigsen.net> writes:
> Cc: 59660@debbugs.gnu.org, theo@thornhill.no
>>> From: Yuan Fu <casouri@gmail.com>
>>> Date: Mon, 28 Nov 2022 15:06:30 -0800
>>>
>>> Maybe you can remove the :override flag for the property_identifier rule, so it doesn’t shadow the function rule? Would that work better?
> I plan to test that as quickly as I time permits. If we can make both
> behaviours work, that would obviously be the best.
>> This could be a personal preference, perhaps? It isn't clear to me that
>> only one of the two is definitely correct. So maybe we need a user option
>> for which one overrides which?
>
> I honestly think this is reasonably clear.
>
> "Properties" with getters and setters are at this point in time almost
> entirely unused in EcmaScript/TypeScript space. They are optional and
> have complicated syntax, and don't play well with JSON serialization
> (and thus can't be used in REST APIs).
>
> You however cannot write a program without defining or invoking
> methods/functions. So not having method-fontification working correctly
> will literally impact **all** TypeScript-users.
Could you give me a code example, Jostein? I'm just interested in a
repro, because I can't reproduce it with the typescript-ts-mode.
I tried using this from [0]:
```
class Greeter {
greeting: string;
constructor(message: string) {
this.greeting = message;
}
greet() {
return "Hello, " + this.greeting;
}
}
```
On my end I get no property-face, just function-name-face. Both on
constructor and greet. I'm not saying I disagree with you, but what am
I missing?
Theo
[0]: https://www.typescriptlang.org/docs/handbook/classes.html
next prev parent reply other threads:[~2022-11-29 15:10 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
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 [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h6yhajap.fsf@thornhill.no \
--to=bug-gnu-emacs@gnu.org \
--cc=59660@debbugs.gnu.org \
--cc=casouri@gmail.com \
--cc=eliz@gnu.org \
--cc=jostein@kjonigsen.net \
--cc=jostein@secure.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 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.