From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#59660: 29.0.50; typescript-ts-mode consistently fontifies method-names incorrectly Date: Tue, 29 Nov 2022 17:39:44 +0100 Message-ID: <003BFED0-4DA2-4DFF-9A7A-986B15B90D34@thornhill.no> References: <87h6yhajap.fsf@thornhill.no> <30978023-D3F6-4A5D-B3D2-AF975807A637@secure.kjonigsen.net> Reply-To: Theodor Thornhill Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7085"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59660@debbugs.gnu.org, Eli Zaretskii , jostein@kjonigsen.net, Yuan Fu To: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 29 17:40:29 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p03em-0001eJ-EV for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Nov 2022 17:40:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p03eP-0000da-KV; Tue, 29 Nov 2022 11:40:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p03eM-0000dI-TQ for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 11:40:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p03eL-0004pA-Te for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 11:40:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p03eL-0004Qt-Ou for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 11:40:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Nov 2022 16:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59660 X-GNU-PR-Package: emacs Original-Received: via spool by 59660-submit@debbugs.gnu.org id=B59660.166973999517029 (code B ref 59660); Tue, 29 Nov 2022 16:40:01 +0000 Original-Received: (at 59660) by debbugs.gnu.org; 29 Nov 2022 16:39:55 +0000 Original-Received: from localhost ([127.0.0.1]:55116 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p03eE-0004Qb-MY for submit@debbugs.gnu.org; Tue, 29 Nov 2022 11:39:55 -0500 Original-Received: from out-176.mta0.migadu.com ([91.218.175.176]:43372) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p03eC-0004QV-6h for 59660@debbugs.gnu.org; Tue, 29 Nov 2022 11:39:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1669739989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gS/ZAfqIsxwxAndLRrU+gi7YE2spXBNiHEcAyyHWqK8=; b=K9zfYlkMYR9db6jM2Lek4mFgSdV0HTP1v0PBecw6jdbYr8BdA9Vn9fv4mVyRZobwrsjUf4 qSaB/G52JMksek8i8xMgEfQraSXT5y6btqiI58x2e6BFSZo1IQvPJkXL+CX1AKADtFQqGe RkXQH3tJtnaoSaspfX5AlKuNpHsSnliihCUSdGbLcyfzJs7MUh0uNLeONrBXWWCiz0BNH9 ryHNGPEJEngkcWMGhRJnVjYEYBvTwZ5apYa/7GUn9i3SDKxve23VbjA8rlYc/4058TcPoA Lzrk5dwyQ+UJ9AVlUadknyojp+qNGQMydbuKQoS36DNExDoJXUZfs+T9pu2QOg== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-Reply-To: <30978023-D3F6-4A5D-B3D2-AF975807A637@secure.kjonigsen.net> X-Migadu-Flow: FLOW_OUT X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:249416 Archived-At: On 29 November 2022 17:35:31 CET, "Jostein Kj=C3=B8nigsen" wrote: > > >> On 29 Nov 2022, at 16:10, Theodor Thornhill wrote= : >>=20 >> =EF=BB=BFJostein Kj=C3=B8nigsen writ= es: >>=20 >>> Cc: 59660@debbugs=2Egnu=2Eorg, theo@thornhill=2Eno >>>>> From: Yuan Fu >>>>> Date: Mon, 28 Nov 2022 15:06:30 -0800 >>>>>=20 >>>>> Maybe you can remove the :override flag for the property_identifier = rule, so it doesn=E2=80=99t shadow the function rule? Would that work bette= r? >>> I plan to test that as quickly as I time permits=2E If we can make bot= h=20 >>> behaviours work, that would obviously be the best=2E >>>> This could be a personal preference, perhaps? It isn't clear to me t= hat >>>> only one of the two is definitely correct=2E So maybe we need a user= option >>>> for which one overrides which? >>>=20 >>> I honestly think this is reasonably clear=2E >>>=20 >>> "Properties" with getters and setters are at this point in time almost= =20 >>> entirely unused in EcmaScript/TypeScript space=2E They are optional an= d=20 >>> have complicated syntax, and don't play well with JSON serialization= =20 >>> (and thus can't be used in REST APIs)=2E >>>=20 >>> You however cannot write a program without defining or invoking=20 >>> methods/functions=2E So not having method-fontification working correc= tly=20 >>> will literally impact **all** TypeScript-users=2E >>=20 >> 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=2E >>=20 >> I tried using this from [0]: >> ``` >> class Greeter { >> greeting: string; >>=20 >> constructor(message: string) { >> this=2Egreeting =3D message; >> } >>=20 >> greet() { >> return "Hello, " + this=2Egreeting; >> } >> } >> ``` >>=20 >> On my end I get no property-face, just function-name-face=2E Both on >> constructor and greet=2E I'm not saying I disagree with you, but what = am >> I missing? >>=20 >> Theo >>=20 >> [0]: https://www=2Etypescriptlang=2Eorg/docs/handbook/classes=2Ehtml >>=20 > >I=E2=80=99ve already submitted patches to fix this which Yuan has pushed= =2E Try going a couple days back in time and try again ;)=20 > >What remains to be decided is what we do with property-highlighting, and = if we can find a way to enable that without colliding with function-names= =2E=20 > >=E2=80=94 >Jostein Kj=C3=B8nigsen >https://jostein=2Ekj=C3=B8nigsen=2Enet Ah, don't mind me, I'll hide in the corner :-)