-
Notifications
You must be signed in to change notification settings - Fork 19
/
.lvimrc
70 lines (65 loc) · 2.17 KB
/
.lvimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
" Configuration file to make ALE for Vim (https://github.com/w0rp/ale) behave
" for development on the `selene` library. This is a 'local' Vimscript file that
" will be read automatically when using `vim-localvimrc`
" (https://github.com/embear/vim-localvimrc). ALE needs to be otherwise set up.
" Use at your own risk.
" Get path of this file
let s:path = expand('<sfile>:p:h')
" Set options for ALE's C linters
let s:c_opts = [
\ '-std=c11',
\ '-Wall',
\ '-Wextra',
\ '-Werror',
\ ]
let s:c_clang_opts = []
let s:c_gcc_opts = []
let g:ale_c_clang_options = join(s:c_opts + s:c_clang_opts, ' ')
let g:ale_c_gcc_options = join(s:c_opts + s:c_clang_opts, ' ')
" Set options for ALE's C++ linters
let s:cpp_opts = [
\ '-std=c++17',
\ '-Wall',
\ '-Wextra',
\ '-Wpedantic',
\ '-Wconversion',
\ '-Werror',
\ '-fexceptions',
\ '-I' . $HOME . '/homebrew/include',
\ '-I' . s:path,
\ '-I' . s:path . '/build',
\ '-I' . s:path . '/external/Catch2/single_include',
\ ]
let s:cpp_clang_opts = []
let s:cpp_gcc_opts = ['-Wno-attributes']
let g:ale_cpp_clang_options = join(s:cpp_opts + s:cpp_clang_opts, ' ')
let g:ale_cpp_gcc_options = join(s:cpp_opts + s:cpp_gcc_opts, ' ')
let g:ale_cpp_clangtidy_options = join(s:cpp_opts, ' ')
let g:ale_cpp_clangtidy_checks = [
\ '*',
\ '-android-*',
\ '-*-no-malloc',
\ '-cert*',
\ '-cppcoreguidelines-avoid-magic-numbers',
\ '-cppcoreguidelines-owning-memory',
\ '-cppcoreguidelines-pro-bounds-constant-array-index',
\ '-cppcoreguidelines-pro-bounds-pointer-arithmetic',
\ '-cppcoreguidelines-pro-type-vararg',
\ '-cppcoreguidelines-pro-type-reinterpret-cast',
\ '-cppcoreguidelines-pro-bounds-array-to-pointer-decay',
\ '-fuchsia*',
\ '-google-readability-todo',
\ '-google-runtime-int',
\ '-google-runtime-references',
\ '-hicpp-no-array-decay',
\ '-hicpp-signed-bitwise',
\ '-hicpp-uppercase-literal-suffix',
\ '-hicpp-vararg',
\ '-llvm-header-guard',
\ '-misc-non-private-member-variables-in-classes',
\ '-readability-implicit-bool-conversion',
\ '-readability-magic-numbers',
\ '-readability-named-parameter',
\ '-readability-redundant-declaration',
\ '-readability-uppercase-literal-suffix',
\ ]