1
0
mirror of https://github.com/amix/vimrc synced 2025-06-23 23:15:01 +08:00

Updated vim plugins

This commit is contained in:
amix
2017-04-01 13:22:06 +02:00
parent 50ae0a55f6
commit 75beb5f4ba
32 changed files with 704 additions and 238 deletions

View File

@ -98,6 +98,35 @@ function! syntastic#preprocess#dockerfile_lint(errors) abort " {{{2
return out
endfunction " }}}2
function! syntastic#preprocess#dscanner(errors) abort " {{{2
let idx = 0
while idx < len(a:errors) && a:errors[idx][0] !=# '{'
let idx += 1
endwhile
let errs = s:_decode_JSON(join(a:errors[idx :], ''))
let out = []
if type(errs) == type({}) && has_key(errs, 'issues') && type(errs['issues']) == type([])
for issue in errs['issues']
try
call add(out,
\ issue['fileName'] . ':' .
\ issue['line'] . ':' .
\ issue['column'] . ':' .
\ issue['message'] . ' [' . issue['key'] . ']')
catch /\m^Vim\%((\a\+)\)\=:E716/
call syntastic#log#warn('checker d/dscanner: unrecognized error item ' . string(issue))
let out = []
break
endtry
endfor
else
call syntastic#log#warn('checker d/dscanner: unrecognized error format (crashed checker?)')
endif
return out
endfunction " }}}2
function! syntastic#preprocess#flow(errors) abort " {{{2
let idx = 0
while idx < len(a:errors) && a:errors[idx][0] !=# '{'

View File

