mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins
This commit is contained in:
@ -7,8 +7,8 @@ call ale#Set('c_ccls_init_options', {})
|
||||
call ale#linter#Define('c', {
|
||||
\ 'name': 'ccls',
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'executable_callback': ale#VarFunc('c_ccls_executable'),
|
||||
\ 'executable': {b -> ale#Var(b, 'c_ccls_executable')},
|
||||
\ 'command': '%e',
|
||||
\ 'project_root_callback': 'ale#handlers#ccls#GetProjectRoot',
|
||||
\ 'initialization_options_callback':ale#VarFunc('c_ccls_init_options'),
|
||||
\ 'project_root': function('ale#handlers#ccls#GetProjectRoot'),
|
||||
\ 'initialization_options': {b -> ale#Var(b, 'c_ccls_init_options')},
|
||||
\})
|
||||
|
@ -18,7 +18,7 @@ endfunction
|
||||
call ale#linter#Define('c', {
|
||||
\ 'name': 'clang',
|
||||
\ 'output_stream': 'stderr',
|
||||
\ 'executable_callback': ale#VarFunc('c_clang_executable'),
|
||||
\ 'executable': {b -> ale#Var(b, 'c_clang_executable')},
|
||||
\ 'command_chain': [
|
||||
\ {'callback': 'ale#c#GetMakeCommand', 'output_stream': 'stdout'},
|
||||
\ {'callback': 'ale_linters#c#clang#GetCommand'}
|
||||
|
@ -17,7 +17,7 @@ endfunction
|
||||
call ale#linter#Define('c', {
|
||||
\ 'name': 'clangd',
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'executable_callback': ale#VarFunc('c_clangd_executable'),
|
||||
\ 'command_callback': 'ale_linters#c#clangd#GetCommand',
|
||||
\ 'project_root_callback': 'ale_linters#c#clangd#GetProjectRoot',
|
||||
\ 'executable': {b -> ale#Var(b, 'c_clangd_executable')},
|
||||
\ 'command': function('ale_linters#c#clangd#GetCommand'),
|
||||
\ 'project_root': function('ale_linters#c#clangd#GetProjectRoot'),
|
||||
\})
|
||||
|
@ -35,8 +35,8 @@ endfunction
|
||||
call ale#linter#Define('c', {
|
||||
\ 'name': 'clangtidy',
|
||||
\ 'output_stream': 'stdout',
|
||||
\ 'executable_callback': ale#VarFunc('c_clangtidy_executable'),
|
||||
\ 'command_callback': 'ale_linters#c#clangtidy#GetCommand',
|
||||
\ 'executable': {b -> ale#Var(b, 'c_clangtidy_executable')},
|
||||
\ 'command': function('ale_linters#c#clangtidy#GetCommand'),
|
||||
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
|
||||
\ 'lint_file': 1,
|
||||
\})
|
||||
|
@ -28,7 +28,7 @@ endfunction
|
||||
call ale#linter#Define('c', {
|
||||
\ 'name': 'cppcheck',
|
||||
\ 'output_stream': 'both',
|
||||
\ 'executable_callback': ale#VarFunc('c_cppcheck_executable'),
|
||||
\ 'command_callback': 'ale_linters#c#cppcheck#GetCommand',
|
||||
\ 'executable': {b -> ale#Var(b, 'c_cppcheck_executable')},
|
||||
\ 'command': function('ale_linters#c#cppcheck#GetCommand'),
|
||||
\ 'callback': 'ale#handlers#cppcheck#HandleCppCheckFormat',
|
||||
\})
|
||||
|
@ -21,8 +21,8 @@ endfunction
|
||||
call ale#linter#Define('c', {
|
||||
\ 'name': 'cquery',
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'executable_callback': ale#VarFunc('c_cquery_executable'),
|
||||
\ 'executable': {b -> ale#Var(b, 'c_cquery_executable')},
|
||||
\ 'command': '%e',
|
||||
\ 'project_root_callback': 'ale_linters#c#cquery#GetProjectRoot',
|
||||
\ 'initialization_options_callback': 'ale_linters#c#cquery#GetInitializationOptions',
|
||||
\ 'project_root': function('ale_linters#c#cquery#GetProjectRoot'),
|
||||
\ 'initialization_options': function('ale_linters#c#cquery#GetInitializationOptions'),
|
||||
\})
|
||||
|
@ -7,19 +7,19 @@ call ale#Set('c_flawfinder_minlevel', 1)
|
||||
call ale#Set('c_flawfinder_error_severity', 6)
|
||||
|
||||
function! ale_linters#c#flawfinder#GetCommand(buffer) abort
|
||||
" Set the minimum vulnerability level for flawfinder to bother with
|
||||
let l:minlevel = ' --minlevel=' . ale#Var(a:buffer, 'c_flawfinder_minlevel')
|
||||
" Set the minimum vulnerability level for flawfinder to bother with
|
||||
let l:minlevel = ' --minlevel=' . ale#Var(a:buffer, 'c_flawfinder_minlevel')
|
||||
|
||||
return '%e -CDQS'
|
||||
\ . ale#Pad(ale#Var(a:buffer, 'c_flawfinder_options'))
|
||||
\ . l:minlevel
|
||||
\ . ' %t'
|
||||
return '%e -CDQS'
|
||||
\ . ale#Pad(ale#Var(a:buffer, 'c_flawfinder_options'))
|
||||
\ . l:minlevel
|
||||
\ . ' %t'
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('c', {
|
||||
\ 'name': 'flawfinder',
|
||||
\ 'output_stream': 'stdout',
|
||||
\ 'executable_callback': ale#VarFunc('c_flawfinder_executable'),
|
||||
\ 'command_callback': 'ale_linters#c#flawfinder#GetCommand',
|
||||
\ 'executable': {b -> ale#Var(b, 'c_flawfinder_executable')},
|
||||
\ 'command': function('ale_linters#c#flawfinder#GetCommand'),
|
||||
\ 'callback': 'ale#handlers#flawfinder#HandleFlawfinderFormat',
|
||||
\})
|
||||
|
@ -18,7 +18,7 @@ endfunction
|
||||
call ale#linter#Define('c', {
|
||||
\ 'name': 'gcc',
|
||||
\ 'output_stream': 'stderr',
|
||||
\ 'executable_callback': ale#VarFunc('c_gcc_executable'),
|
||||
\ 'executable': {b -> ale#Var(b, 'c_gcc_executable')},
|
||||
\ 'command_chain': [
|
||||
\ {'callback': 'ale#c#GetMakeCommand', 'output_stream': 'stdout'},
|
||||
\ {'callback': 'ale_linters#c#gcc#GetCommand'}
|
||||
|
Reference in New Issue
Block a user