Skip to content

A Visual Studio Code extension that provides C++, C, Obj-C, Java formatting with the use of clang-format

License

Notifications You must be signed in to change notification settings

Nevor/vscode-clang-format-provider

 
 

Repository files navigation

README

Release history

v 0.10.0

  • enabling of individual languages with clang-format.language.javascript.enable, etc.—requires reloading Visual Studio Code

v 0.9.0

v 0.6.1

  • clean up dependencies #9

v 0.6.0

  • 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

v 0.5.0

  • Included OWenT's changes:
    1. add setting of clang-format executable
    2. add style setting
    3. add fallback style setting

v 0.1.2

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

Usage

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).

Source code

Available on github: https://github.com/xaverh/vscode-clang-format-provider

About

A Visual Studio Code extension that provides C++, C, Obj-C, Java formatting with the use of clang-format

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%