all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dmitry@gutov.dev>
To: Noah Peart <noah.v.peart@gmail.com>
Cc: Yuan Fu <casouri@gmail.com>, 68054@debbugs.gnu.org
Subject: bug#68054: [PATCH] Add tree-sitter indent rule for lexical decls in js/typescript
Date: Sun, 9 Jun 2024 05:52:47 +0300	[thread overview]
Message-ID: <9cdcb261-ce4c-47a8-bef9-972070644724@gutov.dev> (raw)
In-Reply-To: <CAPVBTScPO4vCMZ9qkJZEw9o54XB7_QM0kygiU2e0DD_DYYtKNg@mail.gmail.com>

On 02/05/2024 16:38, Noah Peart wrote:
>  > js-ts-mode now has the exact same indentation
> 
> I'm not sure what you meant by this - did you mean js-ts-mode has
> the same indentation for non-multivar declarations as the examples
> shown above? js-ts-mode is still missing indentation rules for multiple 
> decl statements.
> The patch would work for js-ts-mode as well, but I didn't want to copy the
> code between the files.

Yes, I meant that it would be a good idea to keep the modes consistent, 
and to keep those examples indent like they do now.

> So much of the grammar is shared between js-ts-mode and
> typescript-ts-mode, it might be worth combining - neovim uses an ecma 
> grammar
> from which they both inherit.

When you say "uses the ecma grammar", what do you mean exactly? It just 
uses the parent grammar, not either of those two?

As for copying the code, it might be fine - the indentation rules are 
difficult to share, and copying the definition of 
typescript-ts-mode--anchor-decl is probably better than loading the 
whole other package file just for its sake. If more functions could be 
reused, however...





  parent reply	other threads:[~2024-06-09  2:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-27  6:21 bug#68054: [PATCH] Add tree-sitter indent rule for lexical decls in js/typescript Noah Peart
2023-12-30  4:24 ` Yuan Fu
2023-12-30 20:31   ` Yuan Fu
2023-12-31  0:31     ` Dmitry Gutov
2023-12-31  5:35       ` Noah Peart
2023-12-31 13:41         ` Dmitry Gutov
2024-01-01  4:56           ` Yuan Fu
2024-04-17 20:21             ` Noah Peart
2024-04-23  5:07               ` Yuan Fu
2024-04-24  0:15                 ` Dmitry Gutov
2024-04-24  2:36                   ` Noah Peart
2024-04-24 23:15                     ` Dmitry Gutov
2024-04-25 22:48                       ` Noah Peart
2024-04-26  1:06                         ` Dmitry Gutov
2024-05-02 13:26                           ` Noah Peart
2024-05-02 13:38                             ` Noah Peart
2024-05-18  8:29                               ` Eli Zaretskii
2024-06-09  2:52                               ` Dmitry Gutov [this message]
2024-06-09  2:48                             ` Dmitry Gutov
2024-06-09  6:15                               ` Eli Zaretskii

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=9cdcb261-ce4c-47a8-bef9-972070644724@gutov.dev \
    --to=dmitry@gutov.dev \
    --cc=68054@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    --cc=noah.v.peart@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.