unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Marius Kjeldahl <marius.kjeldahl@gmail.com>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: 74386@debbugs.gnu.org
Subject: bug#74386: Tree-sitter javascript indentation
Date: Sun, 17 Nov 2024 20:21:37 +0100	[thread overview]
Message-ID: <CAHdMyCLdyVqiqDbnd=b51FHp8T3nDc++4QVq4ALbQCWUQuMHbQ@mail.gmail.com> (raw)
In-Reply-To: <ddf93180-0296-4a97-8666-4cf91159997e@gutov.dev>

Great, thanks.

Here are two examples (fingers crossed):

function a(b,
  c) {
....d();

and

if (clause1
  && clause2) {
....callSomeFunc();

Notice in both cases the four dots "...." representing spaces used for
indentation. I would like only two dots (two spaces) for those
specific examples.

Thanks,

Marius K.

On Sun, 17 Nov 2024 at 20:18, Dmitry Gutov <dmitry@gutov.dev> wrote:
>
> Hi!
>
> On 17/11/2024 01:26, Marius Kjeldahl wrote:
> > When using js-ts-mode, after multiline function parameter lists, or
> > multiline if clauses, Emacs typically adds two spaces indentation
> > after where the previous line ends. But because that line is already
> > indented, the effective indentation becomes four spaces (compare to
> > where the function definition or if clause starts). I would like this
> > to be only two. This is most likely a preference, but still.
> >
> > I haven't been able to figure out if it is possible to customize Emacs
> > to do what I want. Or even learn where I can dig in and figure out
> > what I need to change to accomplish it. I've tried a reddit group and
> > also posted an issue on the tree-sitter github repo. But was told the
> > correct place to report it is as an Emacs bug.
> >
> > So any pointers or suggestion?
>
> It would help if you also give specific examples of code where incorrect
> indentation occurs. People can guess, but they might not guess all the
> cases you want.
>
> Just paste the code inside email, assuming monospaced text.
>
> (And to clarify how this mailing list works: please use "reply all", so
> that the bug# email address is retained in To:).





  reply	other threads:[~2024-11-17 19:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-16 23:26 bug#74386: Tree-sitter javascript indentation Marius Kjeldahl
2024-11-17 19:18 ` Dmitry Gutov
2024-11-17 19:21   ` Marius Kjeldahl [this message]
2024-11-17 22:12     ` Dmitry Gutov
2024-11-17 22:21       ` Marius Kjeldahl
2024-11-17 22:41         ` Dmitry Gutov
2024-11-18  8:35       ` Marius Kjeldahl
2024-11-18 15:29         ` Dmitry Gutov

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHdMyCLdyVqiqDbnd=b51FHp8T3nDc++4QVq4ALbQCWUQuMHbQ@mail.gmail.com' \
    --to=marius.kjeldahl@gmail.com \
    --cc=74386@debbugs.gnu.org \
    --cc=dmitry@gutov.dev \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).