mirror of
https://github.com/amix/vimrc
synced 2025-06-24 07:44:59 +08:00
Updated plugins
This commit is contained in:
@ -19,7 +19,7 @@ if has('reltime')
|
||||
lockvar! g:_SYNTASTIC_START
|
||||
endif
|
||||
|
||||
let g:_SYNTASTIC_VERSION = '3.6.0-44'
|
||||
let g:_SYNTASTIC_VERSION = '3.6.0-57'
|
||||
lockvar g:_SYNTASTIC_VERSION
|
||||
|
||||
" Sanity checks {{{1
|
||||
@ -42,13 +42,17 @@ endfor
|
||||
let s:_running_windows = syntastic#util#isRunningWindows()
|
||||
lockvar s:_running_windows
|
||||
|
||||
if !exists('g:syntastic_shell')
|
||||
let g:syntastic_shell = &shell
|
||||
endif
|
||||
|
||||
if s:_running_windows
|
||||
let g:_SYNTASTIC_UNAME = 'Windows'
|
||||
elseif executable('uname')
|
||||
try
|
||||
let g:_SYNTASTIC_UNAME = split(system('uname'), "\n")[0]
|
||||
let g:_SYNTASTIC_UNAME = split(syntastic#util#system('uname'), "\n")[0]
|
||||
catch /\m^Vim\%((\a\+)\)\=:E484/
|
||||
call syntastic#log#error("your shell " . &shell . " can't handle traditional UNIX syntax for redirections")
|
||||
call syntastic#log#error("your shell " . syntastic#util#var('shell') . " can't handle traditional UNIX syntax for redirections")
|
||||
finish
|
||||
catch /\m^Vim\%((\a\+)\)\=:E684/
|
||||
let g:_SYNTASTIC_UNAME = 'Unknown'
|
||||
@ -67,7 +71,6 @@ let g:_SYNTASTIC_DEFAULTS = {
|
||||
\ 'always_populate_loc_list': 0,
|
||||
\ 'auto_jump': 0,
|
||||
\ 'auto_loc_list': 2,
|
||||
\ 'bash_hack': 0,
|
||||
\ 'check_on_open': 0,
|
||||
\ 'check_on_wq': 1,
|
||||
\ 'cursor_columns': 1,
|
||||
@ -77,7 +80,7 @@ let g:_SYNTASTIC_DEFAULTS = {
|
||||
\ 'enable_highlighting': 1,
|
||||
\ 'enable_signs': 1,
|
||||
\ 'error_symbol': '>>',
|
||||
\ 'exit_checks': !(s:_running_windows && &shell =~? '\m\<cmd\.exe$'),
|
||||
\ 'exit_checks': !(s:_running_windows && syntastic#util#var('shell', &shell) =~? '\m\<cmd\.exe$'),
|
||||
\ 'filetype_map': {},
|
||||
\ 'full_redraws': !(has('gui_running') || has('gui_macvim')),
|
||||
\ 'id_checkers': 1,
|
||||
@ -86,6 +89,7 @@ let g:_SYNTASTIC_DEFAULTS = {
|
||||
\ 'loc_list_height': 10,
|
||||
\ 'quiet_messages': {},
|
||||
\ 'reuse_loc_lists': 0,
|
||||
\ 'shell': &shell,
|
||||
\ 'sort_aggregated_errors': 1,
|
||||
\ 'stl_format': '[Syntax: line:%F (%t)]',
|
||||
\ 'style_error_symbol': 'S>',
|
||||
@ -463,16 +467,11 @@ function! SyntasticMake(options) abort " {{{2
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, 'SyntasticMake: called with options:', a:options)
|
||||
|
||||
" save options and locale env variables {{{3
|
||||
let old_shellredir = &shellredir
|
||||
let old_local_errorformat = &l:errorformat
|
||||
let old_errorformat = &errorformat
|
||||
let old_cwd = getcwd()
|
||||
let old_lc_messages = $LC_MESSAGES
|
||||
let old_lc_all = $LC_ALL
|
||||
" }}}3
|
||||
|
||||
call s:_bash_hack()
|
||||
|
||||
if has_key(a:options, 'errorformat')
|
||||
let &errorformat = a:options['errorformat']
|
||||
endif
|
||||
@ -491,15 +490,11 @@ function! SyntasticMake(options) abort " {{{2
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
let $LC_MESSAGES = 'C'
|
||||
let $LC_ALL = ''
|
||||
" }}}3
|
||||
|
||||
let err_lines = split(system(a:options['makeprg']), "\n", 1)
|
||||
let err_lines = split(syntastic#util#system(a:options['makeprg']), "\n", 1)
|
||||
|
||||
" restore environment variables {{{3
|
||||
let $LC_ALL = old_lc_all
|
||||
let $LC_MESSAGES = old_lc_messages
|
||||
if len(env_save)
|
||||
for key in keys(env_save)
|
||||
execute 'let $' . key . ' = ' . string(env_save[key])
|
||||
@ -547,7 +542,6 @@ function! SyntasticMake(options) abort " {{{2
|
||||
" restore options {{{3
|
||||
let &errorformat = old_errorformat
|
||||
let &l:errorformat = old_local_errorformat
|
||||
let &shellredir = old_shellredir
|
||||
" }}}3
|
||||
|
||||
if !s:_running_windows && (s:_os_name() =~? "FreeBSD" || s:_os_name() =~? "OpenBSD")
|
||||
@ -666,24 +660,6 @@ function! s:_add_to_errors(errors, options) abort " {{{2
|
||||
return a:errors
|
||||
endfunction " }}}2
|
||||
|
||||
" XXX: Is this still needed?
|
||||
" The script changes &shellredir to stop the screen
|
||||
" flicking when shelling out to syntax checkers.
|
||||
function! s:_bash_hack() abort " {{{2
|
||||
if g:syntastic_bash_hack
|
||||
if !exists('s:shell_is_bash')
|
||||
let s:shell_is_bash =
|
||||
\ !s:_running_windows &&
|
||||
\ (s:_os_name() !~# "FreeBSD") && (s:_os_name() !~# "OpenBSD") &&
|
||||
\ &shell =~# '\m\<bash$'
|
||||
endif
|
||||
|
||||
if s:shell_is_bash
|
||||
let &shellredir = '&>'
|
||||
endif
|
||||
endif
|
||||
endfunction " }}}2
|
||||
|
||||
function! s:_os_name() abort " {{{2
|
||||
return g:_SYNTASTIC_UNAME
|
||||
endfunction " }}}2
|
||||
|
@ -80,10 +80,16 @@ function! g:SyntasticChecker.getLocListRaw() abort " {{{2
|
||||
let name = self._filetype . '/' . self._name
|
||||
try
|
||||
let list = self._locListFunc()
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, 'getLocList: checker ' . name . ' returned ' . v:shell_error)
|
||||
if self._exec != ''
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, 'getLocList: checker ' . name . ' returned ' . v:shell_error)
|
||||
endif
|
||||
catch /\m\C^Syntastic: checker error$/
|
||||
let list = []
|
||||
call syntastic#log#error('checker ' . name . ' returned abnormal status ' . v:shell_error)
|
||||
if self._exec != ''
|
||||
call syntastic#log#error('checker ' . name . ' returned abnormal status ' . v:shell_error)
|
||||
else
|
||||
call syntastic#log#error('checker ' . name . ' aborted')
|
||||
endif
|
||||
endtry
|
||||
call self._populateHighlightRegexes(list)
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_LOCLIST, name . ' raw:', list)
|
||||
@ -98,7 +104,7 @@ endfunction " }}}2
|
||||
function! g:SyntasticChecker.getVersion(...) abort " {{{2
|
||||
if !exists('self._version')
|
||||
let command = a:0 ? a:1 : self.getExecEscaped() . ' --version'
|
||||
let version_output = system(command)
|
||||
let version_output = syntastic#util#system(command)
|
||||
call self.log('getVersion: ' . string(command) . ': ' .
|
||||
\ string(split(version_output, "\n", 1)) .
|
||||
\ (v:shell_error ? ' (exit code ' . v:shell_error . ')' : '') )
|
||||
|
@ -6,93 +6,94 @@ let g:loaded_syntastic_registry = 1
|
||||
" Initialisation {{{1
|
||||
|
||||
let s:_DEFAULT_CHECKERS = {
|
||||
\ 'actionscript':['mxmlc'],
|
||||
\ 'ada': ['gcc'],
|
||||
\ 'applescript': ['osacompile'],
|
||||
\ 'asciidoc': ['asciidoc'],
|
||||
\ 'asm': ['gcc'],
|
||||
\ 'bro': ['bro'],
|
||||
\ 'bemhtml': ['bemhtmllint'],
|
||||
\ 'c': ['gcc'],
|
||||
\ 'cabal': ['cabal'],
|
||||
\ 'chef': ['foodcritic'],
|
||||
\ 'co': ['coco'],
|
||||
\ 'cobol': ['cobc'],
|
||||
\ 'coffee': ['coffee', 'coffeelint'],
|
||||
\ 'coq': ['coqtop'],
|
||||
\ 'cpp': ['gcc'],
|
||||
\ 'cs': ['mcs'],
|
||||
\ 'css': ['csslint'],
|
||||
\ 'cucumber': ['cucumber'],
|
||||
\ 'cuda': ['nvcc'],
|
||||
\ 'd': ['dmd'],
|
||||
\ 'dart': ['dartanalyzer'],
|
||||
\ 'docbk': ['xmllint'],
|
||||
\ 'dustjs': ['swiffer'],
|
||||
\ 'elixir': [],
|
||||
\ 'erlang': ['escript'],
|
||||
\ 'eruby': ['ruby'],
|
||||
\ 'fortran': ['gfortran'],
|
||||
\ 'glsl': ['cgc'],
|
||||
\ 'go': ['go'],
|
||||
\ 'haml': ['haml'],
|
||||
\ 'handlebars': ['handlebars'],
|
||||
\ 'haskell': ['ghc_mod', 'hdevtools', 'hlint'],
|
||||
\ 'haxe': ['haxe'],
|
||||
\ 'hss': ['hss'],
|
||||
\ 'html': ['tidy'],
|
||||
\ 'java': ['javac'],
|
||||
\ 'javascript': ['jshint', 'jslint'],
|
||||
\ 'json': ['jsonlint', 'jsonval'],
|
||||
\ 'less': ['lessc'],
|
||||
\ 'lex': ['flex'],
|
||||
\ 'limbo': ['limbo'],
|
||||
\ 'lisp': ['clisp'],
|
||||
\ 'llvm': ['llvm'],
|
||||
\ 'lua': ['luac'],
|
||||
\ 'markdown': ['mdl'],
|
||||
\ 'matlab': ['mlint'],
|
||||
\ 'nasm': ['nasm'],
|
||||
\ 'nroff': ['mandoc'],
|
||||
\ 'objc': ['gcc'],
|
||||
\ 'objcpp': ['gcc'],
|
||||
\ 'ocaml': ['camlp4o'],
|
||||
\ 'perl': ['perlcritic'],
|
||||
\ 'php': ['php', 'phpcs', 'phpmd'],
|
||||
\ 'po': ['msgfmt'],
|
||||
\ 'pod': ['podchecker'],
|
||||
\ 'puppet': ['puppet', 'puppetlint'],
|
||||
\ 'python': ['python', 'flake8', 'pylint'],
|
||||
\ 'r': [],
|
||||
\ 'racket': ['racket'],
|
||||
\ 'rnc': ['rnv'],
|
||||
\ 'rst': ['rst2pseudoxml'],
|
||||
\ 'ruby': ['mri'],
|
||||
\ 'sass': ['sass'],
|
||||
\ 'scala': ['fsc', 'scalac'],
|
||||
\ 'scss': ['sass', 'scss_lint'],
|
||||
\ 'sh': ['sh', 'shellcheck'],
|
||||
\ 'slim': ['slimrb'],
|
||||
\ 'sml': ['smlnj'],
|
||||
\ 'spec': ['rpmlint'],
|
||||
\ 'tcl': ['nagelfar'],
|
||||
\ 'tex': ['lacheck', 'chktex'],
|
||||
\ 'texinfo': ['makeinfo'],
|
||||
\ 'text': [],
|
||||
\ 'twig': ['twiglint'],
|
||||
\ 'typescript': ['tsc'],
|
||||
\ 'vala': ['valac'],
|
||||
\ 'verilog': ['verilator'],
|
||||
\ 'vhdl': ['ghdl'],
|
||||
\ 'vim': ['vimlint'],
|
||||
\ 'xhtml': ['tidy'],
|
||||
\ 'xml': ['xmllint'],
|
||||
\ 'xslt': ['xmllint'],
|
||||
\ 'yacc': ['bison'],
|
||||
\ 'yaml': ['jsyaml'],
|
||||
\ 'z80': ['z80syntaxchecker'],
|
||||
\ 'zpt': ['zptlint'],
|
||||
\ 'zsh': ['zsh', 'shellcheck'],
|
||||
\ 'actionscript': ['mxmlc'],
|
||||
\ 'ada': ['gcc'],
|
||||
\ 'apiblueprint': ['snowcrash'],
|
||||
\ 'applescript': ['osacompile'],
|
||||
\ 'asciidoc': ['asciidoc'],
|
||||
\ 'asm': ['gcc'],
|
||||
\ 'bro': ['bro'],
|
||||
\ 'bemhtml': ['bemhtmllint'],
|
||||
\ 'c': ['gcc'],
|
||||
\ 'cabal': ['cabal'],
|
||||
\ 'chef': ['foodcritic'],
|
||||
\ 'co': ['coco'],
|
||||
\ 'cobol': ['cobc'],
|
||||
\ 'coffee': ['coffee', 'coffeelint'],
|
||||
\ 'coq': ['coqtop'],
|
||||
\ 'cpp': ['gcc'],
|
||||
\ 'cs': ['mcs'],
|
||||
\ 'css': ['csslint'],
|
||||
\ 'cucumber': ['cucumber'],
|
||||
\ 'cuda': ['nvcc'],
|
||||
\ 'd': ['dmd'],
|
||||
\ 'dart': ['dartanalyzer'],
|
||||
\ 'docbk': ['xmllint'],
|
||||
\ 'dustjs': ['swiffer'],
|
||||
\ 'elixir': [],
|
||||
\ 'erlang': ['escript'],
|
||||
\ 'eruby': ['ruby'],
|
||||
\ 'fortran': ['gfortran'],
|
||||
\ 'glsl': ['cgc'],
|
||||
\ 'go': ['go'],
|
||||
\ 'haml': ['haml'],
|
||||
\ 'handlebars': ['handlebars'],
|
||||
\ 'haskell': ['ghc_mod', 'hdevtools', 'hlint'],
|
||||
\ 'haxe': ['haxe'],
|
||||
\ 'hss': ['hss'],
|
||||
\ 'html': ['tidy'],
|
||||
\ 'java': ['javac'],
|
||||
\ 'javascript': ['jshint', 'jslint'],
|
||||
\ 'json': ['jsonlint', 'jsonval'],
|
||||
\ 'less': ['lessc'],
|
||||
\ 'lex': ['flex'],
|
||||
\ 'limbo': ['limbo'],
|
||||
\ 'lisp': ['clisp'],
|
||||
\ 'llvm': ['llvm'],
|
||||
\ 'lua': ['luac'],
|
||||
\ 'markdown': ['mdl'],
|
||||
\ 'matlab': ['mlint'],
|
||||
\ 'nasm': ['nasm'],
|
||||
\ 'nroff': ['mandoc'],
|
||||
\ 'objc': ['gcc'],
|
||||
\ 'objcpp': ['gcc'],
|
||||
\ 'ocaml': ['camlp4o'],
|
||||
\ 'perl': ['perlcritic'],
|
||||
\ 'php': ['php', 'phpcs', 'phpmd'],
|
||||
\ 'po': ['msgfmt'],
|
||||
\ 'pod': ['podchecker'],
|
||||
\ 'puppet': ['puppet', 'puppetlint'],
|
||||
\ 'python': ['python', 'flake8', 'pylint'],
|
||||
\ 'r': [],
|
||||
\ 'racket': ['racket'],
|
||||
\ 'rnc': ['rnv'],
|
||||
\ 'rst': ['rst2pseudoxml'],
|
||||
\ 'ruby': ['mri'],
|
||||
\ 'sass': ['sass'],
|
||||
\ 'scala': ['fsc', 'scalac'],
|
||||
\ 'scss': ['sass', 'scss_lint'],
|
||||
\ 'sh': ['sh', 'shellcheck'],
|
||||
\ 'slim': ['slimrb'],
|
||||
\ 'sml': ['smlnj'],
|
||||
\ 'spec': ['rpmlint'],
|
||||
\ 'tcl': ['nagelfar'],
|
||||
\ 'tex': ['lacheck', 'chktex'],
|
||||
\ 'texinfo': ['makeinfo'],
|
||||
\ 'text': [],
|
||||
\ 'twig': ['twiglint'],
|
||||
\ 'typescript': ['tsc'],
|
||||
\ 'vala': ['valac'],
|
||||
\ 'verilog': ['verilator'],
|
||||
\ 'vhdl': ['ghdl'],
|
||||
\ 'vim': ['vimlint'],
|
||||
\ 'xhtml': ['tidy'],
|
||||
\ 'xml': ['xmllint'],
|
||||
\ 'xslt': ['xmllint'],
|
||||
\ 'yacc': ['bison'],
|
||||
\ 'yaml': ['jsyaml'],
|
||||
\ 'z80': ['z80syntaxchecker'],
|
||||
\ 'zpt': ['zptlint'],
|
||||
\ 'zsh': ['zsh', 'shellcheck'],
|
||||
\ }
|
||||
lockvar! s:_DEFAULT_CHECKERS
|
||||
|
||||
|
Reference in New Issue
Block a user