all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 59680@debbugs.gnu.org
Cc: casouri@gmail.com, eliz@gnu.org, jostein@kjonigsen.net
Subject: bug#59680: 29.0.60; [PATCH] Add class_body rule to typescript-ts-mode
Date: Tue, 29 Nov 2022 16:15:15 +0100	[thread overview]
Message-ID: <87edtlaj24.fsf@thornhill.no> (raw)

[-- Attachment #1: Type: text/plain, Size: 102 bytes --]


Hi all!

A tiny patch to add indentation for class_body.

Feel free to apply, Yuan or Eli :-)

Theo


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-class_body-indentation-for-typescript.patch --]
[-- Type: text/x-diff, Size: 1138 bytes --]

From 4a33766aa96c955cd0dcd7b6af9dfa0be0a928e9 Mon Sep 17 00:00:00 2001
From: Theodor Thornhill <theo@thornhill.no>
Date: Tue, 29 Nov 2022 16:12:18 +0100
Subject: [PATCH] Add class_body indentation for typescript

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--indent-rules): New indent rule.
---
 lisp/progmodes/typescript-ts-mode.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el
index 6c926a4e3e..0559ef8f25 100644
--- a/lisp/progmodes/typescript-ts-mode.el
+++ b/lisp/progmodes/typescript-ts-mode.el
@@ -79,6 +79,7 @@ typescript-ts-mode--indent-rules
      ((parent-is "object") parent-bol typescript-ts-mode-indent-offset)
      ((parent-is "object_type") parent-bol typescript-ts-mode-indent-offset)
      ((parent-is "enum_body") parent-bol typescript-ts-mode-indent-offset)
+     ((parent-is "class_body") parent-bol typescript-ts-mode-indent-offset)
      ((parent-is "arrow_function") parent-bol typescript-ts-mode-indent-offset)
      ((parent-is "parenthesized_expression") parent-bol typescript-ts-mode-indent-offset)
 
-- 
2.34.1


             reply	other threads:[~2022-11-29 15:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29 15:15 Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-12-09 21:31 ` bug#59680: 29.0.60; [PATCH] Add class_body rule to typescript-ts-mode 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=87edtlaj24.fsf@thornhill.no \
    --to=bug-gnu-emacs@gnu.org \
    --cc=59680@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    --cc=eliz@gnu.org \
    --cc=jostein@kjonigsen.net \
    --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.