1
0
mirror of https://github.com/amix/vimrc synced 2025-06-24 07:44:59 +08:00

Updated plugins

This commit is contained in:
amix
2014-08-03 23:02:51 +01:00
parent b92f0f2eb1
commit 2a9908e4f0
88 changed files with 2839 additions and 2014 deletions

View File

@ -0,0 +1,26 @@
"============================================================================
"File: avrgcc.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: Karel <karelishere at gmail dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
"============================================================================
if exists('g:loaded_syntastic_arduino_avrgcc_checker')
finish
endif
let g:loaded_syntastic_arduino_avrgcc_checker = 1
runtime! syntax_checkers/c/*.vim
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'c',
\ 'name': 'avrgcc',
\ 'exec': 'avr-gcc',
\ 'redirect': 'c/avrgcc'})
" vim: set et sts=4 sw=4:

View File

@ -53,3 +53,5 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set et sts=4 sw=4:

View File

@ -24,6 +24,11 @@ function! SyntaxCheckers_elixir_elixir_IsAvailable() dict
endfunction
function! SyntaxCheckers_elixir_elixir_GetLocList() dict
if !exists('g:syntastic_enable_elixir_checker') || !g:syntastic_enable_elixir_checker
call syntastic#log#error('checker elixir/elixir: checks disabled for security reasons; ' .
\ 'set g:syntastic_enable_elixir_checker to 1 to override')
return []
endif
let make_options = {}
let compile_command = 'elixir'

View File

@ -30,7 +30,7 @@ function! SyntaxCheckers_erlang_escript_GetLocList() dict
endif
let shebang = syntastic#util#parseShebang()
if shebang['exe'] =~# '\m\<escript$' || (shebang['exe'] ==# '/usr/bin/env' && shebang['args'][0] ==# 'escript')
if shebang['exe'] ==# 'escript'
let args = '-s'
let post_args = ''
else

View File

@ -38,3 +38,5 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set et sts=4 sw=4:

View File

@ -22,24 +22,14 @@ function! SyntaxCheckers_eruby_ruby_IsAvailable() dict
if !exists('g:syntastic_eruby_ruby_exec') && exists('g:syntastic_ruby_exec')
let g:syntastic_eruby_ruby_exec = g:syntastic_ruby_exec
endif
let s:exe = self.getExec()
if executable(s:exe)
let s:exe = syntastic#util#shescape(s:exe)
if !syntastic#util#isRunningWindows()
let s:exe = 'RUBYOPT= ' . s:exe
endif
return 1
endif
return 0
return executable(self.getExec())
endfunction
function! SyntaxCheckers_eruby_ruby_GetLocList() dict
let fname = "'" . escape(expand('%'), "\\'") . "'"
" TODO: encodings became useful in ruby 1.9 :)
if syntastic#util#versionIsAtLeast(syntastic#util#getVersion(s:exe . ' --version'), [1, 9])
if syntastic#util#versionIsAtLeast(syntastic#util#getVersion(self.getExecEscaped(). ' --version'), [1, 9])
let enc = &fileencoding != '' ? &fileencoding : &encoding
let encoding_spec = ', :encoding => "' . (enc ==? 'utf-8' ? 'UTF-8' : 'BINARY') . '"'
else
@ -48,11 +38,11 @@ function! SyntaxCheckers_eruby_ruby_GetLocList() dict
"gsub fixes issue #7, rails has it's own eruby syntax
let makeprg =
\ s:exe . ' -rerb -e ' .
\ self.getExecEscaped() . ' -rerb -e ' .
\ syntastic#util#shescape('puts ERB.new(File.read(' .
\ fname . encoding_spec .
\ ').gsub(''<%='',''<%''), nil, ''-'').src') .
\ ' | ' . s:exe . ' -c'
\ ' | ' . self.getExecEscaped() . ' -c'
let errorformat =
\ '%-GSyntax OK,'.
@ -61,9 +51,12 @@ function! SyntaxCheckers_eruby_ruby_GetLocList() dict
\ '%Z%p^,'.
\ '%-C%.%#'
let env = syntastic#util#isRunningWindows() ? {} : { 'RUBYOPT': '' }
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'env': env,
\ 'defaults': { 'bufnr': bufnr(""), 'vcol': 1 } })
endfunction

View File

@ -31,6 +31,8 @@ function! SyntaxCheckers_html_jshint_GetLocList() dict
let errorformat = '%A%f: line %l\, col %v\, %m \(%t%*\d\)'
call self.setWantSort(1)
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,

View File

@ -186,9 +186,7 @@ function! s:Args()
endfunction
function! SyntaxCheckers_html_tidy_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'args_after': s:Args(),
\ 'tail': '2>&1' })
let makeprg = self.makeprgBuild({ 'args_after': s:Args() })
let errorformat =
\ '%Wline %l column %v - Warning: %m,' .

View File

@ -399,8 +399,7 @@ function! SyntaxCheckers_java_javac_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'args': javac_opts,
\ 'fname': syntastic#util#shescape(fname),
\ 'tail': '2>&1' })
\ 'fname': syntastic#util#shescape(fname) })
" unashamedly stolen from *errorformat-javac* (quickfix.txt) and modified to include error types
let errorformat =

View File

@ -40,6 +40,8 @@ function! SyntaxCheckers_javascript_jshint_GetLocList() dict
\ '%A%f: line %l\, col %v\, %m \(%t%*\d\)' :
\ '%E%f: line %l\, col %v\, %m'
call self.setWantSort(1)
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,

View File

@ -19,8 +19,7 @@ function! SyntaxCheckers_python_flake8_GetHighlightRegex(item)
endfunction
function! SyntaxCheckers_python_flake8_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'exe_before': (syntastic#util#isRunningWindows() ? '' : 'TERM=dumb') })
let makeprg = self.makeprgBuild({})
let errorformat =
\ '%E%f:%l: could not compile,%-Z%p^,' .
@ -28,9 +27,12 @@ function! SyntaxCheckers_python_flake8_GetLocList() dict
\ '%A%f:%l: %t%n %m,' .
\ '%-G%.%#'
let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' }
let loclist = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat })
\ 'errorformat': errorformat,
\ 'env': env })
for e in loclist
" E*** and W*** are pep8 errors

View File

@ -19,9 +19,7 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_python_frosted_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'exe_before': (syntastic#util#isRunningWindows() ? '' : 'TERM=dumb'),
\ 'args_after': '-vb' })
let makeprg = self.makeprgBuild({ 'args_after': '-vb' })
let errorformat =
\ '%f:%l:%c:%m,' .
@ -29,9 +27,12 @@ function! SyntaxCheckers_python_frosted_GetLocList() dict
\ '%-Z%p^,' .
\ '%-G%.%#'
let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' }
let loclist = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'env': env,
\ 'returns': [0, 1] })
for e in loclist

View File

@ -19,8 +19,7 @@ function! SyntaxCheckers_python_pep257_GetLocList() dict
\ self.getExecEscaped() . ' --version'), [0, 3])
endif
let makeprg = self.makeprgBuild({
\ 'exe_before': (syntastic#util#isRunningWindows() ? '' : 'TERM=dumb') })
let makeprg = self.makeprgBuild({})
if s:pep257_new
let errorformat =
@ -33,9 +32,12 @@ function! SyntaxCheckers_python_pep257_GetLocList() dict
\ '%+C %m'
endif
let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' }
let loclist = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'env': env,
\ 'subtype': 'Style',
\ 'preprocess': 'killEmpty',
\ 'postprocess': ['compressWhitespace'] })

View File

@ -21,14 +21,16 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_python_pep8_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'exe_before': (syntastic#util#isRunningWindows() ? '' : 'TERM=dumb') })
let makeprg = self.makeprgBuild({})
let errorformat = '%f:%l:%c: %m'
let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' }
let loclist = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'env': env,
\ 'subtype': 'Style' })
for e in loclist

View File

@ -14,14 +14,16 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_python_py3kwarn_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'exe_before': (syntastic#util#isRunningWindows() ? '' : 'TERM=dumb') })
let makeprg = self.makeprgBuild({})
let errorformat = '%W%f:%l:%c: %m'
let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' }
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat })
\ 'errorformat': errorformat,
\ 'env': env })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({

View File

@ -40,8 +40,7 @@ function! SyntaxCheckers_python_pyflakes_GetHighlightRegex(i)
endfunction
function! SyntaxCheckers_python_pyflakes_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'exe_before': (syntastic#util#isRunningWindows() ? '' : 'TERM=dumb') })
let makeprg = self.makeprgBuild({})
let errorformat =
\ '%E%f:%l: could not compile,'.
@ -50,9 +49,12 @@ function! SyntaxCheckers_python_pyflakes_GetLocList() dict
\ '%E%f:%l: %m,'.
\ '%-G%.%#'
let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' }
let loclist = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'env': env,
\ 'defaults': {'text': "Syntax error"} })
for e in loclist

View File

@ -23,18 +23,19 @@ function! SyntaxCheckers_python_pylama_GetHighlightRegex(item)
endfunction
function! SyntaxCheckers_python_pylama_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'exe_before': (syntastic#util#isRunningWindows() ? '' : 'TERM=dumb'),
\ 'args_after': '-f pep8' })
let makeprg = self.makeprgBuild({ 'args_after': '-f pep8' })
" TODO: "WARNING:pylama:..." messages are probably a logging bug
let errorformat =
\ '%-GWARNING:pylama:%.%#,' .
\ '%A%f:%l:%c: %m'
let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' }
let loclist = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat })
\ 'errorformat': errorformat,
\ 'env': env })
" adjust for weirdness in each checker
for e in loclist

View File

@ -23,7 +23,6 @@ endfunction
function! SyntaxCheckers_python_pylint_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'exe_before': (syntastic#util#isRunningWindows() ? '' : 'TERM=dumb'),
\ 'args_after': (s:pylint_new ? '-f text --msg-template="{path}:{line}:{column}:{C}: [{symbol}] {msg}" -r n' : '-f parseable -r n -i y') })
let errorformat =
@ -33,9 +32,12 @@ function! SyntaxCheckers_python_pylint_GetLocList() dict
\ '%-Z%p^%.%#,' .
\ '%-G%.%#'
let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' }
let loclist = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'env': env,
\ 'returns': range(32) })
for e in loclist

View File

@ -26,15 +26,16 @@ function! SyntaxCheckers_python_python_IsAvailable() dict
endfunction
function! SyntaxCheckers_python_python_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'exe_before': (syntastic#util#isRunningWindows() ? '' : 'TERM=dumb'),
\ 'exe': [self.getExec(), s:compiler] })
let makeprg = self.makeprgBuild({ 'exe': [self.getExec(), s:compiler] })
let errorformat = '%E%f:%l:%c: %m'
let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' }
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'env': env,
\ 'returns': [0] })
endfunction

View File

@ -20,7 +20,6 @@ set cpo&vim
function! SyntaxCheckers_ruby_jruby_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'exe_before': (syntastic#util#isRunningWindows() ? '' : 'RUBYOPT='),
\ 'args': (syntastic#util#isRunningWindows() ? '-T1' : ''),
\ 'args_after': '-W1 -c' })
@ -33,9 +32,12 @@ function! SyntaxCheckers_ruby_jruby_GetLocList() dict
\ '%W%f:%l: %m,'.
\ '%-C%.%#'
let env = syntastic#util#isRunningWindows() ? {} : { 'RUBYOPT': '' }
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat })
\ 'errorformat': errorformat,
\ 'env': env })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({

View File

@ -18,9 +18,7 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_ruby_macruby_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'exe_before': 'RUBYOPT=',
\ 'args_after': '-W1 -c' })
let makeprg = self.makeprgBuild({ 'args_after': '-W1 -c' })
let errorformat =
\ '%-GSyntax OK,'.
@ -31,9 +29,12 @@ function! SyntaxCheckers_ruby_macruby_GetLocList() dict
\ '%W%f:%l: %m,'.
\ '%-C%.%#'
let env = { 'RUBYOPT': '' }
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat })
\ 'errorformat': errorformat,
\ 'env': env })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({

View File

@ -35,9 +35,7 @@ function! SyntaxCheckers_ruby_mri_GetHighlightRegex(i)
endfunction
function! SyntaxCheckers_ruby_mri_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'exe_before': (syntastic#util#isRunningWindows() ? '' : 'RUBYOPT='),
\ 'args_after': '-w -T1 -c' })
let makeprg = self.makeprgBuild({ 'args_after': '-w -T1 -c' })
"this is a hack to filter out a repeated useless warning in rspec files
"containing lines like
@ -62,9 +60,12 @@ function! SyntaxCheckers_ruby_mri_GetLocList() dict
\ '%W%f:%l: %m,'.
\ '%-C%.%#'
let env = syntastic#util#isRunningWindows() ? {} : { 'RUBYOPT': '' }
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat })
\ 'errorformat': errorformat,
\ 'env': env })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({

View File

@ -53,7 +53,7 @@ function! SyntaxCheckers_vim_vimlint_GetLocList() dict
" value 3: the message is a warning
"
" References: :help vimlint-errorcode and :help vimlint-variables
return vimlint#vimlint(expand('%'), {
let param = {
\ 'output': function('s:vimlintOutput'),
\ 'quiet': 1,
\ 'EVL102': 3,
@ -63,7 +63,16 @@ function! SyntaxCheckers_vim_vimlint_GetLocList() dict
\ 'EVL106': 3,
\ 'EVL201': 3,
\ 'EVL204': 3,
\ 'EVL205': 3 })
\ 'EVL205': 3 }
if exists('g:syntastic_vimlint_options')
if type(g:syntastic_vimlint_options) == type({})
let options = filter(copy(g:syntastic_vimlint_options), 'v:key =~# "\\m^EVL"')
call extend(param, options, 'force')
endif
endif
return vimlint#vimlint(expand('%'), param)
endfunction
" @vimlint(EVL103, 1, a:filename)