From: Yuan Fu <casouri@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Theodor Thornhill <theo@thornhill.no>, 59617@debbugs.gnu.org
Subject: bug#59617: 29.0.50; Add indent styles to all tree-sitter modes
Date: Wed, 30 Nov 2022 13:44:39 -0800 [thread overview]
Message-ID: <AEF0EBB1-37F5-43D3-85CF-B1F1BEEE50A3@gmail.com> (raw)
In-Reply-To: <87r0xp4k4p.fsf@thornhill.no>
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
next prev parent reply other threads:[~2022-11-30 21:44 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 [this message]
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
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=AEF0EBB1-37F5-43D3-85CF-B1F1BEEE50A3@gmail.com \
--to=casouri@gmail.com \
--cc=59617@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.