From fd6551e90cdbf407c72990271f9215a7bdb3af31 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Mon, 27 Apr 2020 00:03:39 +0200 Subject: [PATCH] vim and clang-format configuration file --- .clang-format | 10 ++++++++++ .vimrc | 9 +++++++++ 2 files changed, 19 insertions(+) create mode 100644 .clang-format create mode 100644 .vimrc diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..19db091 --- /dev/null +++ b/.clang-format @@ -0,0 +1,10 @@ +BasedOnStyle: LLVM +AlignConsecutiveAssignments: true +AllowShortFunctionsOnASingleLine: Empty +BreakBeforeBraces: Linux +BreakStringLiterals: false +ColumnLimit: 95 +IndentCaseLabels: true +IndentWidth: 4 +TabWidth: 4 +UseTab: Never diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..0499ba4 --- /dev/null +++ b/.vimrc @@ -0,0 +1,9 @@ +let g:ale_c_clang_options= ' -Icore/ -Idrivers/' +let g:ale_c_clangd_options= ' -Icore/ -Idrivers/' +let g:ale_c_gcc_options= ' -Icore/ -Idrivers/' +let g:ale_c_parse_makefile=1 +let g:ale_c_cppcheck_options=' -Icore/ -Idrivers/' +let g:c_clangformat_options='-style=file' +let g:ale_echo_msg_format = '[%linter%] %s [%severity%]' +let b:ale_linters = {'c': ['gcc', 'clang', 'cppcheck']} +let b:ale_fixers = { 'c': ['clang-format']}