diff options
| author | Krasimir Georgiev <krasimir@google.com> | 2017-02-16 10:49:46 +0000 |
|---|---|---|
| committer | Krasimir Georgiev <krasimir@google.com> | 2017-02-16 10:49:46 +0000 |
| commit | 1b8bfd4b7680606ac442cb15d172b1c1c16c4bff (patch) | |
| tree | 1aa3b5e7f57e059f2daa823f519936afd193f2f3 /clang/test | |
| parent | 762adef1a900c94b2d36f6a10624ce2b33f0d934 (diff) | |
| download | bcm5719-llvm-1b8bfd4b7680606ac442cb15d172b1c1c16c4bff.tar.gz bcm5719-llvm-1b8bfd4b7680606ac442cb15d172b1c1c16c4bff.zip | |
[clangd] Implement format on type
Summary:
This patch adds onTypeFormatting to clangd.
The trigger character is '}' and it works by scanning for the matching '{' and formatting the range in-between.
There are problems with ';' as a trigger character, the cursor position is before the `|`:
```
int main() {
int i;|
}
```
becomes:
```
int main() { int i;| }
```
which is not likely what the user intended.
Also formatting at semicolon in a non-properly closed scope puts the following tokens in the same unwrapped line, which doesn't reformat nicely.
Reviewers: bkramer
Reviewed By: bkramer
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D29990
llvm-svn: 295304
Diffstat (limited to 'clang/test')
0 files changed, 0 insertions, 0 deletions

