[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tree-sitter: conceptional problem solvable at Emacs' level?
From: |
Konstantin Kharlamov |
Subject: |
Re: tree-sitter: conceptional problem solvable at Emacs' level? |
Date: |
Sat, 11 Feb 2023 09:36:26 +0300 |
User-agent: |
Evolution 3.46.3 |
On Sat, 2023-02-11 at 09:25 +0300, Konstantin Kharlamov wrote:
> On Sat, 2023-02-11 at 10:17 +0800, Po Lu wrote:
> > Eli Zaretskii <eliz@gnu.org> writes:
> >
> > > However, I meant the IDEs which are using tree-sitter and support
> > > developing C/C++ programs. I believe some do.
> >
> > I think most of those have similar problems supporting macros.
> > Who knows their names? I may be able to ask some of their users.
>
> From my experience on and off work, there are just two IDEs (as in, not
> editors)
> used most widely for C++ code: QtCreator and Visual Studio. The first you
> discussed, the second is proprietary.
>
> Then again, people most often code in C++ and C with text editors, in that
> case
> popular choices from my experience: Sublime Text and VS Code. These two have
> don't use tree-sitter either.
I installed Sublime Text on my Archlinux and tested with the C++ code OP posted.
What I see is that ST does seem confused about indentation, while trying to make
a newline right after `slots:` line.
However, if you try to make a newline after the `void someSlot() {};` line, it
will use the indentation used on the previous line.
The default cc-mode in Emacs works similarly. The cc-ts-mode on the other hand
doesn't make use of the previous indentation, and I think it should. It would
resolve that problem and others, because in my experience it happens very often
in C and C++ code that you want some custom indentation level, so you just make
one and you expect the editor to keep it while creating more new lines.
- tree-sitter: conceptional problem solvable at Emacs' level?, Holger Schurig, 2023/02/09
- Re: tree-sitter: conceptional problem solvable at Emacs' level?, Po Lu, 2023/02/09
- Re: tree-sitter: conceptional problem solvable at Emacs' level?, Yuan Fu, 2023/02/10
- Re: tree-sitter: conceptional problem solvable at Emacs' level?, Eli Zaretskii, 2023/02/10
- Message not available
- Re: tree-sitter: conceptional problem solvable at Emacs' level?, Eli Zaretskii, 2023/02/10
- Re: tree-sitter: conceptional problem solvable at Emacs' level?, Po Lu, 2023/02/10
- Re: tree-sitter: conceptional problem solvable at Emacs' level?, Konstantin Kharlamov, 2023/02/11
- Re: tree-sitter: conceptional problem solvable at Emacs' level?,
Konstantin Kharlamov <=
- Re: tree-sitter: conceptional problem solvable at Emacs' level?, Theodor Thornhill, 2023/02/11
- Re: tree-sitter: conceptional problem solvable at Emacs' level?, Konstantin Kharlamov, 2023/02/11
- Re: tree-sitter: conceptional problem solvable at Emacs' level?, Konstantin Kharlamov, 2023/02/11
- Re: tree-sitter: conceptional problem solvable at Emacs' level?, Konstantin Kharlamov, 2023/02/11
- Re: tree-sitter: conceptional problem solvable at Emacs' level?, Theodor Thornhill, 2023/02/11
- Re: tree-sitter: conceptional problem solvable at Emacs' level?, Konstantin Kharlamov, 2023/02/11
- Re: tree-sitter: conceptional problem solvable at Emacs' level?, Konstantin Kharlamov, 2023/02/11
- Re: tree-sitter: conceptional problem solvable at Emacs' level?, Eli Zaretskii, 2023/02/11
- Re: tree-sitter: conceptional problem solvable at Emacs' level?, Ihor Radchenko, 2023/02/11
- Re: tree-sitter: conceptional problem solvable at Emacs' level?, Eli Zaretskii, 2023/02/11