unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Konstantin Kharlamov <hi-angel@yandex.ru>
To: Theodor Thornhill <theo@thornhill.no>,
	emacs-devel@gnu.org, Po Lu <luangruo@yahoo.com>,
	Eli Zaretskii <eliz@gnu.org>
Cc: Holger Schurig <holgerschurig@gmail.com>
Subject: Re: tree-sitter: conceptional problem solvable at Emacs' level?
Date: Sat, 11 Feb 2023 13:25:04 +0300	[thread overview]
Message-ID: <c373722a7a383f9f4f6b73fd49e83091dac9b0b5.camel@yandex.ru> (raw)
In-Reply-To: <1c17038bf458a7c05e1f260ee0ffb5d342f80bba.camel@yandex.ru>

On Sat, 2023-02-11 at 12:37 +0300, Konstantin Kharlamov wrote:
> Given this code:
> 
>     int main() {
>         foobar(
>              arg1,
>              arg2
>              );
>     }
> 
> Suppose you put a caret after `arg2` text and press Enter to make a new line
> (all tests are done with `emacs -Q`). The behaviour:
> 
> * c-mode, c++-mode, Sublime Text (both with `.c` and `.cpp` file), VS Code
> (both
> with `.c` and `.cpp` file): creates a new line indented same way as previous
> one.
> * c-ts-mode, c++-ts-mode: re-indents the `arg2` line to have indentation
> different from `arg1,` line, and creates a new line that also has new
> indentation.
> * QtCreator: lol, it does no indentation whatsoever in this case.

Ah, QtCreator does indent, it's just it isn't clear right away due to the way
its GUI behaves. Anyway, it creates a new line with its own indentation (weird
one btw, it is 5 spaces further than the opening parenthesis).



  reply	other threads:[~2023-02-11 10:25 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-09  8:09 tree-sitter: conceptional problem solvable at Emacs' level? Holger Schurig
2023-02-09  8:17 ` Po Lu
2023-02-09  8:50   ` Eli Zaretskii
2023-02-09 10:13     ` Po Lu
2023-02-09 10:55       ` Eli Zaretskii
2023-02-10  7:33   ` Yuan Fu
2023-02-10  8:42     ` Eli Zaretskii
     [not found]       ` <CAOpc7mHX6s0B8vdDee+9FMvQejGTSL3jzgwVekS7Esg-AOf=jw@mail.gmail.com>
2023-02-10 11:48         ` Eli Zaretskii
2023-02-11  2:17           ` Po Lu
2023-02-11  6:25             ` Konstantin Kharlamov
2023-02-11  6:36               ` Konstantin Kharlamov
2023-02-11  6:51                 ` Theodor Thornhill
2023-02-11  7:11                   ` Konstantin Kharlamov
2023-02-11  7:53                     ` Konstantin Kharlamov
2023-02-11  8:22                     ` Konstantin Kharlamov
2023-02-11  8:41                       ` Theodor Thornhill
2023-02-11  9:37                         ` Konstantin Kharlamov
2023-02-11 10:25                           ` Konstantin Kharlamov [this message]
2023-02-11  8:43                     ` Eli Zaretskii
2023-04-16 19:21                   ` Konstantin Kharlamov
2023-02-11  9:34       ` Ihor Radchenko
2023-02-11 10:42         ` Eli Zaretskii
2023-02-11 13:58         ` Lynn Winebarger
2023-02-09 16:25 ` Ergus
2023-02-09 20:09   ` Dmitry Gutov
2023-02-10  7:41     ` Holger Schurig

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=c373722a7a383f9f4f6b73fd49e83091dac9b0b5.camel@yandex.ru \
    --to=hi-angel@yandex.ru \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=holgerschurig@gmail.com \
    --cc=luangruo@yahoo.com \
    --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 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).