GNU bug report logs - #73978
31.0.50; Text syntax applied on too many things in tsx-ts-mode

Previous Next

Package: emacs;

Reported by: Yuan Fu <casouri <at> gmail.com>

Date: Thu, 24 Oct 2024 04:08:02 UTC

Severity: normal

Found in version 31.0.50

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #73 received at 73978 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Yuan Fu <casouri <at> gmail.com>
Cc: Dmitry Gutov <dmitry <at> gutov.dev>, Theodor Thornhill <theo <at> thornhill.no>,
 73978 <at> debbugs.gnu.org
Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in
 tsx-ts-mode
Date: Sun, 05 Jan 2025 09:57:59 +0200
>> But I guess tsx-ts--syntax-propertize-captures could only apply syntax to
>> specific characters inside the text - it would search for parens,
>> brackets, (something else?), and put the "punctuation" syntax on them -
>> that should play nicer with sexp/word/symbol navigation.
>> 
>> A bit more code, but OTOH we would drop the (eq ne (1+ ns)) distinction.
>
> That’s a good idea! I implemented this. Now forward-sexp should work as normal.

Thanks, this is better.  Now forward-sexp correctly moves to the end of the string.

However, it still moves inside the tag, e.g. with point in

ReactDOM.render(
<div>
<h1>Hello, Welcome to React and TypeScript-!-</h1>
</div>,
  document.getElementById("root")
);

C-M-f moves point to

ReactDOM.render(
<div>
<h1>Hello, Welcome to React and TypeScript</h1-!->
</div>,
  document.getElementById("root")
);

But maybe this is a different problem.




This bug report was last modified 133 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.