From: Randy Taylor <dev@rjt.dev>
To: Yuan Fu <casouri@gmail.com>
Cc: 62109@debbugs.gnu.org
Subject: bug#62109: 29.0.60; rust-ts-mode missing indentation for patterns
Date: Sat, 11 Mar 2023 02:04:59 +0000 [thread overview]
Message-ID: <bFMpXX3CSN6cc0g_d14I3IGsp0uT13NghHx02O1PhvptjCvDFv708bZ5CR_Dsl2xmFI82ZAFVyeLygxbsbMEXMrfrDGBdGHNzZHnIKE7Eyg=@rjt.dev> (raw)
In-Reply-To: <EiWkQPwRiSaBAwp2dZwXnqFlCxQ3fiMNJ1OhOF0uf9J_vyc5BrU9FF4N1FRZqWYtqu1lXN0UHdc1TOIvtJO5HHzmkJk-JLpJ7ZMNkiAxFm8=@rjt.dev>
[-- Attachment #1: Type: text/plain, Size: 689 bytes --]
On Friday, March 10th, 2023 at 21:03, Randy Taylor <dev@rjt.dev> wrote:
>
> On Friday, March 10th, 2023 at 17:32, Yuan Fu casouri@gmail.com wrote:
>
> > X-Debbugs-CC: dev@rjt.dev
> >
> > Try this snippet:
> >
> > fn main() {
> > match &cli.command {
> > Commands::Run {
> > a,
> > b,
> > c,
> > d,
> > } => todo!(),
> >
> > }
> > }
> >
> > The a, b, c, d don’t have corresponding indentation rules. I can add
> > some myself, but I’m not sure where to add and what’s the best rule to
> > add.
> >
> > Yuan
>
>
> Thanks for the report, I've attached a patch fixing it.
Sorry, forgot to include the bug #. Same patch with the bug # this time!
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-missing-indentation-rule-for-rust-ts-mode-Bug-62.patch --]
[-- Type: text/x-patch; name=0001-Add-missing-indentation-rule-for-rust-ts-mode-Bug-62.patch, Size: 1112 bytes --]
From 16522d2626d3ec5d9de70d3a90ecd137258ed98f Mon Sep 17 00:00:00 2001
From: Randy Taylor <dev@rjt.dev>
Date: Fri, 10 Mar 2023 20:56:04 -0500
Subject: [PATCH] Add missing indentation rule for rust-ts-mode (Bug#62109)
* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--indent-rules): Add
missing rule.
---
lisp/progmodes/rust-ts-mode.el | 1 +
1 file changed, 1 insertion(+)
diff --git a/lisp/progmodes/rust-ts-mode.el b/lisp/progmodes/rust-ts-mode.el
index 696c2633231..a07a6649dc2 100644
--- a/lisp/progmodes/rust-ts-mode.el
+++ b/lisp/progmodes/rust-ts-mode.el
@@ -91,6 +91,7 @@ rust-ts-mode--indent-rules
((parent-is "let_declaration") parent-bol rust-ts-mode-indent-offset)
((parent-is "macro_definition") parent-bol rust-ts-mode-indent-offset)
((parent-is "parameters") parent-bol rust-ts-mode-indent-offset)
+ ((parent-is "struct_pattern") parent-bol rust-ts-mode-indent-offset)
((parent-is "token_tree") parent-bol rust-ts-mode-indent-offset)
((parent-is "use_list") parent-bol rust-ts-mode-indent-offset)))
"Tree-sitter indent rules for `rust-ts-mode'.")
--
2.39.2
next prev parent reply other threads:[~2023-03-11 2:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-10 22:32 bug#62109: 29.0.60; rust-ts-mode missing indentation for patterns Yuan Fu
2023-03-11 2:03 ` Randy Taylor
2023-03-11 2:04 ` Randy Taylor [this message]
2023-03-11 23:53 ` 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='bFMpXX3CSN6cc0g_d14I3IGsp0uT13NghHx02O1PhvptjCvDFv708bZ5CR_Dsl2xmFI82ZAFVyeLygxbsbMEXMrfrDGBdGHNzZHnIKE7Eyg=@rjt.dev' \
--to=dev@rjt.dev \
--cc=62109@debbugs.gnu.org \
--cc=casouri@gmail.com \
/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.