New options.
Add options b:syntastic_<filetype>_<checker>_exec and b:syntastic_<checker>_exec.
This commit is contained in:
parent
cc33286605
commit
b639b007ae
@ -616,11 +616,19 @@ Use |:SyntasticInfo| to see which checkers are available for a given filetype.
|
|||||||
5.2 Choosing the executable *syntastic-config-exec*
|
5.2 Choosing the executable *syntastic-config-exec*
|
||||||
|
|
||||||
*'syntastic_<filetype>_<checker>_exec'*
|
*'syntastic_<filetype>_<checker>_exec'*
|
||||||
The executable used by a checker is normally defined automatically, when the
|
The executable run by a checker is normally defined automatically, when the
|
||||||
checkers is registered. You can however override it by setting the variable
|
checker is registered. You can however override it, by setting the variable
|
||||||
'g:syntastic_<filetype>_<checker>_exec': >
|
'g:syntastic_<filetype>_<checker>_exec': >
|
||||||
let g:syntastic_ruby_mri_exec = '~/bin/ruby2'
|
let g:syntastic_ruby_mri_exec = '~/bin/ruby2'
|
||||||
<
|
<
|
||||||
|
This variable has a local version, 'b:syntastic_<filetype>_<checker>_exec',
|
||||||
|
which takes precedence over the global one in the corresponding buffer.
|
||||||
|
|
||||||
|
*'b:syntastic_<checker>_exec'*
|
||||||
|
And there is also a local variable named 'b:syntastic_<checker>_exec', which
|
||||||
|
takes precedence over both 'b:syntastic_<filetype>_<checker>_exec' and
|
||||||
|
'g:syntastic_<filetype>_<checker>_exec' in the buffers where it is defined.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
5.3 Configuring specific checkers *syntastic-config-makeprg*
|
5.3 Configuring specific checkers *syntastic-config-makeprg*
|
||||||
|
|
||||||
@ -651,13 +659,14 @@ you can set it to an empty string, e.g.: >
|
|||||||
*'syntastic_<filetype>_<checker>_exe'*
|
*'syntastic_<filetype>_<checker>_exe'*
|
||||||
The 'exe' is normally the same as the 'exec' attribute described above, in
|
The 'exe' is normally the same as the 'exec' attribute described above, in
|
||||||
which case it may be omitted. However, you can use it to add environment
|
which case it may be omitted. However, you can use it to add environment
|
||||||
variables or additional parameters, e.g. to tell the mri checker to use KANJI
|
variables, or to change the way the checker is run. For example this setup
|
||||||
encoding you could do something like this: >
|
allows you to run PC-Lint under Wine emulation on Linux: >
|
||||||
let g:syntastic_ruby_mri_exe = 'RUBYOPT="-Ke" ruby'
|
let g:syntastic_c_pc_lint_exec = "wine"
|
||||||
|
let g:syntastic_c_pc_lint_exe = "wine c:/path/to/lint-nt.exe"
|
||||||
<
|
<
|
||||||
To override the args and the tail: >
|
To override the args and the tail: >
|
||||||
let g:syntastic_ruby_mri_args = "--my --args --here"
|
let g:syntastic_c_pc_lint_args = "-w5 -Iz:/usr/include/linux"
|
||||||
let g:syntastic_ruby_mri_tail = "> /tmp/my-output-file-biatch"
|
let g:syntastic_c_pc_lint_tail = "2>/dev/null"
|
||||||
<
|
<
|
||||||
The general form of the override options is: >
|
The general form of the override options is: >
|
||||||
syntastic_<filetype>_<checker>_<option-name>
|
syntastic_<filetype>_<checker>_<option-name>
|
||||||
|
@ -19,7 +19,7 @@ if has('reltime')
|
|||||||
lockvar! g:syntastic_start
|
lockvar! g:syntastic_start
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let g:syntastic_version = '3.5.0-28'
|
let g:syntastic_version = '3.5.0-29'
|
||||||
lockvar g:syntastic_version
|
lockvar g:syntastic_version
|
||||||
|
|
||||||
" Sanity checks {{{1
|
" Sanity checks {{{1
|
||||||
|
@ -46,11 +46,9 @@ function! g:SyntasticChecker.getName() " {{{2
|
|||||||
endfunction " }}}2
|
endfunction " }}}2
|
||||||
|
|
||||||
function! g:SyntasticChecker.getExec() " {{{2
|
function! g:SyntasticChecker.getExec() " {{{2
|
||||||
if exists('g:syntastic_' . self._filetype . '_' . self._name . '_exec')
|
return
|
||||||
return expand(g:syntastic_{self._filetype}_{self._name}_exec)
|
\ exists('b:syntastic_' . self._name . '_exec') ? b:syntastic_{self._name}_exec :
|
||||||
endif
|
\ expand(syntastic#util#var(self._filetype . '_' . self._name . '_exec', self._exec))
|
||||||
|
|
||||||
return self._exec
|
|
||||||
endfunction " }}}2
|
endfunction " }}}2
|
||||||
|
|
||||||
function! g:SyntasticChecker.getExecEscaped() " {{{2
|
function! g:SyntasticChecker.getExecEscaped() " {{{2
|
||||||
|
Loading…
Reference in New Issue
Block a user