GNU bug report logs -
#74610
31.0.50; Submitting mhtml-ts-mode, treesitter alternative to mhtml-mode
Previous Next
Reported by: Vincenzo Pupillo <v.pupillo <at> gmail.com>
Date: Fri, 29 Nov 2024 21:58:01 UTC
Severity: wishlist
Fixed in version 31.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Ciao Vincenzo,
> In data mercoledì 11 dicembre 2024 05:54:09 Ora standard dell’Europa centrale,
>
> Attached is the revised patch following your previous comments.
> As I already wrote to Dmitry, I am doing some tests to see if html-ts-mode can
> be extended and if there is a way to integrate one multi-language mode into
> another multi-language mode.
I'm testing your patch with mhtml-ts-mode, and everything works nicely.
At the same time I'm adding a new ts-thing named 'sexp-list' in bug#73404.
While 'sexp' defines both lists and atoms, 'sexp-list' defines only lists.
So I added (sexp-list ,(regexp-opt '("element")) 'symbols)
to treesit-thing-settings in html-ts-mode.el.
But then discovered surprisingly that it has no effect on mhtml-ts-mode.
The problem is that treesit-thing-settings should be duplicated
from html-ts-mode to mhtml-ts-mode.
On the one hand, integrating multi-language mode to the exiting mode
html-ts-mode could avoid the need to duplicate treesit-thing-settings
for html.
But on the other hand, integrating mhtml-ts-mode to html-ts-mode
doesn't help to avoid such duplication for other embedded modes.
Because I needed to duplicate treesit-thing-settings for javascript
as well.
So extending html-ts-mode doesn't help here, and maybe even better
to add mhtml-ts-mode to keep the symmetry with existing mhtml-mode
such as used in mode remapping:
(add-to-list 'major-mode-remap-alist '(mhtml-mode .
mhtml-ts-mode))
What could really help is to try to get settings from html-ts-mode
and js-ts-mode to avoid the need to duplicate settings in mhtml-ts-mode.
This bug report was last modified 98 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.