From 6425627c3fe1d4c0a88b7309f248f57490b874fd Mon Sep 17 00:00:00 2001 From: Felipe Morales Date: Tue, 20 Jan 2015 09:52:05 -0300 Subject: tools: add .clang-format Configuration for clang-format and related utilities. Examples: clang-format -style=file git clang-format -style=file git diff -U0 HEAD^ | clang-format-diff.py -i -p1 -style=file --- src/.clang-format | 12 ++++++++++++ src/nvim/version.c | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 src/.clang-format (limited to 'src') diff --git a/src/.clang-format b/src/.clang-format new file mode 100644 index 0000000000..35e545ac4b --- /dev/null +++ b/src/.clang-format @@ -0,0 +1,12 @@ +BasedOnStyle: llvm +Language: Cpp +ColumnLimit: 80 +IndentWidth: 2 +TabWidth: 2 +UseTab: Never +IndentCaseLabels: true +BreakBeforeBraces: Linux +AlignEscapedNewlinesLeft: false +AllowShortFunctionsOnASingleLine: false +SpacesBeforeTrailingComments: 2 +PenaltyReturnTypeOnItsOwnLine: 200 diff --git a/src/nvim/version.c b/src/nvim/version.c index 3aa8ea911c..afafc0b1bc 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -177,6 +177,7 @@ static char *(features[]) = { NULL }; +// clang-format off static int included_patches[] = { //591 NA //590, @@ -771,6 +772,7 @@ static int included_patches[] = { 1, 0 }; +// clang-format on /// Place to put a short description when adding a feature with a patch. /// Keep it short, e.g.,: "relative numbers", "persistent undo". -- cgit