mirror of
https://github.com/amix/vimrc
synced 2025-06-23 23:15:01 +08:00
Updated plugins
This commit is contained in:
@ -37,13 +37,19 @@ function! syntastic#util#system(command) abort " {{{2
|
||||
let $LC_MESSAGES = 'C'
|
||||
let $LC_ALL = ''
|
||||
|
||||
let cmd_start = reltime()
|
||||
let out = system(a:command)
|
||||
let cmd_time = split(reltimestr(reltime(cmd_start)))[0]
|
||||
|
||||
let $LC_ALL = old_lc_all
|
||||
let $LC_MESSAGES = old_lc_messages
|
||||
|
||||
let &shell = old_shell
|
||||
|
||||
if exists('g:_SYNTASTIC_DEBUG_TRACE')
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, 'system: command run in ' . cmd_time . 's')
|
||||
endif
|
||||
|
||||
return out
|
||||
endfunction " }}}2
|
||||
|
||||
|
@ -19,7 +19,7 @@ if has('reltime')
|
||||
lockvar! g:_SYNTASTIC_START
|
||||
endif
|
||||
|
||||
let g:_SYNTASTIC_VERSION = '3.7.0-137'
|
||||
let g:_SYNTASTIC_VERSION = '3.7.0-144'
|
||||
lockvar g:_SYNTASTIC_VERSION
|
||||
|
||||
" Sanity checks {{{1
|
||||
@ -522,7 +522,7 @@ function! SyntasticMake(options) abort " {{{2
|
||||
let env_save = {}
|
||||
if has_key(a:options, 'env') && len(a:options['env'])
|
||||
for key in keys(a:options['env'])
|
||||
if key =~? '\m^[a-z_]\+$'
|
||||
if key =~? '\m^[a-z_][a-z0-9_]*$'
|
||||
execute 'let env_save[' . string(key) . '] = $' . key
|
||||
execute 'let $' . key . ' = ' . string(a:options['env'][key])
|
||||
endif
|
||||
|
@ -91,6 +91,7 @@ function! g:SyntasticChecker.getExecEscaped() abort " {{{2
|
||||
endfunction " }}}2
|
||||
|
||||
function! g:SyntasticChecker.getLocListRaw() abort " {{{2
|
||||
let checker_start = reltime()
|
||||
let name = self._filetype . '/' . self._name
|
||||
|
||||
if has_key(self, '_enable')
|
||||
@ -128,6 +129,8 @@ function! g:SyntasticChecker.getLocListRaw() abort " {{{2
|
||||
call self._populateHighlightRegexes(list)
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_LOCLIST, name . ' raw:', list)
|
||||
call self._quietMessages(list)
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE,
|
||||
\ 'getLocList: checker ' . name . ' run in ' . split(reltimestr(reltime(checker_start)))[0] . 's')
|
||||
return list
|
||||
endfunction " }}}2
|
||||
|
||||
|
@ -28,7 +28,9 @@ endfunction
|
||||
function! SyntaxCheckers_ansible_ansible_lint_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '-p' })
|
||||
|
||||
let errorformat = '%f:%l: [ANSIBLE%n] %m'
|
||||
let errorformat =
|
||||
\ '%f:%l: [EANSIBLE%n] %m,' .
|
||||
\ '%f:%l: [ANSIBLE%n] %m'
|
||||
|
||||
let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' }
|
||||
|
||||
|
@ -10,19 +10,41 @@ if exists('g:loaded_syntastic_cuda_nvcc_checker')
|
||||
endif
|
||||
let g:loaded_syntastic_cuda_nvcc_checker = 1
|
||||
|
||||
if !exists('g:syntastic_cuda_config_file')
|
||||
let g:syntastic_cuda_config_file = '.syntastic_cuda_config'
|
||||
endif
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_cuda_nvcc_GetLocList() dict
|
||||
if syntastic#util#var('cuda_arch') !=# ''
|
||||
let arch_flag = '-arch=' . g:syntastic_cuda_arch
|
||||
else
|
||||
let arch_flag = ''
|
||||
let arch_flag = syntastic#util#var('cuda_arch')
|
||||
if arch_flag !=# ''
|
||||
let arch_flag = '-arch=' . arch_flag
|
||||
call syntastic#log#oneTimeWarn('variable g:syntastic_cuda_arch is deprecated, ' .
|
||||
\ 'please add ' . string(arch_flag) . ' to g:syntastic_cuda_nvcc_args instead')
|
||||
endif
|
||||
let makeprg =
|
||||
\ self.getExecEscaped() . ' ' . arch_flag .
|
||||
\ ' --cuda -O0 -I . -Xcompiler -fsyntax-only ' .
|
||||
\ syntastic#util#shexpand('%') . ' ' . syntastic#c#NullOutput()
|
||||
|
||||
let build_opts = {}
|
||||
let dummy = ''
|
||||
if index(['h', 'hpp', 'cuh'], expand('%:e', 1), 0, 1) >= 0
|
||||
if syntastic#util#var('cuda_check_header', 0)
|
||||
let dummy = expand('%:p:h', 1) . syntastic#util#Slash() . '.syntastic_dummy.cu'
|
||||
let build_opts = {
|
||||
\ 'exe_before': 'echo > ' . syntastic#util#shescape(dummy) . ' ;',
|
||||
\ 'fname_before': '.syntastic_dummy.cu -include' }
|
||||
else
|
||||
return []
|
||||
endif
|
||||
endif
|
||||
|
||||
call extend(build_opts, {
|
||||
\ 'args_before': arch_flag . ' --cuda -O0 -I .',
|
||||
\ 'args': syntastic#c#ReadConfig(g:syntastic_cuda_config_file),
|
||||
\ 'args_after': '-Xcompiler -fsyntax-only',
|
||||
\ 'tail_after': syntastic#c#NullOutput() })
|
||||
|
||||
let makeprg = self.makeprgBuild(build_opts)
|
||||
|
||||
let errorformat =
|
||||
\ '%*[^"]"%f"%*\D%l: %m,'.
|
||||
@ -40,19 +62,13 @@ function! SyntaxCheckers_cuda_nvcc_GetLocList() dict
|
||||
\ '%DMaking %*\a in %f,'.
|
||||
\ '%f|%l| %m'
|
||||
|
||||
if index(['h', 'hpp', 'cuh'], expand('%:e', 1), 0, 1) >= 0
|
||||
if syntastic#util#var('cuda_check_header', 0)
|
||||
let makeprg =
|
||||
\ 'echo > .syntastic_dummy.cu ; ' .
|
||||
\ self.getExecEscaped() . ' ' . arch_flag .
|
||||
\ ' --cuda -O0 -I . .syntastic_dummy.cu -Xcompiler -fsyntax-only -include ' .
|
||||
\ syntastic#util#shexpand('%') . ' ' . syntastic#c#NullOutput()
|
||||
else
|
||||
return []
|
||||
endif
|
||||
let loclist = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
|
||||
if dummy !=# ''
|
||||
call delete(dummy)
|
||||
endif
|
||||
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
return loclist
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
|
23
sources_non_forked/syntastic/syntax_checkers/html/eslint.vim
Normal file
23
sources_non_forked/syntastic/syntax_checkers/html/eslint.vim
Normal file
@ -0,0 +1,23 @@
|
||||
"============================================================================
|
||||
"File: eslint.vim
|
||||
"Description: Syntax checking plugin for syntastic
|
||||
"Maintainer: LCD 47 <lcd047 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_html_eslint_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_html_eslint_checker = 1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'html',
|
||||
\ 'name': 'eslint',
|
||||
\ 'redirect': 'javascript/eslint'})
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
@ -42,7 +42,8 @@ endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'racket',
|
||||
\ 'name': 'racket'})
|
||||
\ 'name': 'racket',
|
||||
\ 'enable': 'enable_racket_racket_checker' })
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
Reference in New Issue
Block a user