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

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

bug#59617: closed (29.0.50; Add indent styles to all tree-sitter modes)


From: GNU bug Tracking System
Subject: bug#59617: closed (29.0.50; Add indent styles to all tree-sitter modes)
Date: Fri, 02 Dec 2022 05:27:01 +0000

Your message dated Thu, 1 Dec 2022 21:26:40 -0800
with message-id <A5F4392C-5D31-4107-840D-FCB35E9E21F2@gmail.com>
and subject line Re: bug#59617: 29.0.50; Add indent styles to all tree-sitter 
modes
has caused the debbugs.gnu.org bug report #59617,
regarding 29.0.50; Add indent styles to all tree-sitter modes
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
59617: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59617
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 29.0.50; Add indent styles to all tree-sitter modes Date: Sat, 26 Nov 2022 19:59:34 +0100
Hi Yuan and others!

I've added in the ability for users to set their own indentation style
should that be needed.

I just followed what I already did in c-ts-mode and c++-ts-mode, so I
believe this shouldn't be too controversial :-)

Theo

Attachment: 0001-Add-indent-styles-to-all-tree-sitter-modes.patch
Description: Text Data


--- End Message ---
--- Begin Message --- Subject: Re: bug#59617: 29.0.50; Add indent styles to all tree-sitter modes Date: Thu, 1 Dec 2022 21:26:40 -0800
Theodor Thornhill <theo@thornhill.no> writes:

> On 30 November 2022 22:44:39 CET, Yuan Fu <casouri@gmail.com> wrote:
>>
>>Eli Zaretskii <eliz@gnu.org> writes:
>>
>>>> From: Theodor Thornhill <theo@thornhill.no>
>>>> Cc: casouri@gmail.com, 59617@debbugs.gnu.org
>>>> Date: Tue, 29 Nov 2022 16:19:26 +0100
>>>> 
>>>> Theodor Thornhill <theo@thornhill.no> writes:
>>>> 
>>>> > Rebased on emacs-29.
>>>> >
>>>> 
>>>> Is this good to go or should I change something here?
>>>
>>> Good to go from my POV, but I wanted also to hear from Yuan.
>>>
>>> Thanks.
>>
>>Hey sorry, I was busy with some other things. I’ve looked at the patch,
>>it seems adding a hook that sets treesit-simple-indent-rules would have
>>the same effect, no? (Ie, user already can set a custom indent style)
>>Like instead of
>>
>>(defvar my-personal-csharp-mode-indent-rules (...))
>>
>>(setq csharp-ts-mode-indent-style
>>      (lambda () my-personal-csharp-mode-indent-rules))
>>
>>you can just do
>>
>>(defvar my-personal-csharp-mode-indent-rules (...))
>>
>>(add-hook 'csharp-mode-hook
>>          (lambda ()
>>           (setq treesit-simple-indent-rules
>>                 my-personal-csharp-mode-indent-rules)))
>>
>>This way there is no need to define a custom option and a function for
>>each mode. And users can use the same variable
>>treesit-simple-indent-rules, just in different major mode hooks.
>>
>>Yuan
>
> Hmm I think you're right, and I think I agree :)
>
> Theo

Cool :-) I’m closing this then.

Yuan


--- End Message ---

reply via email to

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