mirror of
https://github.com/gryf/.vim.git
synced 2025-12-17 19:40:29 +01:00
Plugins update
This commit is contained in:
@@ -28,9 +28,11 @@ if !exists("g:syntastic_phpcs_disable")
|
||||
let g:syntastic_phpcs_disable = 0
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_php_Term(item)
|
||||
function! SyntaxCheckers_php_GetHighlightRegex(item)
|
||||
let unexpected = matchstr(a:item['text'], "unexpected '[^']\\+'")
|
||||
if len(unexpected) < 1 | return '' | end
|
||||
if len(unexpected) < 1
|
||||
return ''
|
||||
endif
|
||||
return '\V'.split(unexpected, "'")[1]
|
||||
endfunction
|
||||
|
||||
@@ -38,7 +40,7 @@ function! SyntaxCheckers_php_GetLocList()
|
||||
|
||||
let errors = []
|
||||
|
||||
let makeprg = "php -l ".shellescape(expand('%'))
|
||||
let makeprg = "php -l -d error_reporting=E_PARSE -d display_errors=0 -d error_log='' ".shellescape(expand('%'))
|
||||
let errorformat='%-GNo syntax errors detected in%.%#,PHP Parse error: %#syntax %trror\, %m in %f on line %l,PHP Fatal %trror: %m in %f on line %l,%-GErrors parsing %.%#,%-G\s%#,Parse error: %#syntax %trror\, %m in %f on line %l,Fatal %trror: %m in %f on line %l'
|
||||
let errors = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
|
||||
@@ -46,8 +48,6 @@ function! SyntaxCheckers_php_GetLocList()
|
||||
let errors = errors + s:GetPHPCSErrors()
|
||||
endif
|
||||
|
||||
call SyntasticHighlightErrors(errors, function('SyntaxCheckers_php_Term'))
|
||||
|
||||
return errors
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user