https://github.com/rubixdev/dprint-plugin-clang
A dprint plugin for the clang-format tool
https://github.com/rubixdev/dprint-plugin-clang
Last synced: about 1 year ago
JSON representation
A dprint plugin for the clang-format tool
- Host: GitHub
- URL: https://github.com/rubixdev/dprint-plugin-clang
- Owner: RubixDev
- License: gpl-3.0
- Created: 2022-10-29T11:30:50.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-22T10:55:17.000Z (over 2 years ago)
- Last Synced: 2025-01-13T03:12:26.218Z (over 1 year ago)
- Language: Rust
- Size: 29.3 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# dprint-plugin-clang
Use [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) inside your
[dprint](https://dprint.dev/) config.
## Install
Add the plugin to your config file by running
`dprint config add RubixDev/clang`.
Don't forget to add the supported file extensions to your `includes` pattern.
## Configuration
This plugin uses the global dprint config keys as specified below. For further
customization,
[all options from clang-format](https://clang.llvm.org/docs/ClangFormatStyleOptions.html)
can be set through the `"clang"` config key, and the usual `.clang-format`
config files are also read unless you specify another base style through
`BasedOnStyle`.
| global dprint config key | used clang-format option |
| ------------------------ | ------------------------ |
| `newLineKind` | `UseCRLF` |
| `lineWidth` | `ColumnLimit` |
| `useTabs` | `UseTab` |
| `indentWidth` | `IndentWidth` |