Q:

How to configure Format Document in VsCode? 

When I hit the shortcut Alt+Shift+F, my editor reformat my C/C++ code, the same as in Eclipse or Vim.  However I have absolutely no clues on how to configure it.  
What are the rules used to reformat the document.  I know the action is editor.action.formatDocument, but I found nothing in the user settings.  
How does it work?  How to configure it? 

A:

You have to install clang and clang-format. 
Then add a .clang-format file in your project directory containing (as an example) :
BinPackArguments: false
BreakBeforeBraces: Stroustrup
ColumnLimit: 0
ConstructorInitializerIndentWidth: 4
IndentWidth: 4
PointerAlignment: Left
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
UseTab: Never

All clang-format style options can be found here :
https://clang.llvm.org/docs/ClangFormatStyleOptions.html

