summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMukund Mauji <mauji.mukund@yahoo.ca>2021-02-14 09:03:04 -0500
committerGitHub <noreply@github.com>2021-02-14 23:03:04 +0900
commitb30c5c9b51b25a8c141de25ea959c925477f4cdc (patch)
tree1cd035e010b9f5978418544527734006c1445fa9 /doc
parent8cb9f5ef515f73eb3cf3188cc20ff57a51d9217b (diff)
downloadale-b30c5c9b51b25a8c141de25ea959c925477f4cdc.zip
Allow clangformat to use a local style file (#3587)
* Allow clangformat to use a local style file. * Add tests. * Fix Vint issue. * Improve explanation of feature in documentation. * Fix failing test. The test was checking the wrong directory.
Diffstat (limited to 'doc')
-rw-r--r--doc/ale-c.txt40
1 files changed, 39 insertions, 1 deletions
diff --git a/doc/ale-c.txt b/doc/ale-c.txt
index b0d94b8e..3b9fbc44 100644
--- a/doc/ale-c.txt
+++ b/doc/ale-c.txt
@@ -202,7 +202,45 @@ g:ale_c_clangformat_options *g:ale_c_clangformat_options*
Type: |String|
Default: `''`
- This variable can be change to modify flags given to clang-format.
+ This variable can be changed to modify flags given to clang-format.
+
+
+g:ale_c_clangformat_style_option *g:ale_c_clangformat_style_option*
+ *b:ale_c_clangformat_style_option*
+ Type: |String|
+ Default: `''`
+
+ This variable can be changed to modify only the style flag given to
+ clang-format. The contents of the variable are passed directly to the -style
+ flag of clang-format.
+
+ Example: >
+ {
+ \ BasedOnStyle: Microsoft,
+ \ ColumnLimit: 80,
+ \ AllowShortBlocksOnASingleLine: Always,
+ \ AllowShortFunctionsOnASingleLine: Inline,
+ \ }
+<
+ If you set this variable, ensure you don't modify -style in
+ |g:ale_c_clangformat_options|, as this will cause clang-format to error.
+
+
+g:ale_c_clangformat_use_local_file *g:ale_c_clangformat_use_local_file*
+ *b:ale_c_clangformat_use_local_file*
+ Type: |Number|
+ Default: `0`
+
+ This variable can be changed to modify whether to use a local .clang-format
+ file. If the file is found, the flag '-style=file' is passed to clang-format
+ and any options configured via |g:ale_c_clangformat_style_option| are not
+ passed.
+
+ If this option is enabled but no .clang-format file is found, default back to
+ |g:ale_c_clangformat_style_option|, if it set.
+
+ If you set this variable, ensure you don't modify -style in
+ |g:ale_c_clangformat_options|, as this will cause clang-format to error.
===============================================================================