mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins
This commit is contained in:
@ -26,7 +26,7 @@ endfunction
|
||||
call ale#linter#Define('sh', {
|
||||
\ 'name': 'language_server',
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'executable_callback': 'ale_linters#sh#language_server#GetExecutable',
|
||||
\ 'command_callback': 'ale_linters#sh#language_server#GetCommand',
|
||||
\ 'project_root_callback': 'ale_linters#sh#language_server#GetProjectRoot',
|
||||
\ 'executable': function('ale_linters#sh#language_server#GetExecutable'),
|
||||
\ 'command': function('ale_linters#sh#language_server#GetCommand'),
|
||||
\ 'project_root': function('ale_linters#sh#language_server#GetProjectRoot'),
|
||||
\})
|
||||
|
@ -51,7 +51,7 @@ endfunction
|
||||
call ale#linter#Define('sh', {
|
||||
\ 'name': 'shell',
|
||||
\ 'output_stream': 'stderr',
|
||||
\ 'executable_callback': 'ale_linters#sh#shell#GetExecutable',
|
||||
\ 'command_callback': 'ale_linters#sh#shell#GetCommand',
|
||||
\ 'executable': function('ale_linters#sh#shell#GetExecutable'),
|
||||
\ 'command': function('ale_linters#sh#shell#GetCommand'),
|
||||
\ 'callback': 'ale_linters#sh#shell#Handle',
|
||||
\})
|
||||
|
@ -8,6 +8,7 @@
|
||||
" let g:ale_sh_shellcheck_exclusions = 'SC2002,SC2004'
|
||||
call ale#Set('sh_shellcheck_exclusions', get(g:, 'ale_linters_sh_shellcheck_exclusions', ''))
|
||||
call ale#Set('sh_shellcheck_executable', 'shellcheck')
|
||||
call ale#Set('sh_shellcheck_dialect', 'auto')
|
||||
call ale#Set('sh_shellcheck_options', '')
|
||||
|
||||
function! ale_linters#sh#shellcheck#GetExecutable(buffer) abort
|
||||
@ -53,9 +54,13 @@ function! ale_linters#sh#shellcheck#GetCommand(buffer, version_output) abort
|
||||
|
||||
let l:options = ale#Var(a:buffer, 'sh_shellcheck_options')
|
||||
let l:exclude_option = ale#Var(a:buffer, 'sh_shellcheck_exclusions')
|
||||
let l:dialect = ale_linters#sh#shellcheck#GetDialectArgument(a:buffer)
|
||||
let l:dialect = ale#Var(a:buffer, 'sh_shellcheck_dialect')
|
||||
let l:external_option = ale#semver#GTE(l:version, [0, 4, 0]) ? ' -x' : ''
|
||||
|
||||
if l:dialect is# 'auto'
|
||||
let l:dialect = ale_linters#sh#shellcheck#GetDialectArgument(a:buffer)
|
||||
endif
|
||||
|
||||
return ale#path#BufferCdString(a:buffer)
|
||||
\ . ale#Escape(l:executable)
|
||||
\ . (!empty(l:dialect) ? ' -s ' . l:dialect : '')
|
||||
@ -103,7 +108,7 @@ endfunction
|
||||
|
||||
call ale#linter#Define('sh', {
|
||||
\ 'name': 'shellcheck',
|
||||
\ 'executable_callback': 'ale_linters#sh#shellcheck#GetExecutable',
|
||||
\ 'executable': function('ale_linters#sh#shellcheck#GetExecutable'),
|
||||
\ 'command_chain': [
|
||||
\ {'callback': 'ale_linters#sh#shellcheck#VersionCheck'},
|
||||
\ {'callback': 'ale_linters#sh#shellcheck#GetCommand'},
|
||||
|
Reference in New Issue
Block a user