- enabling of individual languages with
clang-format.language.javascript.enable
, etc.—requires reloading Visual Studio Code
- add protobuf support (work with https://marketplace.visualstudio.com/items?itemName=peterj.proto)
- add javascript/typescript support
- allow different style & fallback style option for different languages
- format on save is available now (just like https://github.com/Microsoft/vscode-go/blob/master/src/goMain.ts)
- clean up dependencies #9
- fixed multibyte character handling #7 (by OWenT)
- fixed "clang-format is ignoring the -style setting because of invalid value" #6 (by OWenT)
- LLVM style is now the default fallback style (fixes #1)
- changed dependency to VS Code 1.0.0 or higher
- Included OWenT's changes:
- add setting of clang-format executable
- add style setting
- add fallback style setting
- Included ioachim's changes:
it doesn't require saving the file, works by doing partial edits (instead of replacing the whole buffer), and enables range formatting.
Clang-Format is a tool to format C/C++/Java/JavaScript/Objective-C/Protobuf code. It can be configured with a config file within the working folder or a parent folder. Configuration see: http://clang.llvm.org/docs/ClangFormatStyleOptions.html
If clang-format is installed and in PATH, C/C++ etc source files can be formatted with Visual Studio Code's built-in formatter (Usually: Ctrl+Shift+F).
Available on github: https://github.com/xaverh/vscode-clang-format-provider