[PATCH] D60605: [clangd] Revamp textDocument/onTypeFormatting.
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 26 01:47:58 PDT 2019
ilya-biryukov added a comment.
In D60605#1478922 <https://reviews.llvm.org/D60605#1478922>, @sammccall wrote:
> In D60605#1478581 <https://reviews.llvm.org/D60605#1478581>, @ilya-biryukov wrote:
>
> > Input:
> >
> > int test() {
> > }^
> >
> >
> > Actual:
> >
> > int test() {}
> > ^
> >
>
>
> I really do think this is the right thing in particular if you typed the brace.
> It's visually confusing that hitting \n results in the cursor staying on the same line and the } moving.
> And this interacts badly with the previous bug.
> But can you see if this is something you could live with, and if not, explain why you don't want the {} formatted?
In general, I have high tolerance for quirks in IDE features. But this one really makes me itchy. I'd say clangd should never remove lines while I'm trying to add them. Are there examples where this behavior is useful?
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60605/new/
https://reviews.llvm.org/D60605
More information about the cfe-commits
mailing list