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

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

bug#74610: 31.0.50; Submitting mhtml-ts-mode, treesitter alternative to


From: Yuan Fu
Subject: bug#74610: 31.0.50; Submitting mhtml-ts-mode, treesitter alternative to mhtml-mode
Date: Tue, 24 Dec 2024 00:37:02 -0800


> On Dec 14, 2024, at 2:37 AM, Vincenzo Pupillo <v.pupillo@gmail.com> wrote:
> 
> In data mercoledì 11 dicembre 2024 05:54:09 Ora standard dell’Europa 
> centrale, 
> Yuan Fu ha scritto:
>>> On Dec 3, 2024, at 6:29 AM, Vincenzo Pupillo <v.pupillo@gmail.com> wrote:
>>> 
>>> In data domenica 1 dicembre 2024 07:01:21 Ora standard dell’Europa
>>> centrale,> 
>>> Yuan Fu ha scritto:
>>>> It's not uncommon to see different indent offset for CSS and
>>>> Javascript, so it's a good idea to have separate control for them.
>>> 
>>> Is the behavior the same as mhtml-mode, or would you like something like
>>> this?> 
>>>   <style>
>>> 
>>>                                 z {
>>> 
>>>                                     color: red;
>>> 
>>>                                 }
>>> 
>>>   </style>
>>>   <script>
>>> 
>>>       function myFunction(p1, p2) {
>>> 
>>>           return p1 * p2;
>>> 
>>>       }
>>> 
>>>   </script>
>>> 
>>> The mhtml-ts-mode-js-css-indent-offset variable controls only the
>>> indentation relative to the <style> and <script> tags.
>> 
>> Ah, I see, it’s the offset from the enclosing tag. In that case it should be
>> fine to use a common variable.
>> 
>> Yuan
> Thank you Yuan.
> 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.
> 
> Vincenzo
> <0001-Add-mhtml-ts-mode.patch>

Btw, mhtml-ts-mode--defun-name seems to contain some debugging code? And also I 
think you should use treesit-node-language.

Yuan




reply via email to

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