From: Yuan Fu <casouri@gmail.com>
To: Theodor Thornhill <theo@thornhill.no>
Cc: 59617-done@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: bug#59617: 29.0.50; Add indent styles to all tree-sitter modes
Date: Thu, 1 Dec 2022 21:26:40 -0800 [thread overview]
Message-ID: <A5F4392C-5D31-4107-840D-FCB35E9E21F2@gmail.com> (raw)
In-Reply-To: <87r0xp4k4p.fsf@thornhill.no>
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
prev parent reply other threads:[~2022-12-02 5:26 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-26 18:59 bug#59617: 29.0.50; Add indent styles to all tree-sitter modes Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <handler.59617.B.166948920014495.ack@debbugs.gnu.org>
2022-11-27 11:50 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-27 23:38 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-28 6:59 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-28 12:26 ` Eli Zaretskii
2022-11-28 12:38 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-28 13:25 ` Eli Zaretskii
2022-11-28 13:41 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-28 13:44 ` Eli Zaretskii
2022-11-28 15:00 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-28 15:05 ` Eli Zaretskii
2022-11-28 15:08 ` Eli Zaretskii
2022-11-28 16:30 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-29 6:11 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-29 15:19 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-29 15:44 ` Eli Zaretskii
2022-11-30 21:44 ` Yuan Fu
2022-11-30 22:24 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-02 5:26 ` Yuan Fu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=A5F4392C-5D31-4107-840D-FCB35E9E21F2@gmail.com \
--to=casouri@gmail.com \
--cc=59617-done@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=theo@thornhill.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.