Skip to content

Commit

Permalink
feat(clangd): provide default clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamHsieh committed Jan 10, 2024
1 parent 06fec03 commit 472e7f6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions config/clangd/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# NOTE: clang-format(16) -style=google -dump-config | bat

BasedOnStyle: Google
Standard: c++20

UseTab: ForIndentation
TabWidth: 2
IndentWidth: 2
ColumnLimit: 0
AccessModifierOffset: -2
ContinuationIndentWidth: 2
ConstructorInitializerIndentWidth: 2

AllowShortFunctionsOnASingleLine: None

DerivePointerAlignment: false
PointerAlignment: Left
ReferenceAlignment: Pointer
1 change: 1 addition & 0 deletions home/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ in

home.file = {
".vimrc".source = link "vim/.vimrc";
".clang-format".source = link "clangd/.clang-format";
};

nix = {
Expand Down

0 comments on commit 472e7f6

Please sign in to comment.