@ -1755,6 +1755,7 @@ SYNTAX CHECKERS FOR D *syntastic-checkers-d*
The following checkers are available for D (filetype "d"):
1. DMD......................|syntastic-d-dmd|
2. D-Scanner................|syntastic-d-dscanner|
------------------------------------------------------------------------------
1. DMD *syntastic-d-dmd*
@ -1834,6 +1835,22 @@ the usual 'g:syntastic_d_dmd_<option>' variables. The only exception is
'g:syntastic_d_dmd_exec', which can still be used to override the checker's
executable.
------------------------------------------------------------------------------
2. D-Scanner *syntastic-d-dscanner*
Name: dscanner
Maintainer: ANtlord
"D-Scanner" is a tool for analyzing D source code (https://dlang.org/). See
the project's page at GitHub for more information:
https://github.com/Hackerpilot/Dscanner
Checker options~
This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.
==============================================================================
SYNTAX CHECKERS FOR DART *syntastic-checkers-dart*
@ -1934,6 +1951,7 @@ SYNTAX CHECKERS FOR DOCKERFILE *syntastic-checkers-dockerfile*
The following checkers are available for Dockerfile (filetype "dockerfile"):
1. dockerfile-lint..........|syntastic-dockerfile-dockerfile_lint|
2. Hadolint.................|syntastic-dockerfile-hadolint|
------------------------------------------------------------------------------
1. dockerfile-lint *syntastic-dockerfile-dockerfile_lint*
@ -1957,6 +1975,22 @@ Checker options~
This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.
------------------------------------------------------------------------------
2. Hadolint *syntastic-dockerfile-hadolint*
Name: hadolint
Maintainer: Jesper B. Rosenkilde <jbr@humppa.dk>
"Hadolint" is a dockerfile linter written in Haskell. See the project's page
at GitHub for details:
https://github.com/lukasmartinelli/hadolint
Checker options~
This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.
==============================================================================
SYNTAX CHECKERS FOR DUST *syntastic-checkers-dustjs*
@ -4884,59 +4918,11 @@ SYNTAX CHECKERS FOR R *syntastic-checkers-r*
The following checkers are available for R (filetype "r"):
1. lint.....................|syntastic-r-lint|
2. lintr....................|syntastic-r-lintr|
3. svtools..................|syntastic-r-svtools|
1. lintr....................|syntastic-r-lintr|
2. svtools..................|syntastic-r-svtools|
------------------------------------------------------------------------------
1. lint *syntastic-r-lint*
Name: lint
Maintainer: LCD 47 <lcd047@gmail.com>
This is a style checker for R files, using the R package "lint":
http://cran.r-project.org/web/packages/lint/
Checker option~
*'g:syntastic_r_lint_styles'*
Type: string
Default: "lint.style"
R list of style tests to apply.
Set 'g:syntastic_r_lint_styles' to something like this: >
let g:syntastic_r_lint_styles =
\ 'list(spacing.indentation.notabs, spacing.indentation.evenindent)'
<
See "lint"'s manual for possible values:
http://cran.r-project.org/web/packages/lint/lint.pdf
Note~
This checker doesn't call the "makeprgBuild()" function, and thus it ignores
the usual 'g:syntastic_r_lint_<option>' variables. The only exception is
'g:syntastic_r_lint_exec', which can still be used to override the "R"
executable.
Limitations~
The checker uses column numbers only when running into syntax errors. If
you're checking files containing tab characters, then Vim's 'tabstop' must
match R's idea of tabstop, otherwise column numbers will be shifted. At the
time of this writing R's tabstop is hardcoded to 8, so you should probably
add something like this to your vimrc: >
set tabstop=8
<
The "lint" package will only show at most 5 messages of a kind. At the time of
this writing this is not configurable.
Beware also that the checker is pretty slow when using the default style
setting of "lint.style".
------------------------------------------------------------------------------
2. lintr *syntastic-r-lintr*
1. lintr *syntastic-r-lintr*
Name: lintr
Maintainer: Jim Hester <james.f.hester@gmail.com>
@ -4984,7 +4970,7 @@ executable.
See also: |syntastic-rmd-lintr|.
------------------------------------------------------------------------------
3. svtools *syntastic-r-svtools*
2. svtools *syntastic-r-svtools*
Name: svtools
Maintainer: LCD 47 <lcd047@gmail.com>
@ -5953,6 +5939,7 @@ SYNTAX CHECKERS FOR SOLIDITY *syntastic-checkers-solidity*
The following checkers are available for Solidity (filetype "solidity"):
1. solc.....................|syntastic-solidity-solc|
2. Solium...................|syntastic-solidity-solium|
------------------------------------------------------------------------------
1. solc *syntastic-solidity-solc*
@ -5977,6 +5964,27 @@ You probably also need a plugin to set |filetype| for Solidity files, such as
https://github.com/tomlion/vim-solidity
------------------------------------------------------------------------------
2. Solium *syntastic-solidity-solium*
Name: solium
Maintainer: Matthijs van den Bos <matthijs@vandenbos.org>
"Solium" is a linter for "Solidity" files. See the project's page for details:
https://github.com/duaraghav8/Solium
Checker options~
This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.
Note~
You probably also need a plugin to set |filetype| for Solidity files, such as
"vim-solidity":
https://github.com/tomlion/vim-solidity
==============================================================================
SYNTAX CHECKERS FOR SQL *syntastic-checkers-sql*

View File

@ -19,7 +19,7 @@ if has('reltime')
lockvar! g:_SYNTASTIC_START
endif
let g:_SYNTASTIC_VERSION = '3.8.0-26'
let g:_SYNTASTIC_VERSION = '3.8.0-35'
lockvar g:_SYNTASTIC_VERSION
" Sanity checks {{{1

View File

@ -0,0 +1,48 @@
"============================================================================
"File: dscanner.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: ANtlord
"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_d_dscanner_checker')
finish
endif
let g:loaded_syntastic_d_dscanner_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_d_dscanner_GetHighlightRegex(i)
let term = matchstr(a:i['text'], '\m^.\{-}''\zs\S\+\ze''')
return term !=# '' ? '\V\<' . escape(term, '\') . '\>' : ''
endfunction
function! SyntaxCheckers_d_dscanner_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'args_after': '--report',
\ 'tail': '2>' . syntastic#util#DevNull() })
let errorformat = '%f:%l:%c:%m'
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'preprocess': 'dscanner',
\ 'subtype': 'Style',
\ 'returns': [0] })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'd',
\ 'name': 'dscanner' })
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set sw=4 sts=4 et fdm=marker:

View File

@ -0,0 +1,41 @@
"============================================================================
"File: hadolint.vim
"Description: Dockerfile linter written in Haskell
" (http://hadolint.lukasmartinelli.ch/).
"Maintainer: Jesper B. Rosenkilde <jbr at humppa dot dk>
"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_dockerfile_hadolint_checker')
finish
endif
let g:loaded_syntastic_dockerfile_hadolint_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_dockerfile_hadolint_GetLocList() dict
let makeprg = self.makeprgBuild({})
let errorformat = '%W%f:%l %m'
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'subtype': 'Style',
\ 'returns': [0, 1] })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'dockerfile',
\ 'name': 'hadolint'})
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set sw=4 sts=4 et fdm=marker:

View File

@ -0,0 +1,43 @@
"============================================================================
"File: solium.vim
"Description: Solidity syntax checker - using solium
"Maintainer: Matthijs van den Bos <matthijs@vandenbos.org>
"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_solidity_solium_checker')
finish
endif
let g:loaded_syntastic_solidity_solium_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_solidity_solium_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'args_after': '-R gcc',
\ 'fname_before': '--file'})
let errorformat =
\ '%f:%l:%c: %trror: %m,' .
\ '%f:%l:%c: %tarning: %m'
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'returns': [0, 1] })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'solidity',
\ 'name': 'solium'})
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set sw=4 sts=4 et fdm=marker: