From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Roman Rudakov Newsgroups: gmane.emacs.bugs Subject: bug#66646: 29.1.90; No tsx syntax highlithting in typescript-ts-mode Date: Fri, 20 Oct 2023 15:17:01 +0200 Message-ID: References: <83r0lpshva.fsf@gnu.org> Reply-To: rrudakov@fastmail.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6827"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.10.7; emacs 29.1.90 Cc: 66646@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 20 15:22:55 2023 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 1qtpSn-0001Vr-6q for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Oct 2023 15:22:55 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtpSc-0006iN-Cc; Fri, 20 Oct 2023 09:22:42 -0400 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 1qtpSV-0006hF-Kq for bug-gnu-emacs@gnu.org; Fri, 20 Oct 2023 09:22:36 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtpSV-0003bN-25 for bug-gnu-emacs@gnu.org; Fri, 20 Oct 2023 09:22:35 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qtpSw-0004ez-7R for bug-gnu-emacs@gnu.org; Fri, 20 Oct 2023 09:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Roman Rudakov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Oct 2023 13:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66646 X-GNU-PR-Package: emacs Original-Received: via spool by 66646-submit@debbugs.gnu.org id=B66646.169780816317885 (code B ref 66646); Fri, 20 Oct 2023 13:23:02 +0000 Original-Received: (at 66646) by debbugs.gnu.org; 20 Oct 2023 13:22:43 +0000 Original-Received: from localhost ([127.0.0.1]:38956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtpSc-0004eO-C7 for submit@debbugs.gnu.org; Fri, 20 Oct 2023 09:22:43 -0400 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:41035) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtpSR-0004dz-Qt for 66646@debbugs.gnu.org; Fri, 20 Oct 2023 09:22:41 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 750E45C0A76; Fri, 20 Oct 2023 09:21:59 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 20 Oct 2023 09:21:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to :reply-to:sender:subject:subject:to:to; s=fm3; t=1697808119; x= 1697894519; bh=allMAaZB2E/i60Bp0uxhL5Bs/SG8i+Blg+/Q7GHxmEA=; b=d Nef6NgTWxzqgokE0P3FeeOpbN3ranlegqwA5HyXfK9Q7GkCsPpaNnbObOp8aXs3D 99uqhWHGJpdpR14SFr1S3FM/5xA3jJAT8HkgrOXnxCBIGRowdJAfM0fLzPPTTLQt ++PQFiwhURO9wNMxPgN7YzW0ueJpA1z/PMA28w9Stoc3Ms2uu7Y0xs+pAln64fUM zMiY3/H/E7csOAtP23KZPEMYVzyXxXZeKpiiUqkllDoiRfRgMcopfYiDz+NnlhN/ OTmRXZ8cgFxHxXvH+DzdVhoR69SG9hDDYdx+8LHBE6f25+XWskaIuUGy/WBVzDeo 2+vpKma2qHHx5KHkUNlLQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1697808119; x=1697894519; bh=a llMAaZB2E/i60Bp0uxhL5Bs/SG8i+Blg+/Q7GHxmEA=; b=CfgtVC/eNu14Bw8CV qd1PbCT7ZQxFNB/5pkCmdbEI3q+yvVSmmeb7H+gxF1th2bUgsboI5lsY974ElzyX 3/9NjkFGDy9jYpGuUfuA4oN5FeGn115A/E/b1H2rSujHeO2JUF+QK8CU185PIIbd R01euUwCj9lfMb82yoYLgNncbZVrtlyvVDVOyty7ZUeK0WYdsLn14VN504aECK+k 5wF5ej1F2o7XYt9I5ruQDU18pw8Ixj6mZLNge0JZsobh/rSYvIxXAAsoOJYgu5PQ 2tp5jcT3xE8pitu3UDHNLkRR49eCGEseG4ZILvNjyHR3RA6r+v6LG3XFfED9xSgg qoaCw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrjeekgdeivdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpehffgfhvfevufffrhgjkfggtgesmhdtreertdertdenucfhrhhomheptfhomhgr nhcutfhuuggrkhhovhcuoehrrhhuuggrkhhovhesfhgrshhtmhgrihhlrdgtohhmqeenuc ggtffrrghtthgvrhhnpefgueetudelgffgjeehueehueeuudethffhieekhefhkefgudel hfduledthffgtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehrrhhuuggrkhhovhesfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: i1c714620:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 20 Oct 2023 09:21:57 -0400 (EDT) In-reply-to: <83r0lpshva.fsf@gnu.org> 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:272793 Archived-At: --=-=-= Content-Type: text/plain; format=flowed Eli Zaretskii writes: >> From: Roman Rudakov >> Date: Fri, 20 Oct 2023 12:13:15 +0200 >> >> >> - install the latest typescript/tsx grammar. >> - open a .tsx source file >> >> I'm getting the following error in the *Messages* buffer: >> >> Error during redisplay: (jit-lock-function 1) signaled >> (treesit-query-error "Structure error at" 22 "(jsx_opening_element >> [(nested_identifier (identifier)) (identifier)] >> @typescript-ts-jsx-tag-face) (jsx_closing_element >> [(nested_identifier >> (identifier)) (identifier)] @typescript-ts-jsx-tag-face) >> (jsx_self_closing_element [(nested_identifier (identifier)) >> (identifier)] @typescript-ts-jsx-tag-face) (jsx_attribute >> (property_identifier) @typescript-ts-jsx-attribute-face)" "Debug >> the >> query with `treesit-query-validate'") > > I cannot reproduce this. I used a random *.tsx file on my system, > and > didn't get any error. So please post the file you used, and also > describe step by step what to do to reproduce the problem starting > from "emacs -Q". > > Thanks. After some debugging I figured out that it can be only reproduced when `eglot-ensure` is added to `typescript-ts-mode-hook` and `tsx-ts-mode-hook`. So, steps to reproduce are the following: - Optionally install `typescript-language-server` (if it's not installed there will be eglot error, but the original issue will still be reproducible). - `emacs -Q` - evaluate the following: (require 'typescript-ts-mode) (require 'eglot) (add-hook 'typescript-ts-mode-hook #'eglot-ensure) (add-hook 'tsx-ts-mode-hook #'eglot-ensure) - open attached tsx file. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=Button.tsx Content-Description: Random typescript source file import { JSX } from "preact"; import { IS_BROWSER } from "$fresh/runtime.ts"; export function Button(props: JSX.HTMLAttributes) { return (