unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dmitry@gutov.dev>
To: rrudakov@fastmail.com
Cc: 66646-done@debbugs.gnu.org
Subject: bug#66646: 29.1.90; No tsx syntax highlithting in typescript-ts-mode
Date: Sat, 21 Oct 2023 15:08:38 +0300	[thread overview]
Message-ID: <71c3a80a-6a33-7eeb-5eaa-a2ee8599ef55@gutov.dev> (raw)
In-Reply-To: <m28r7w4cc1.fsf@Romans-MBP.home>

Version: 29.2

On 21/10/2023 11:18, Roman Rudakov wrote:
> 
> Dmitry Gutov <dmitry@gutov.dev> writes:
> 
>> On 20/10/2023 19:26, Roman Rudakov wrote:
>>> Dmitry Gutov <dmitry@gutov.dev> writes:
>>>
>>>> On 20/10/2023 13:13, Roman Rudakov wrote:
>>>>> - 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'")
>>>>
>>>> Could you somehow describe which version of the typescript grammar
>>>> you're using? Did you just pull and build it today from github's
>>>> master? Or is it from a distro, etc.
>>> I used steps from admin/notes/tree-sitter/starter-guide from emacs
>>> git repository. The grammars were built today, but I noticed this
>>> problem a few weeks ago.
>>> The grammars were built using the following command:
>>> git clone git@github.com:casouri/tree-sitter-module.git cd
>>> tree-sitter-module ./batch.sh
>>> and then copied from dist/ directory to ~/.emacs.d/tree-sitter/
>>
>> Thank you, I've installed the latest version and saw this too.
>>
>> And chance you could you test this patch?
>>
>> diff --git a/lisp/progmodes/typescript-ts-mode.el
>> b/lisp/progmodes/typescript-ts-mode.el
>> index 01a021c64fc..b976145dbf3 100644
>> --- a/lisp/progmodes/typescript-ts-mode.el
>> +++ b/lisp/progmodes/typescript-ts-mode.el
>> @@ -166,7 +166,7 @@ tsx-ts-mode--font-lock-compatibility-bb1f97b
>>    ;; but then raises an error if the wrong node type is used. So it 
>>    is
>>    ;; important to check with the new node type (member_expression)
>>    (condition-case nil
>> -      (progn (treesit-query-capture language '(jsx_opening_element
>>        (member_expression) @capture))
>> +      (progn (treesit-query-capture language '((jsx_opening_element
>> (member_expression) @capture)))
>>           '((jsx_opening_element
>>          [(member_expression (identifier)) (identifier)]
>>          @typescript-ts-jsx-tag-face)
> 
> Hello, Dmitry! Yes, I can confirm that after applying your patch the 
> problem is fixed for me. Thank you.

Thanks for checking, pushed to emacs-29.





  reply	other threads:[~2023-10-21 12:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-20 10:13 bug#66646: 29.1.90; No tsx syntax highlithting in typescript-ts-mode Roman Rudakov
2023-10-20 10:33 ` Eli Zaretskii
2023-10-20 13:17   ` Roman Rudakov
2023-10-20 13:32     ` Eli Zaretskii
2023-10-20 15:56       ` Roman Rudakov
2023-10-20 16:00 ` Dmitry Gutov
2023-10-20 16:26   ` Roman Rudakov
2023-10-20 22:53     ` Dmitry Gutov
2023-10-21  8:18       ` Roman Rudakov
2023-10-21 12:08         ` Dmitry Gutov [this message]
2023-10-21 18:20           ` 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

  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=71c3a80a-6a33-7eeb-5eaa-a2ee8599ef55@gutov.dev \
    --to=dmitry@gutov.dev \
    --cc=66646-done@debbugs.gnu.org \
    --cc=rrudakov@fastmail.com \
    /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).