In data mercoledì 18 settembre 2024 06:26:40 CEST, Yuan Fu ha scritto: > > > On Sep 17, 2024, at 1:29 PM, Vincenzo Pupillo wrote: > > > > Ciao, > > php-ts-mode no longer behaves as it used to. There seems to be some problems > > with the calculation of ranges covered by the parsers. In the image I attached > > you can see how the code is being parsed by both the php and javascript > > parsers. The namespace declaration has some elements colored as if they were > > escape sequences. > > The php-ts-mode--get-parser-ranges function returns the following ranges: > > > > ((# nil) (# nil) (# > parser for javascript> nil) (# nil) (# > for phpdoc> ((368 . 426))) (# ((368 . 426)))) > > > > The range for 'jsdoc' is wrong, there should be only the range for 'phpdoc'. > > The attached gif screencast shows the strange behavior in updating the font- > > lock. > > It doesn't happen all the time. I'm trying to isolate the problem. > > > > Any ideas about this? > > The parsers were installed with php-ts-mode-install-parser. > > > > GNU Emacs 30.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo > > version 1.18.0) of 2024-09-17, libtree-sitter-0.22.5-1.fc40.x86_64 > > > > > > Thanks. > > > > Vincenzo > > I couldn’t reproduce this but I have some suspicion. I pushed a change to emacs-30, please try to use that and see if you can still occasionally reproduce. Thanks! And sorry for breaking it :-) Thank you Yuan! It works better, but the range update seems to be delayed or not triggered by e.g. yank or undo, as you can see in the attached screencast. After the yank the ranges are: ((# ((2 . 483))) (# ((1 . 1))) (# ((1 . 1))) (# nil) (# ((377 . 435)))) Vincenzo > > Yuan >