[UPDATE][VIM] Move ALE linter options to ftplugin

This commit is contained in:
Bruno BELANYI 2019-10-17 11:23:22 +02:00
parent 1f1d3c9545
commit 7dc3190ee2
4 changed files with 28 additions and 19 deletions

View file

@ -1,3 +1,11 @@
" More warnings and the usual version in flags for Clang
let b:ale_c_clang_options='-Wall -Wextra -pedantic -std=c99'
let b:undo_ftplugin.='|unlet b:ale_c_clang_options'
" More warnings and the usual version in flags for GCC
let b:ale_c_gcc_options='-Wall -Wextra -pedantic -std=c99'
let b:undo_ftplugin.='|unlet b:ale_c_gcc_options'
" Use compile_commands.json to look for additional flags
let b:ale_c_parse_compile_commands=1
let b:undo_ftplugin.='|unlet b:ale_c_parse_compile_commands'

View file

@ -1,3 +1,11 @@
" More warnings and the usual version in flags for Clang
let b:ale_cpp_clang_options='-Wall -Wextra -pedantic -std=c++17'
let b:undo_ftplugin.='|unlet b:ale_cpp_clang_options'
" More warnings and the usual version in flags for GCC
let b:ale_cpp_gcc_options='-Wall -Wextra -pedantic -std=c++17'
let b:undo_ftplugin.='|unlet b:ale_cpp_gcc_options'
" Use compile_commands.json to look for additional flags
let b:ale_c_parse_compile_commands=1
let b:undo_ftplugin.='|unlet b:ale_c_parse_compile_commands'

View file

@ -1,3 +1,15 @@
" Check tests too
let b:ale_rust_cargo_check_tests=1
let b:undo_ftplugin='|unlet b:ale_rust_cargo_check_tests'
" Check examples too
let b:ale_rust_cargo_check_examples=1
let b:undo_ftplugin='|unlet b:ale_rust_cargo_check_examples'
" Use clippy if it's available instead of just cargo check
let b:ale_rust_cargo_use_clippy=executable('cargo-clippy')
let b:undo_ftplugin='|unlet b:ale_rust_cargo_use_clippy'
" Use rustfmt as ALE fixer for rust
let b:ale_fixers=[ 'rustfmt' ]
let b:undo_ftplugin.='|unlet b:ale_fixers'

View file

@ -306,25 +306,6 @@ let g:ale_echo_msg_format='[%linter%][%severity%]%(code):% %s'
" The message displayed in the location list
let g:ale_loclist_msg_format='[%linter%]%(code):% %s'
" C/C++ settings {{{
""""""""""""""""
" More warnings and the usual version in flags for Clang
let g:ale_c_clang_options='-Wall -Wextra -pedantic -std=c99'
let g:ale_cpp_clang_options='-Wall -Wextra -pedantic -std=c++17'
" More warnings and the usual version in flags for GCC
let g:ale_c_gcc_options='-Wall -Wextra -pedantic -std=c99'
let g:ale_cpp_gcc_options='-Wall -Wextra -pedantic -std=c++17'
" }}}
" Rust settings {{{
""""""""""""""""
" Check tests too
let g:ale_rust_cargo_check_tests=1
" Check examples too
let g:ale_rust_cargo_check_examples=1
" Use clippy if it's available instead of just cargo check
let g:ale_rust_cargo_use_clippy=executable('cargo-clippy')
" }}}
" }}}
" FastFold settings {{{