dotfiles/common/.flake/home/clang-format.nix.org
2025-01-08 17:24:21 -06:00

21 lines
552 B
Org Mode

#+title: Clang Format Default Options
Set global =clang-format= options:
- Default to LLVM style
- Use indents of width 4
- Use Linux standards for braces (new line for functions, same line for everything else)
- If statements cannot be on a single line.
- Case labels are not indented.
#+begin_src nix
{ config, pkgs, ... }:
{
home.file.".clang-format".text = ''
BasedOnStyle: LLVM
IndentWidth: 4
BreakBeforeBraces: Linux
AllowShortIfStatementsOnASingleLine: false
IndentCaseLabels: false
'';
}
#+end_src