mirror of
https://github.com/amix/vimrc
synced 2025-06-23 23:15:01 +08:00
Updated plugins
This commit is contained in:
@ -97,9 +97,9 @@ let errorformat =
|
||||
\ '%-G%.%#'
|
||||
```
|
||||
|
||||
[bug_tracker]: https://github.com/scrooloose/syntastic/issues
|
||||
[manual]: https://github.com/scrooloose/syntastic/blob/master/doc/syntastic.txt
|
||||
[github]: https://github.com/scrooloose/syntastic
|
||||
[bug_tracker]: https://github.com/vim-syntastic/syntastic/issues
|
||||
[manual]: https://github.com/vim-syntastic/syntastic/blob/master/doc/syntastic.txt
|
||||
[github]: https://github.com/vim-syntastic/syntastic
|
||||
[branches]: https://github.com/dchelimsky/rspec/wiki/Topic-Branches#using-topic-branches-when-contributing-patches
|
||||
[variables]: http://www.refactoring.com/catalog/extractVariable.html
|
||||
[guide]: https://github.com/scrooloose/syntastic/wiki/Syntax-Checker-Guide
|
||||
[guide]: https://github.com/vim-syntastic/syntastic/wiki/Syntax-Checker-Guide
|
||||
|
@ -49,11 +49,12 @@
|
||||
|
||||
## 1\. Introduction
|
||||
|
||||
Syntastic is a syntax checking plugin for [Vim][vim] that runs files through
|
||||
external syntax checkers and displays any resulting errors to the user. This
|
||||
can be done on demand, or automatically as files are saved. If syntax errors
|
||||
are detected, the user is notified and is happy because they didn't have to
|
||||
compile their code or execute their script to find them.
|
||||
Syntastic is a syntax checking plugin for [Vim][vim] created by
|
||||
[Martin Grenfell][scrooloose]. It runs files through external syntax checkers
|
||||
and displays any resulting errors to the user. This can be done on demand, or
|
||||
automatically as files are saved. If syntax errors are detected, the user is
|
||||
notified and is happy because they didn't have to compile their code or execute
|
||||
their script to find them.
|
||||
|
||||
At the time of this writing, syntastic has checking plugins for ACPI
|
||||
Source Language, ActionScript, Ada, Ansible configurations, API Blueprint,
|
||||
@ -153,7 +154,7 @@ You now have pathogen installed and can put syntastic into `~/.vim/bundle` like
|
||||
this:
|
||||
```sh
|
||||
cd ~/.vim/bundle && \
|
||||
git clone --depth=1 https://github.com/scrooloose/syntastic.git
|
||||
git clone --depth=1 https://github.com/vim-syntastic/syntastic.git
|
||||
```
|
||||
Quit vim and start it back up to reload it, then type:
|
||||
```vim
|
||||
@ -501,15 +502,16 @@ plugins that provide more functionality than syntastic. You might want to take
|
||||
a look at [ghcmod-vim][ghcmod], [jedi-vim][jedi], [python-mode][python_mode], [vim-go][vimgo], or
|
||||
[YouCompleteMe][ycm].
|
||||
|
||||
[screenshot]: https://github.com/scrooloose/syntastic/raw/master/_assets/screenshot_1.png
|
||||
[scrooloose]: https://github.com/scrooloose
|
||||
[screenshot]: https://github.com/vim-syntastic/syntastic/raw/master/_assets/screenshot_1.png
|
||||
|
||||
[bug_tracker]: https://github.com/scrooloose/syntastic/issues
|
||||
[checkers]: https://github.com/scrooloose/syntastic/blob/master/doc/syntastic-checkers.txt
|
||||
[bug_tracker]: https://github.com/vim-syntastic/syntastic/issues
|
||||
[checkers]: https://github.com/vim-syntastic/syntastic/blob/master/doc/syntastic-checkers.txt
|
||||
[crystal]: https://github.com/rhysd/vim-crystal
|
||||
[eastwood]: https://github.com/venantius/vim-eastwood
|
||||
[ghcmod]: https://github.com/eagletmt/ghcmod-vim
|
||||
[google_group]: https://groups.google.com/group/vim-syntastic
|
||||
[guide]: https://github.com/scrooloose/syntastic/wiki/Syntax-Checker-Guide
|
||||
[guide]: https://github.com/vim-syntastic/syntastic/wiki/Syntax-Checker-Guide
|
||||
[jedi]: https://github.com/davidhalter/jedi-vim
|
||||
[merlin]: https://github.com/the-lambda-church/merlin
|
||||
[myint]: https://github.com/myint/syntastic-extras
|
||||
|
@ -37,8 +37,24 @@ function! syntastic#util#system(command) abort " {{{2
|
||||
let $LC_MESSAGES = 'C'
|
||||
let $LC_ALL = ''
|
||||
|
||||
let crashed = 0
|
||||
let cmd_start = reltime()
|
||||
let out = system(a:command)
|
||||
try
|
||||
let out = system(a:command)
|
||||
catch
|
||||
let crashed = 1
|
||||
call syntastic#log#error('exception running system(' . string(a:command) . '): ' . v:exception)
|
||||
if syntastic#util#isRunningWindows()
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_CHECKERS, '$TMP = ' . string($TMP) . ', $TEMP = ' . string($TEMP))
|
||||
else
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_CHECKERS, '$TERM = ' . string($TERM))
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_CHECKERS, '$TMPDIR = ' . string($TMPDIR))
|
||||
endif
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, '$PATH = ' . string($PATH))
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, 'getcwd() = ' . string(getcwd()))
|
||||
call syntastic#log#debugShowOptions(g:_SYNTASTIC_DEBUG_TRACE, g:_SYNTASTIC_SHELL_OPTIONS)
|
||||
let out = ''
|
||||
endtry
|
||||
let cmd_time = split(reltimestr(reltime(cmd_start)))[0]
|
||||
|
||||
let $LC_ALL = old_lc_all
|
||||
@ -46,7 +62,7 @@ function! syntastic#util#system(command) abort " {{{2
|
||||
|
||||
let &shell = old_shell
|
||||
|
||||
if exists('g:_SYNTASTIC_DEBUG_TRACE')
|
||||
if !crashed && exists('g:_SYNTASTIC_DEBUG_TRACE')
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, 'system: command run in ' . cmd_time . 's')
|
||||
endif
|
||||
|
||||
|
@ -2009,7 +2009,7 @@ Security~
|
||||
|
||||
This checker executes the code in the files it checks:
|
||||
|
||||
https://github.com/scrooloose/syntastic/issues/1141
|
||||
https://github.com/vim-syntastic/syntastic/issues/1141
|
||||
|
||||
This is probably fine if you wrote the files yourself, but it can be a problem
|
||||
if you're trying to check third party files. If you are 100% willing to let
|
||||
@ -2277,6 +2277,13 @@ Type: string
|
||||
Default: unset
|
||||
Additional arguments to pass to "cgc".
|
||||
|
||||
Note~
|
||||
|
||||
You probably also need a plugin to set |filetype| for OpenGL files, such as
|
||||
"vim-glsl":
|
||||
|
||||
https://github.com/tikhomirov/vim-glsl
|
||||
|
||||
==============================================================================
|
||||
SYNTAX CHECKERS FOR GO *syntastic-checkers-go*
|
||||
|
||||
@ -2385,7 +2392,7 @@ Maintainer: Kamil Kisiel <kamil@kamilkisiel.net>
|
||||
|
||||
See the tool's documentation for details:
|
||||
|
||||
https://godoc.org/golang.org/x/tools/cmd/vet
|
||||
https://godoc.org/cmd/vet
|
||||
|
||||
Note~
|
||||
|
||||
@ -5123,7 +5130,7 @@ Security~
|
||||
|
||||
This checker executes the code in the files it checks:
|
||||
|
||||
https://github.com/scrooloose/syntastic/issues/1773
|
||||
https://github.com/vim-syntastic/syntastic/issues/1773
|
||||
|
||||
This is probably fine if you wrote the files yourself, but it can be a problem
|
||||
if you're trying to check third party files. If you are 100% willing to let
|
||||
@ -6010,7 +6017,7 @@ Maintainer: LCD 47 <lcd047@gmail.com>
|
||||
"Stylint" is a linter for Stylus (http://learnboost.github.io/stylus). See
|
||||
the project's page at GitHub for details:
|
||||
|
||||
https://github.com/rossPatton/stylint
|
||||
https://github.com/SimenB/stylint
|
||||
|
||||
Checker options~
|
||||
|
||||
|
@ -85,7 +85,7 @@ Take a look at the list of supported filetypes and checkers: |syntastic-checkers
|
||||
Note: This doc only deals with using syntastic. To learn how to write syntax
|
||||
checker integrations, see the guide on the GitHub wiki:
|
||||
|
||||
https://github.com/scrooloose/syntastic/wiki/Syntax-Checker-Guide
|
||||
https://github.com/vim-syntastic/syntastic/wiki/Syntax-Checker-Guide
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
1.1. Quick start *syntastic-quickstart*
|
||||
@ -1196,7 +1196,7 @@ The core maintainers of syntastic are:
|
||||
|
||||
Find the latest version of syntastic at:
|
||||
|
||||
http://github.com/scrooloose/syntastic
|
||||
http://github.com/vim-syntastic/syntastic
|
||||
|
||||
==============================================================================
|
||||
9. License *syntastic-license*
|
||||
|
@ -19,7 +19,7 @@ if has('reltime')
|
||||
lockvar! g:_SYNTASTIC_START
|
||||
endif
|
||||
|
||||
let g:_SYNTASTIC_VERSION = '3.8.0-3'
|
||||
let g:_SYNTASTIC_VERSION = '3.8.0-10'
|
||||
lockvar g:_SYNTASTIC_VERSION
|
||||
|
||||
" Sanity checks {{{1
|
||||
@ -126,7 +126,7 @@ endif
|
||||
|
||||
" Debug {{{1
|
||||
|
||||
let s:_DEBUG_DUMP_OPTIONS = [
|
||||
let g:_SYNTASTIC_SHELL_OPTIONS = [
|
||||
\ 'shell',
|
||||
\ 'shellcmdflag',
|
||||
\ 'shellpipe',
|
||||
@ -142,10 +142,10 @@ for s:feature in [
|
||||
\ ]
|
||||
|
||||
if exists('+' . s:feature)
|
||||
call add(s:_DEBUG_DUMP_OPTIONS, s:feature)
|
||||
call add(g:_SYNTASTIC_SHELL_OPTIONS, s:feature)
|
||||
endif
|
||||
endfor
|
||||
lockvar! s:_DEBUG_DUMP_OPTIONS
|
||||
lockvar! g:_SYNTASTIC_SHELL_OPTIONS
|
||||
|
||||
" debug constants
|
||||
let g:_SYNTASTIC_DEBUG_TRACE = 1
|
||||
@ -231,7 +231,7 @@ function! SyntasticInfo(...) abort " {{{2
|
||||
call s:modemap.modeInfo(a:000)
|
||||
call s:registry.echoInfoFor(a:000)
|
||||
call s:_explain_skip(a:000)
|
||||
call syntastic#log#debugShowOptions(g:_SYNTASTIC_DEBUG_TRACE, s:_DEBUG_DUMP_OPTIONS)
|
||||
call syntastic#log#debugShowOptions(g:_SYNTASTIC_DEBUG_TRACE, g:_SYNTASTIC_SHELL_OPTIONS)
|
||||
call syntastic#log#debugDump(g:_SYNTASTIC_DEBUG_VARIABLES)
|
||||
endfunction " }}}2
|
||||
|
||||
@ -382,7 +382,7 @@ endfunction " }}}2
|
||||
"refresh and redraw all the error info for this buf when saving or reading
|
||||
function! s:UpdateErrors(buf, auto_invoked, checker_names) abort " {{{2
|
||||
call syntastic#log#debugShowVariables(g:_SYNTASTIC_DEBUG_TRACE, 'version')
|
||||
call syntastic#log#debugShowOptions(g:_SYNTASTIC_DEBUG_TRACE, s:_DEBUG_DUMP_OPTIONS)
|
||||
call syntastic#log#debugShowOptions(g:_SYNTASTIC_DEBUG_TRACE, g:_SYNTASTIC_SHELL_OPTIONS)
|
||||
call syntastic#log#debugDump(g:_SYNTASTIC_DEBUG_VARIABLES)
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, 'UpdateErrors' . (a:auto_invoked ? ' (auto)' : '') .
|
||||
\ ': ' . (len(a:checker_names) ? join(a:checker_names) : 'default checkers'))
|
||||
@ -455,7 +455,12 @@ function! s:CacheErrors(buf, checker_names) abort " {{{2
|
||||
if !s:_skip_file(a:buf)
|
||||
" debug logging {{{3
|
||||
call syntastic#log#debugShowVariables(g:_SYNTASTIC_DEBUG_TRACE, 'aggregate_errors')
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_CHECKERS, '$TERM = ' . string($TERM))
|
||||
if syntastic#util#isRunningWindows()
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_CHECKERS, '$TMP = ' . string($TMP) . ', $TEMP = ' . string($TEMP))
|
||||
else
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_CHECKERS, '$TERM = ' . string($TERM))
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_CHECKERS, '$TMPDIR = ' . string($TMPDIR))
|
||||
endif
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_CHECKERS, '$PATH = ' . string($PATH))
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, 'getcwd() = ' . string(getcwd()))
|
||||
" }}}3
|
||||
|
@ -19,13 +19,25 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_stylus_stylint_GetLocList() dict
|
||||
if !exists('s:stylint_new')
|
||||
let s:stylint_new = syntastic#util#versionIsAtLeast(self.getVersion(), [1, 5, 7])
|
||||
endif
|
||||
|
||||
let makeprg = self.makeprgBuild({})
|
||||
|
||||
let errorformat =
|
||||
\ '%WWarning: %m,' .
|
||||
\ '%EError: %m,' .
|
||||
\ '%CFile: %f,' .
|
||||
\ '%CLine: %l:%.%#'
|
||||
if s:stylint_new
|
||||
let errorformat =
|
||||
\ '%P%f,' .
|
||||
\ '%-Q,' .
|
||||
\ '%\m%l:%c%\s%\+%t%\%%(rror%\|arning%\)%\s%\+%m%\s%\+%\S%\+%\s%#,' .
|
||||
\ '%\m%l%\s%\+%t%\%%(rror%\|arning%\)%\s%\+%m%\s%\+%\S%\+%\s%#'
|
||||
else
|
||||
let errorformat =
|
||||
\ '%WWarning: %m,' .
|
||||
\ '%EError: %m,' .
|
||||
\ '%CFile: %f,' .
|
||||
\ '%CLine: %l:%.%#'
|
||||
endif
|
||||
|
||||
return SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
|
Reference in New Issue
Block a user