2

Are there any ways to achieve this (the dot indicates the position of the cursor) in Visual Studio Code by using clangd formatter

void foo()
{
   .
}

instead of this

 void foo()
 {
.}

or are there any ways to just use the c/c++ extension formatter from Microsoft while using clangd intellisense in vscode as it asks me to disable the intellisense of c/c++ if i want to use clangd however turning off the intellisense of c/c++ will also turn off the formatter of it.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Colors
  • 21
  • 1
  • 1
    Do you want your cursor to be like code sample 1 after hitting enter when the cursor is positioned at the opening brace — or what? – Rohan Bari Dec 17 '22 at 09:41
  • In VS Code settings, search for formatter configuration, then set up your default formatter either Clang formatter/Prettier or any other without disabling the intellisense. – Jishan Shaikh Dec 17 '22 at 14:38
  • Does setting `"editor.formatOnType": true` in vscode settings help? – HighCommander4 Dec 30 '22 at 20:10

0 Answers0