microsoft / microsoft/vscode-cpptools
vcFormat: on-type formatting on Enter should not indent the next existing line
Open
@Colengms is already working on this.
Since Jul 14, 2021.
bug
Feature: Code Formatting
Language Service
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Bug type: Language Service
Describe the bug
Version: 1.57.1 (user setup)
Commit: 507ce72a4466fbb27b715c3722558bb15afa9f48
Date: 2021-06-17T13:28:07.755Z
Electron: 12.0.7
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Windows_NT x64 10.0.19042
C/C++ Extension Version: 1.5.1
Steps to reproduce
- Open
a.cppusing thesettings.json - Set cursor after
if (a < 10) - Press Enter
- See that before
returnwas inserted 4 spaces. - Try this in VS and see that VS does not insert spaces in that case.
a.cpp
void f(int a) {
if (a < 10)
return;
}
settings.json
{
"editor.formatOnType": true,
"C_Cpp.formatting": "vcFormat",
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.