clang-format can use ~/.clang-format
authorSergey Matveev <stargrave@stargrave.org>
Fri, 10 Apr 2020 10:48:25 +0000 (13:48 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Fri, 10 Apr 2020 12:22:38 +0000 (15:22 +0300)
bin/bin/cfmt.sh [deleted file]
clang-format/.clang-format [new file with mode: 0644]
vim/.vim/ftplugin/c/autos.vim

diff --git a/bin/bin/cfmt.sh b/bin/bin/cfmt.sh
deleted file mode 100755 (executable)
index 51585ca..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-clang-format60 -style="{
-    BasedOnStyle: llvm,
-    ColumnLimit: 88,
-    IndentWidth: 4,
-    AllowAllParametersOfDeclarationOnNextLine: false,
-    AllowShortBlocksOnASingleLine: true,
-    AllowShortCaseLabelsOnASingleLine: true,
-    BinPackArguments: false,
-    BinPackParameters: false,
-    BreakStringLiterals: false,
-}" $@
diff --git a/clang-format/.clang-format b/clang-format/.clang-format
new file mode 100644 (file)
index 0000000..59c1b96
--- /dev/null
@@ -0,0 +1,10 @@
+BasedOnStyle: llvm
+ColumnLimit: 88
+IndentWidth: 4
+AlignConsecutiveAssignments: true
+AllowAllParametersOfDeclarationOnNextLine: false
+AllowShortBlocksOnASingleLine: true
+AllowShortCaseLabelsOnASingleLine: true
+BinPackArguments: false
+BinPackParameters: false
+BreakStringLiterals: false
index 1eb3aaed71ea2ef8f7221471f0bd0c6846f02390..b0f7c2d6b407578da08a84cbb75950d223836402 100644 (file)
@@ -1,3 +1,3 @@
-setlocal equalprg=cfmt.sh
+setlocal equalprg=clang-format60
 setlocal commentstring=//\ %s
 command! -buffer Fmt normal mtgg=G'tz.