bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mod


From: Dmitry Gutov
Subject: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode
Date: Thu, 26 Dec 2024 07:37:17 +0200
User-agent: Mozilla Thunderbird

On 25/12/2024 10:33, Yuan Fu wrote:
The patch just demonstrated one of possible ways to solve the problem.

And I still don’t understand the intention of your patch.  Maybe
I missed something.  Am I correct that you want to apply string syntax
on the tags, eg, <div>, <button>, </button>, </div>?
I don't need to apply string syntax on the tags.  I just found
that currently C-M-f navigation was broken.  Maybe there are
other ways to fix it?
Then let’s look for other ways to solve the problem you demonstrated. Dmitry, 
would there be any negative effects if we apply the whitespace syntax on all 
the text (rather than string syntax)? Ah, I guess skip-syntax wouldn’t work 
right. Is there another way to tell syntax-ppss to skip a chunk of text when 
scanning?

Maybe not.

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]