Formatting: folding.
This commit is contained in:
parent
c472ec1396
commit
1d2f8d514a
@ -64,4 +64,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -44,4 +44,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -46,4 +46,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -44,4 +44,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -22,14 +22,14 @@ endif
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_asm_gcc_IsAvailable() dict
|
||||
function! SyntaxCheckers_asm_gcc_IsAvailable() dict " {{{1
|
||||
if !exists('g:syntastic_asm_compiler')
|
||||
let g:syntastic_asm_compiler = self.getExec()
|
||||
endif
|
||||
return executable(expand(g:syntastic_asm_compiler, 1))
|
||||
endfunction
|
||||
endfunction " }}}1
|
||||
|
||||
function! SyntaxCheckers_asm_gcc_GetLocList() dict
|
||||
function! SyntaxCheckers_asm_gcc_GetLocList() dict " {{{1
|
||||
return syntastic#c#GetLocList('asm', 'gcc', {
|
||||
\ 'errorformat':
|
||||
\ '%-G%f:%s:,' .
|
||||
@ -37,12 +37,16 @@ function! SyntaxCheckers_asm_gcc_GetLocList() dict
|
||||
\ '%f:%l:%c: %tarning: %m,' .
|
||||
\ '%f:%l: %m',
|
||||
\ 'main_flags': '-x assembler -fsyntax-only -masm=' . s:GetDialect() })
|
||||
endfunction
|
||||
endfunction " }}}1
|
||||
|
||||
function! s:GetDialect()
|
||||
" Utilities {{{1
|
||||
|
||||
function! s:GetDialect() " {{{2
|
||||
return exists('g:syntastic_asm_dialect') ? g:syntastic_asm_dialect :
|
||||
\ expand('%:e', 1) ==? 'asm' ? 'intel' : 'att'
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
" }}}1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'asm',
|
||||
@ -51,4 +55,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -32,4 +32,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -57,4 +57,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -54,4 +54,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -57,4 +57,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -58,4 +58,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -58,4 +58,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -59,4 +59,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -56,4 +56,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -58,4 +58,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -62,4 +62,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -63,4 +63,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -45,4 +45,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -52,4 +52,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -52,4 +52,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -36,4 +36,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -44,4 +44,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -44,4 +44,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -58,4 +58,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -46,4 +46,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -37,4 +37,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -22,4 +22,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'exec': 'clang-check',
|
||||
\ 'redirect': 'c/clang_check'})
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -22,4 +22,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'exec': 'clang-tidy',
|
||||
\ 'redirect': 'c/clang_tidy'})
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -21,4 +21,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'name': 'cppcheck',
|
||||
\ 'redirect': 'c/cppcheck'})
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -49,4 +49,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -53,4 +53,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -21,4 +21,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'name': 'oclint',
|
||||
\ 'redirect': 'c/oclint'})
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -23,4 +23,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'exec': 'lint-nt',
|
||||
\ 'redirect': 'c/pc_lint'})
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -36,4 +36,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -44,4 +44,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -22,4 +22,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'name': 'phpcs',
|
||||
\ 'redirect': 'php/phpcs'})
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -58,4 +58,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -23,4 +23,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'name': 'recess',
|
||||
\ 'redirect': 'less/recess'})
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -39,4 +39,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -63,4 +63,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -57,4 +57,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -73,4 +73,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -52,4 +52,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -22,4 +22,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'name': 'xmllint',
|
||||
\ 'redirect': 'xml/xmllint'})
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -35,4 +35,4 @@ call SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -56,4 +56,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -58,4 +58,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -39,4 +39,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -75,4 +75,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -49,4 +49,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -27,7 +27,7 @@ let s:glsl_extensions = {
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_glsl_cgc_GetLocList() dict
|
||||
function! SyntaxCheckers_glsl_cgc_GetLocList() dict " {{{1
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args_before': '-oglsl -profile ' . s:GetProfile(),
|
||||
\ 'args': (exists('g:syntastic_glsl_options') ? ' ' . g:syntastic_glsl_options : '') })
|
||||
@ -39,9 +39,11 @@ function! SyntaxCheckers_glsl_cgc_GetLocList() dict
|
||||
return SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat })
|
||||
endfunction
|
||||
endfunction " }}}1
|
||||
|
||||
function! s:GetProfile()
|
||||
" Utilities {{{1
|
||||
|
||||
function! s:GetProfile() " {{{2
|
||||
let save_view = winsaveview()
|
||||
let old_foldenable = &foldenable
|
||||
let old_lazyredraw = &lazyredraw
|
||||
@ -65,7 +67,9 @@ function! s:GetProfile()
|
||||
endif
|
||||
|
||||
return profile
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
" }}}1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\'filetype': 'glsl',
|
||||
@ -74,4 +78,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -89,4 +89,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -42,4 +42,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -39,4 +39,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -43,4 +43,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -49,4 +49,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -43,4 +43,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -34,4 +34,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -40,4 +40,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -80,4 +80,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -53,4 +53,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -36,4 +36,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -40,4 +40,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -60,4 +60,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -35,4 +35,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -51,4 +51,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -23,6 +23,11 @@ if exists("g:loaded_syntastic_html_tidy_checker")
|
||||
endif
|
||||
let g:loaded_syntastic_html_tidy_checker = 1
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Checker options {{{1
|
||||
|
||||
if !exists('g:syntastic_html_tidy_ignore_errors')
|
||||
let g:syntastic_html_tidy_ignore_errors = []
|
||||
endif
|
||||
@ -39,27 +44,9 @@ if !exists('g:syntastic_html_tidy_empty_tags')
|
||||
let g:syntastic_html_tidy_empty_tags = []
|
||||
endif
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
" }}}1
|
||||
|
||||
" TODO: join this with xhtml.vim for DRY's sake?
|
||||
function! s:TidyEncOptByFenc()
|
||||
let TIDY_OPTS = {
|
||||
\ 'utf-8': '-utf8',
|
||||
\ 'ascii': '-ascii',
|
||||
\ 'latin1': '-latin1',
|
||||
\ 'iso-2022-jp': '-iso-2022',
|
||||
\ 'cp1252': '-win1252',
|
||||
\ 'macroman': '-mac',
|
||||
\ 'utf-16le': '-utf16le',
|
||||
\ 'utf-16': '-utf16',
|
||||
\ 'big5': '-big5',
|
||||
\ 'cp932': '-shiftjis',
|
||||
\ 'sjis': '-shiftjis',
|
||||
\ 'cp850': '-ibm858',
|
||||
\ }
|
||||
return get(TIDY_OPTS, &fileencoding, '-utf8')
|
||||
endfunction
|
||||
" Constants {{{1
|
||||
|
||||
let s:IGNORE_ERRORS = [
|
||||
\ "<table> lacks \"summary\" attribute",
|
||||
@ -152,29 +139,9 @@ let s:EMPTY_TAGS = [
|
||||
\ ]
|
||||
lockvar! s:EMPTY_TAGS
|
||||
|
||||
function! s:IgnoreError(text)
|
||||
for item in s:IGNORE_ERRORS + g:syntastic_html_tidy_ignore_errors
|
||||
if stridx(a:text, item) != -1
|
||||
return 1
|
||||
endif
|
||||
endfor
|
||||
return 0
|
||||
endfunction
|
||||
" }}}1
|
||||
|
||||
function! s:NewTags(name)
|
||||
return syntastic#util#shescape(join( s:{toupper(a:name)} + g:syntastic_html_tidy_{a:name}, ',' ))
|
||||
endfunction
|
||||
|
||||
function! s:Args()
|
||||
let args = s:TidyEncOptByFenc() .
|
||||
\ ' --new-blocklevel-tags ' . s:NewTags('blocklevel_tags') .
|
||||
\ ' --new-inline-tags ' . s:NewTags('inline_tags') .
|
||||
\ ' --new-empty-tags ' . s:NewTags('empty_tags') .
|
||||
\ ' -e'
|
||||
return args
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_html_tidy_GetLocList() dict
|
||||
function! SyntaxCheckers_html_tidy_GetLocList() dict " {{{1
|
||||
let makeprg = self.makeprgBuild({ 'args_after': s:Args() })
|
||||
|
||||
let errorformat =
|
||||
@ -196,7 +163,52 @@ function! SyntaxCheckers_html_tidy_GetLocList() dict
|
||||
endfor
|
||||
|
||||
return loclist
|
||||
endfunction
|
||||
endfunction " }}}1
|
||||
|
||||
" Utilities {{{1
|
||||
|
||||
" TODO: join this with xhtml.vim for DRY's sake?
|
||||
function! s:TidyEncOptByFenc() " {{{2
|
||||
let TIDY_OPTS = {
|
||||
\ 'utf-8': '-utf8',
|
||||
\ 'ascii': '-ascii',
|
||||
\ 'latin1': '-latin1',
|
||||
\ 'iso-2022-jp': '-iso-2022',
|
||||
\ 'cp1252': '-win1252',
|
||||
\ 'macroman': '-mac',
|
||||
\ 'utf-16le': '-utf16le',
|
||||
\ 'utf-16': '-utf16',
|
||||
\ 'big5': '-big5',
|
||||
\ 'cp932': '-shiftjis',
|
||||
\ 'sjis': '-shiftjis',
|
||||
\ 'cp850': '-ibm858',
|
||||
\ }
|
||||
return get(TIDY_OPTS, &fileencoding, '-utf8')
|
||||
endfunction " }}}2
|
||||
|
||||
function! s:IgnoreError(text) " {{{2
|
||||
for item in s:IGNORE_ERRORS + g:syntastic_html_tidy_ignore_errors
|
||||
if stridx(a:text, item) != -1
|
||||
return 1
|
||||
endif
|
||||
endfor
|
||||
return 0
|
||||
endfunction " }}}2
|
||||
|
||||
function! s:NewTags(name) " {{{2
|
||||
return syntastic#util#shescape(join( s:{toupper(a:name)} + g:syntastic_html_tidy_{a:name}, ',' ))
|
||||
endfunction " }}}2
|
||||
|
||||
function! s:Args() " {{{2
|
||||
let args = s:TidyEncOptByFenc() .
|
||||
\ ' --new-blocklevel-tags ' . s:NewTags('blocklevel_tags') .
|
||||
\ ' --new-inline-tags ' . s:NewTags('inline_tags') .
|
||||
\ ' --new-empty-tags ' . s:NewTags('empty_tags') .
|
||||
\ ' -e'
|
||||
return args
|
||||
endfunction " }}}2
|
||||
|
||||
" }}}1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'html',
|
||||
@ -205,4 +217,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -66,4 +66,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -59,4 +59,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -74,4 +74,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -18,7 +18,11 @@ let g:syntastic_java_javac_maven_pom_tags = ['build', 'properties']
|
||||
let g:syntastic_java_javac_maven_pom_properties = {}
|
||||
let s:has_maven = 0
|
||||
|
||||
" Global Options
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Checker options {{{1
|
||||
|
||||
if !exists('g:syntastic_java_javac_executable')
|
||||
let g:syntastic_java_javac_executable = 'javac'
|
||||
endif
|
||||
@ -43,13 +47,6 @@ if !exists('g:syntastic_java_javac_delete_output')
|
||||
let g:syntastic_java_javac_delete_output = 1
|
||||
endif
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! s:CygwinPath(path)
|
||||
return substitute(system('cygpath -m ' . syntastic#util#shescape(a:path)), "\n", '', 'g')
|
||||
endfunction
|
||||
|
||||
if !exists('g:syntastic_java_javac_temp_dir')
|
||||
let g:syntastic_java_javac_temp_dir = syntastic#util#tmpdir()
|
||||
endif
|
||||
@ -78,32 +75,144 @@ if !exists('g:syntastic_java_javac_maven_pom_classpath')
|
||||
let g:syntastic_java_javac_maven_pom_classpath = {}
|
||||
endif
|
||||
|
||||
function! s:RemoveCarriageReturn(line)
|
||||
" }}}1
|
||||
|
||||
command! SyntasticJavacEditClasspath call s:EditClasspath()
|
||||
|
||||
if g:syntastic_java_javac_config_file_enabled
|
||||
command! SyntasticJavacEditConfig call s:EditConfig()
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_java_javac_IsAvailable() dict " {{{1
|
||||
let s:has_maven = executable(expand(g:syntastic_java_maven_executable, 1))
|
||||
return executable(expand(g:syntastic_java_javac_executable, 1))
|
||||
endfunction " }}}1
|
||||
|
||||
function! SyntaxCheckers_java_javac_GetLocList() dict " {{{1
|
||||
let javac_opts = g:syntastic_java_javac_options
|
||||
|
||||
let output_dir = ''
|
||||
if g:syntastic_java_javac_delete_output
|
||||
let output_dir = g:syntastic_java_javac_temp_dir
|
||||
let javac_opts .= ' -d ' . syntastic#util#shescape(output_dir)
|
||||
endif
|
||||
|
||||
" load classpath from config file
|
||||
if g:syntastic_java_javac_config_file_enabled
|
||||
call s:LoadConfigFile()
|
||||
endif
|
||||
|
||||
|
||||
" add classpathes to javac_classpath {{{2
|
||||
let javac_classpath = ''
|
||||
|
||||
for path in split(g:syntastic_java_javac_classpath, s:ClassSep())
|
||||
if path != ''
|
||||
try
|
||||
let ps = glob(path, 1, 1)
|
||||
catch
|
||||
let ps = split(glob(path, 1), "\n")
|
||||
endtry
|
||||
if type(ps) == type([])
|
||||
for p in ps
|
||||
let javac_classpath = s:AddToClasspath(javac_classpath, p)
|
||||
endfor
|
||||
else
|
||||
let javac_classpath = s:AddToClasspath(javac_classpath, ps)
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
|
||||
if s:has_maven && g:syntastic_java_javac_autoload_maven_classpath
|
||||
if !g:syntastic_java_javac_delete_output
|
||||
let javac_opts .= ' -d ' . syntastic#util#shescape(s:MavenOutputDirectory())
|
||||
endif
|
||||
let javac_classpath = s:AddToClasspath(javac_classpath, s:GetMavenClasspath())
|
||||
endif
|
||||
" }}}2
|
||||
|
||||
" load custom classpath {{{2
|
||||
if g:syntastic_java_javac_custom_classpath_command != ''
|
||||
let lines = system(g:syntastic_java_javac_custom_classpath_command)
|
||||
if syntastic#util#isRunningWindows() || has('win32unix')
|
||||
let lines = substitute(lines, "\r\n", "\n", 'g')
|
||||
endif
|
||||
for l in split(lines, "\n")
|
||||
let javac_classpath = s:AddToClasspath(javac_classpath, l)
|
||||
endfor
|
||||
endif
|
||||
|
||||
if javac_classpath != ''
|
||||
let javac_opts .= ' -cp ' . syntastic#util#shexpand(javac_classpath)
|
||||
endif
|
||||
" }}}2
|
||||
|
||||
let fname = expand('%:p:h', 1) . syntastic#util#Slash() . expand ('%:t', 1)
|
||||
|
||||
if has('win32unix')
|
||||
let fname = s:CygwinPath(fname)
|
||||
endif
|
||||
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': javac_opts,
|
||||
\ 'fname': syntastic#util#shescape(fname) })
|
||||
|
||||
" unashamedly stolen from *errorformat-javac* (quickfix.txt) and modified to include error types
|
||||
let errorformat =
|
||||
\ '%E%f:%l:\ error:\ %m,'.
|
||||
\ '%W%f:%l:\ warning:\ %m,'.
|
||||
\ '%A%f:%l:\ %m,'.
|
||||
\ '%+Z%p^,'.
|
||||
\ '%+C%.%#,'.
|
||||
\ '%-G%.%#'
|
||||
|
||||
if g:syntastic_java_javac_delete_output
|
||||
silent! call mkdir(output_dir, 'p')
|
||||
endif
|
||||
let errors = SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'postprocess': ['cygwinRemoveCR'] })
|
||||
|
||||
if g:syntastic_java_javac_delete_output
|
||||
call syntastic#util#rmrf(output_dir)
|
||||
endif
|
||||
return errors
|
||||
|
||||
endfunction " }}}1
|
||||
|
||||
" Utilities {{{1
|
||||
|
||||
function! s:CygwinPath(path) " {{{2
|
||||
return substitute(system('cygpath -m ' . syntastic#util#shescape(a:path)), "\n", '', 'g')
|
||||
endfunction " }}}2
|
||||
|
||||
function! s:RemoveCarriageReturn(line) " {{{2
|
||||
return substitute(a:line, "\r", '', 'g')
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
function! s:ClassSep()
|
||||
function! s:ClassSep() " {{{2
|
||||
return (syntastic#util#isRunningWindows() || has('win32unix')) ? ';' : ':'
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
function! s:AddToClasspath(classpath, path)
|
||||
function! s:AddToClasspath(classpath, path) " {{{2
|
||||
if a:path == ''
|
||||
return a:classpath
|
||||
endif
|
||||
return (a:classpath != '') ? a:classpath . s:ClassSep() . a:path : a:path
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
function! s:SplitClasspath(classpath)
|
||||
function! s:SplitClasspath(classpath) " {{{2
|
||||
return split(a:classpath, s:ClassSep())
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
function! s:LoadConfigFile()
|
||||
function! s:LoadConfigFile() " {{{2
|
||||
if filereadable(expand(g:syntastic_java_javac_config_file, 1))
|
||||
exe 'source ' . fnameescape(expand(g:syntastic_java_javac_config_file, 1))
|
||||
endif
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
function! s:SaveClasspath()
|
||||
function! s:SaveClasspath() " {{{2
|
||||
" build classpath from lines
|
||||
let path = ''
|
||||
let lines = getline(1, line('$'))
|
||||
@ -135,9 +244,9 @@ function! s:SaveClasspath()
|
||||
" set new classpath
|
||||
let g:syntastic_java_javac_classpath = path
|
||||
let &modified = 0
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
function! s:EditClasspath()
|
||||
function! s:EditClasspath() " {{{2
|
||||
let command = 'syntastic javac classpath'
|
||||
let winnr = bufwinnr('^' . command . '$')
|
||||
if winnr < 0
|
||||
@ -160,9 +269,9 @@ function! s:EditClasspath()
|
||||
else
|
||||
execute winnr . 'wincmd w'
|
||||
endif
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
function! s:SaveConfig()
|
||||
function! s:SaveConfig() " {{{2
|
||||
" get lines
|
||||
let lines = getline(1, line('$'))
|
||||
if g:syntastic_java_javac_config_file_enabled
|
||||
@ -170,9 +279,9 @@ function! s:SaveConfig()
|
||||
call writefile(lines, expand(g:syntastic_java_javac_config_file, 1))
|
||||
endif
|
||||
let &modified = 0
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
function! s:EditConfig()
|
||||
function! s:EditConfig() " {{{2
|
||||
let command = 'syntastic javac config'
|
||||
let winnr = bufwinnr('^' . command . '$')
|
||||
if winnr < 0
|
||||
@ -194,9 +303,9 @@ function! s:EditConfig()
|
||||
else
|
||||
execute winnr . 'wincmd w'
|
||||
endif
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
function! s:GetMavenProperties()
|
||||
function! s:GetMavenProperties() " {{{2
|
||||
let mvn_properties = {}
|
||||
let pom = findfile('pom.xml', '.;')
|
||||
if s:has_maven && filereadable(pom)
|
||||
@ -230,15 +339,9 @@ function! s:GetMavenProperties()
|
||||
return g:syntastic_java_javac_maven_pom_properties[pom]
|
||||
endif
|
||||
return mvn_properties
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
command! SyntasticJavacEditClasspath call s:EditClasspath()
|
||||
|
||||
if g:syntastic_java_javac_config_file_enabled
|
||||
command! SyntasticJavacEditConfig call s:EditConfig()
|
||||
endif
|
||||
|
||||
function! s:GetMavenClasspath()
|
||||
function! s:GetMavenClasspath() " {{{2
|
||||
let pom = findfile('pom.xml', '.;')
|
||||
if s:has_maven && filereadable(pom)
|
||||
if !has_key(g:syntastic_java_javac_maven_pom_ftime, pom) || g:syntastic_java_javac_maven_pom_ftime[pom] != getftime(pom)
|
||||
@ -279,14 +382,9 @@ function! s:GetMavenClasspath()
|
||||
return g:syntastic_java_javac_maven_pom_classpath[pom]
|
||||
endif
|
||||
return ''
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
function! SyntaxCheckers_java_javac_IsAvailable() dict
|
||||
let s:has_maven = executable(expand(g:syntastic_java_maven_executable, 1))
|
||||
return executable(expand(g:syntastic_java_javac_executable, 1))
|
||||
endfunction
|
||||
|
||||
function! s:MavenOutputDirectory()
|
||||
function! s:MavenOutputDirectory() " {{{2
|
||||
let pom = findfile('pom.xml', '.;')
|
||||
if s:has_maven && filereadable(pom)
|
||||
let mvn_properties = s:GetMavenProperties()
|
||||
@ -313,97 +411,9 @@ function! s:MavenOutputDirectory()
|
||||
return output_dir
|
||||
endif
|
||||
return '.'
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
function! SyntaxCheckers_java_javac_GetLocList() dict
|
||||
let javac_opts = g:syntastic_java_javac_options
|
||||
|
||||
let output_dir = ''
|
||||
if g:syntastic_java_javac_delete_output
|
||||
let output_dir = g:syntastic_java_javac_temp_dir
|
||||
let javac_opts .= ' -d ' . syntastic#util#shescape(output_dir)
|
||||
endif
|
||||
|
||||
" load classpath from config file
|
||||
if g:syntastic_java_javac_config_file_enabled
|
||||
call s:LoadConfigFile()
|
||||
endif
|
||||
|
||||
let javac_classpath = ''
|
||||
|
||||
" add classpathes to javac_classpath
|
||||
for path in split(g:syntastic_java_javac_classpath, s:ClassSep())
|
||||
if path != ''
|
||||
try
|
||||
let ps = glob(path, 1, 1)
|
||||
catch
|
||||
let ps = split(glob(path, 1), "\n")
|
||||
endtry
|
||||
if type(ps) == type([])
|
||||
for p in ps
|
||||
let javac_classpath = s:AddToClasspath(javac_classpath, p)
|
||||
endfor
|
||||
else
|
||||
let javac_classpath = s:AddToClasspath(javac_classpath, ps)
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
|
||||
if s:has_maven && g:syntastic_java_javac_autoload_maven_classpath
|
||||
if !g:syntastic_java_javac_delete_output
|
||||
let javac_opts .= ' -d ' . syntastic#util#shescape(s:MavenOutputDirectory())
|
||||
endif
|
||||
let javac_classpath = s:AddToClasspath(javac_classpath, s:GetMavenClasspath())
|
||||
endif
|
||||
|
||||
" load custom classpath
|
||||
if g:syntastic_java_javac_custom_classpath_command != ''
|
||||
let lines = system(g:syntastic_java_javac_custom_classpath_command)
|
||||
if syntastic#util#isRunningWindows() || has('win32unix')
|
||||
let lines = substitute(lines, "\r\n", "\n", 'g')
|
||||
endif
|
||||
for l in split(lines, "\n")
|
||||
let javac_classpath = s:AddToClasspath(javac_classpath, l)
|
||||
endfor
|
||||
endif
|
||||
|
||||
if javac_classpath != ''
|
||||
let javac_opts .= ' -cp ' . syntastic#util#shexpand(javac_classpath)
|
||||
endif
|
||||
|
||||
let fname = expand('%:p:h', 1) . syntastic#util#Slash() . expand ('%:t', 1)
|
||||
|
||||
if has('win32unix')
|
||||
let fname = s:CygwinPath(fname)
|
||||
endif
|
||||
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': javac_opts,
|
||||
\ 'fname': syntastic#util#shescape(fname) })
|
||||
|
||||
" unashamedly stolen from *errorformat-javac* (quickfix.txt) and modified to include error types
|
||||
let errorformat =
|
||||
\ '%E%f:%l:\ error:\ %m,'.
|
||||
\ '%W%f:%l:\ warning:\ %m,'.
|
||||
\ '%A%f:%l:\ %m,'.
|
||||
\ '%+Z%p^,'.
|
||||
\ '%+C%.%#,'.
|
||||
\ '%-G%.%#'
|
||||
|
||||
if g:syntastic_java_javac_delete_output
|
||||
silent! call mkdir(output_dir, 'p')
|
||||
endif
|
||||
let errors = SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'postprocess': ['cygwinRemoveCR'] })
|
||||
|
||||
if g:syntastic_java_javac_delete_output
|
||||
call syntastic#util#rmrf(output_dir)
|
||||
endif
|
||||
return errors
|
||||
|
||||
endfunction
|
||||
" }}}1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'java',
|
||||
@ -412,4 +422,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -73,4 +73,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -61,4 +61,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -53,4 +53,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -42,4 +42,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -41,4 +41,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -61,4 +61,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -45,4 +45,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -48,4 +48,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -48,4 +48,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -40,4 +40,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -38,4 +38,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -63,4 +63,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -41,4 +41,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -47,4 +47,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -43,4 +43,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -54,4 +54,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -36,4 +36,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -62,4 +62,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -64,4 +64,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -42,4 +42,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -38,4 +38,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -38,4 +38,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -22,4 +22,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'name': 'igor',
|
||||
\ 'redirect': 'docbk/igor'})
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -38,4 +38,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -56,4 +56,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -21,4 +21,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'name': 'oclint',
|
||||
\ 'redirect': 'c/oclint'})
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -56,4 +56,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -21,4 +21,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'name': 'oclint',
|
||||
\ 'redirect': 'c/oclint'})
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -24,9 +24,7 @@ endif
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_ocaml_camlp4o_IsAvailable() dict
|
||||
return executable(s:ocamlpp)
|
||||
endfunction
|
||||
" Checker options {{{1
|
||||
|
||||
if !exists('g:syntastic_ocaml_use_ocamlc') || !executable('ocamlc')
|
||||
let g:syntastic_ocaml_use_ocamlc = 0
|
||||
@ -40,7 +38,13 @@ if !exists('g:syntastic_ocaml_use_ocamlbuild') || !executable("ocamlbuild")
|
||||
let g:syntastic_ocaml_use_ocamlbuild = 0
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_ocaml_camlp4o_GetLocList() dict
|
||||
" }}}1
|
||||
|
||||
function! SyntaxCheckers_ocaml_camlp4o_IsAvailable() dict " {{{1
|
||||
return executable(s:ocamlpp)
|
||||
endfunction " }}}1
|
||||
|
||||
function! SyntaxCheckers_ocaml_camlp4o_GetLocList() dict " {{{1
|
||||
let makeprg = s:GetMakeprg()
|
||||
if makeprg == ""
|
||||
return []
|
||||
@ -58,9 +62,11 @@ function! SyntaxCheckers_ocaml_camlp4o_GetLocList() dict
|
||||
\ '%-G+%.%#'
|
||||
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
endfunction " }}}1
|
||||
|
||||
function! s:GetMakeprg()
|
||||
" Utilities {{{1
|
||||
|
||||
function! s:GetMakeprg() " {{{2
|
||||
if g:syntastic_ocaml_use_ocamlc
|
||||
return s:GetOcamlcMakeprg()
|
||||
endif
|
||||
@ -70,9 +76,9 @@ function! s:GetMakeprg()
|
||||
endif
|
||||
|
||||
return s:GetOtherMakeprg()
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
function! s:GetOcamlcMakeprg()
|
||||
function! s:GetOcamlcMakeprg() " {{{2
|
||||
if g:syntastic_ocaml_use_janestreet_core
|
||||
let build_cmd = "ocamlc -I "
|
||||
let build_cmd .= expand(g:syntastic_ocaml_janestreet_core_dir, 1)
|
||||
@ -81,14 +87,14 @@ function! s:GetOcamlcMakeprg()
|
||||
else
|
||||
return "ocamlc -c " . syntastic#util#shexpand('%')
|
||||
endif
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
function! s:GetOcamlBuildMakeprg()
|
||||
function! s:GetOcamlBuildMakeprg() " {{{2
|
||||
return "ocamlbuild -quiet -no-log -tag annot," . s:ocamlpp . " -no-links -no-hygiene -no-sanitize " .
|
||||
\ syntastic#util#shexpand('%:r') . ".cmi"
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
function! s:GetOtherMakeprg()
|
||||
function! s:GetOtherMakeprg() " {{{2
|
||||
"TODO: give this function a better name?
|
||||
"
|
||||
"TODO: should use throw/catch instead of returning an empty makeprg
|
||||
@ -106,7 +112,9 @@ function! s:GetOtherMakeprg()
|
||||
endif
|
||||
|
||||
return makeprg
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
" }}}1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'ocaml',
|
||||
@ -115,4 +123,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -96,4 +96,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user