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

Updated plugins

This commit is contained in:
amix
2016-05-14 12:57:54 +01:00
parent 5f6aa8fe09
commit f343b66088
105 changed files with 2100 additions and 4902 deletions

View File

@ -61,10 +61,11 @@ Handlebars, HSS, HTML, Java, JavaScript, JSON, JSX, LESS, Lex, Limbo, LISP,
LLVM intermediate language, Lua, Markdown, MATLAB, Mercury, NASM, Nix,
Objective-C, Objective-C++, OCaml, Perl, Perl POD, PHP, gettext Portable
Object, OS X and iOS property lists, Pug (formerly Jade), Puppet, Python, QML,
R, Racket, Relax NG, reStructuredText, RPM spec, Ruby, SASS/SCSS, Scala, Slim,
SML, Sphinx, SQL, Stylus, Tcl, TeX, Texinfo, Twig, TypeScript, Vala, Verilog,
VHDL, VimL, xHtml, XML, XSLT, XQuery, YACC, YAML, z80, Zope page templates, and
zsh. See the [wiki][3] for details about the corresponding supported checkers.
R, Racket, RDF TriG, RDF Turtle, Relax NG, reStructuredText, RPM spec, Ruby,
SASS/SCSS, Scala, Slim, SML, Sphinx, SQL, Stylus, Tcl, TeX, Texinfo, Twig,
TypeScript, Vala, Verilog, VHDL, VimL, xHtml, XML, XSLT, XQuery, YACC, YAML,
YANG data models, z80, Zope page templates, and zsh. See the [wiki][3] for
details about the corresponding supported checkers.
A number of third-party Vim plugins also provide checkers for syntastic,
for example: [merlin][30], [omnisharp-vim][25], [rust.vim][12],

View File

@ -89,8 +89,12 @@ function! syntastic#log#debugShowOptions(level, names) abort " {{{2
call s:_logRedirect(1)
let vlist = copy(type(a:names) == type('') ? [a:names] : a:names)
let add_shell = index(vlist, 'shell') >= 0 && &shell !=# syntastic#util#var('shell')
if !empty(vlist)
call map(vlist, "'&' . v:val . ' = ' . strtrans(string(eval('&' . v:val))) . (s:_is_modified(v:val) ? ' (!)' : '')")
if add_shell
call add(vlist, 'u:shell = ' . strtrans(string(syntastic#util#var('shell'))) . ' (!)')
endif
echomsg leader . join(vlist, ', ')
endif
call s:_logRedirect(0)

View File

@ -120,12 +120,14 @@ function! syntastic#util#parseShebang() abort " {{{2
return { 'exe': '', 'args': [] }
endfunction " }}}2
" Get the value of a variable. Allow local variables to override global ones.
" Get the value of a Vim variable. Allow local variables to override global ones.
function! syntastic#util#rawVar(name, ...) abort " {{{2
return get(b:, a:name, get(g:, a:name, a:0 > 0 ? a:1 : ''))
endfunction " }}}2
" Get the value of a syntastic variable. Allow local variables to override global ones.
function! syntastic#util#var(name, ...) abort " {{{2
return
\ exists('b:syntastic_' . a:name) ? b:syntastic_{a:name} :
\ exists('g:syntastic_' . a:name) ? g:syntastic_{a:name} :
\ a:0 > 0 ? a:1 : ''
return call('syntastic#util#rawVar', ['syntastic_' . a:name] + a:000)
endfunction " }}}2
" Parse a version string. Return an array of version components.

View File

@ -1071,11 +1071,17 @@ mode only work with "vim-auto-save" version 0.1.7 or later.
Syntastic can be used along with the "vim-go" Vim plugin (see
https://github.com/fatih/vim-go). However, both "vim-go" and syntastic run
syntax checks by default when you save buffers to disk. To avoid conflicts,
you have to either set passive mode in syntastic for the go filetype (see
you have to either set passive mode in syntastic for the "go" filetype (see
|syntastic_mode_map|), or prevent "vim-go" from showing a quickfix window when
|g:go_fmt_command| fails, by setting |g:go_fmt_fail_silently| to 1. E.g.: >
let g:go_fmt_fail_silently = 1
<
"vim-go" version 1.4 and earlier always uses |quickfix| lists. Starting with
version 1.5, "vim-go" can also use location lists (see |location-list|). To
avoid conflicts with syntastic, you probably want to configure "vim-go" to
stick with |quickfix| lists: >
let g:go_list_type = "quickfix"
<
------------------------------------------------------------------------------
7.11. vim-virtualenv *syntastic-vim-virtualenv*

View File

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

View File

@ -37,7 +37,7 @@ let s:_DEFAULT_CHECKERS = {
\ 'eruby': ['ruby'],
\ 'fortran': ['gfortran'],
\ 'glsl': ['cgc'],
\ 'go': ['go'],
\ 'go': [],
\ 'haml': ['haml'],
\ 'handlebars': ['handlebars'],
\ 'haskell': ['hdevtools', 'hlint'],
@ -90,6 +90,8 @@ let s:_DEFAULT_CHECKERS = {
\ 'tex': ['lacheck', 'chktex'],
\ 'texinfo': ['makeinfo'],
\ 'text': [],
\ 'trig': ['rapper'],
\ 'turtle': ['rapper'],
\ 'twig': ['twiglint'],
\ 'typescript': ['tsc'],
\ 'vala': ['valac'],
@ -102,6 +104,7 @@ let s:_DEFAULT_CHECKERS = {
\ 'xquery': ['basex'],
\ 'yacc': ['bison'],
\ 'yaml': ['jsyaml'],
\ 'yang': ['pyang'],
\ 'z80': ['z80syntaxchecker'],
\ 'zpt': ['zptlint'],
\ 'zsh': ['zsh'],

View File

@ -32,8 +32,8 @@ function! SyntaxCheckers_ada_gcc_GetLocList() dict
\ '%-G%f:%s:,' .
\ '%f:%l:%c: %m,' .
\ '%f:%l: %m',
\ 'main_flags': '-c -x ada -gnats',
\ 'header_flags': '-x ada -gnats',
\ 'main_flags': '-c -x ada -gnats -gnatef',
\ 'header_flags': '-x ada -gnats -gnatef',
\ 'header_names': '\.ads$' })
endfunction

View File

@ -1,7 +1,6 @@
"============================================================================
"File: cuda.vim
"Description: Syntax checking plugin for syntastic.vim
"
"Description: Syntax checking plugin for syntastic
"Author: Hannes Schulz <schulz at ais dot uni-bonn dot de>
"
"============================================================================
@ -15,7 +14,7 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_cuda_nvcc_GetLocList() dict
if exists('g:syntastic_cuda_arch')
if syntastic#util#var('cuda_arch') !=# ''
let arch_flag = '-arch=' . g:syntastic_cuda_arch
else
let arch_flag = ''
@ -41,8 +40,8 @@ function! SyntaxCheckers_cuda_nvcc_GetLocList() dict
\ '%DMaking %*\a in %f,'.
\ '%f|%l| %m'
if expand('%', 1) =~? '\m\%(.h\|.hpp\|.cuh\)$'
if exists('g:syntastic_cuda_check_header')
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 .

View File

@ -18,10 +18,6 @@ let g:loaded_syntastic_go_govet_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_go_govet_IsAvailable() dict
return executable(self.getExec())
endfunction
function! SyntaxCheckers_go_govet_GetLocList() dict
let makeprg = self.getExecEscaped() . ' vet'

View File

@ -20,7 +20,7 @@ let s:ghc_mod_new = -1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_haskell_ghc_mod_IsAvailable() dict
function! SyntaxCheckers_haskell_ghc_mod_IsAvailable() dict " {{{1
if !executable(self.getExec())
return 0
endif
@ -59,9 +59,9 @@ function! SyntaxCheckers_haskell_ghc_mod_IsAvailable() dict
let s:ghc_mod_bailout = syntastic#util#versionIsAtLeast(parsed_ver, [5, 4])
return (s:ghc_mod_new >= 0) && (v:version >= 704 || s:ghc_mod_new) && !s:ghc_mod_bailout
endfunction
endfunction " }}}1
function! SyntaxCheckers_haskell_ghc_mod_GetLocList() dict
function! SyntaxCheckers_haskell_ghc_mod_GetLocList() dict " {{{1
let makeprg = self.makeprgBuild({
\ 'exe': self.getExecEscaped() . ' check' . (s:ghc_mod_new ? ' --boundary=""' : '') })
@ -81,7 +81,7 @@ function! SyntaxCheckers_haskell_ghc_mod_GetLocList() dict
\ 'preprocess': 'iconv',
\ 'postprocess': ['compressWhitespace'],
\ 'returns': [0] })
endfunction
endfunction " }}}1
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'haskell',

View File

@ -0,0 +1,23 @@
"============================================================================
"File: gjslint.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_gjslint_checker')
finish
endif
let g:loaded_syntastic_html_gjslint_checker = 1
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'html',
\ 'name': 'gjslint',
\ 'redirect': 'javascript/gjslint'})
" vim: set sw=4 sts=4 et fdm=marker:

View File

@ -21,7 +21,8 @@ function! SyntaxCheckers_javascript_gjslint_GetLocList() dict
call syntastic#log#deprecationWarn('javascript_gjslint_conf', 'javascript_gjslint_args')
let makeprg = self.makeprgBuild({
\ 'args_after': '--nosummary --unix_mode --nodebug_indentation --nobeep' })
\ 'args': '--nodebug_indentation',
\ 'args_after': '--check_html --nosummary --unix_mode --nobeep' })
let errorformat =
\ "%f:%l:(New Error -%\\?\%n) %m," .

View File

@ -17,7 +17,7 @@ let g:loaded_syntastic_javascript_jsxhint_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_javascript_jsxhint_IsAvailable() dict
function! SyntaxCheckers_javascript_jsxhint_IsAvailable() dict " {{{1
if !executable(self.getExec())
return 0
endif
@ -32,9 +32,9 @@ function! SyntaxCheckers_javascript_jsxhint_IsAvailable() dict
endif
return syntastic#util#versionIsAtLeast(parsed_ver, [0, 4, 1])
endfunction
endfunction " }}}1
function! SyntaxCheckers_javascript_jsxhint_GetLocList() dict
function! SyntaxCheckers_javascript_jsxhint_GetLocList() dict " {{{1
let makeprg = self.makeprgBuild({
\ 'args_after': '--verbose' })
@ -44,7 +44,7 @@ function! SyntaxCheckers_javascript_jsxhint_GetLocList() dict
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'defaults': {'bufnr': bufnr('')} })
endfunction
endfunction " }}}1
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'javascript',

View File

@ -15,10 +15,6 @@ if exists('g:loaded_syntastic_less_lessc_checker')
endif
let g:loaded_syntastic_less_lessc_checker = 1
if !exists('g:syntastic_less_options')
let g:syntastic_less_options = ''
endif
if !exists('g:syntastic_less_use_less_lint')
let g:syntastic_less_use_less_lint = 0
endif
@ -34,13 +30,10 @@ function! SyntaxCheckers_less_lessc_IsAvailable() dict
endfunction
function! SyntaxCheckers_less_lessc_GetLocList() dict
if !exists('s:check_file')
let s:check_file = g:syntastic_less_use_less_lint ? s:node_file : self.getExecEscaped()
endif
call syntastic#log#deprecationWarn('less_options', 'less_lessc_args')
let makeprg = self.makeprgBuild({
\ 'exe': s:check_file,
\ 'args': g:syntastic_less_options,
\ 'exe': (g:syntastic_less_use_less_lint ? s:node_file : self.getExecEscaped()),
\ 'args_after': '--no-color',
\ 'tail': '> ' . syntastic#util#DevNull() })

View File

@ -15,12 +15,6 @@ if exists('g:loaded_syntastic_ocaml_camlp4o_checker')
endif
let g:loaded_syntastic_ocaml_camlp4o_checker = 1
if exists('g:syntastic_ocaml_camlp4r') && g:syntastic_ocaml_camlp4r != 0
let s:ocamlpp='camlp4r'
else
let s:ocamlpp='camlp4o'
endif
let s:save_cpo = &cpo
set cpo&vim
@ -34,6 +28,10 @@ if !exists('g:syntastic_ocaml_use_janestreet_core')
let g:syntastic_ocaml_use_janestreet_core = 0
endif
if !exists('g:syntastic_ocaml_janestreet_core_dir')
let g:syntastic_ocaml_janestreet_core_dir = '.'
endif
if !exists('g:syntastic_ocaml_use_ocamlbuild') || !executable('ocamlbuild')
let g:syntastic_ocaml_use_ocamlbuild = 0
endif
@ -41,6 +39,7 @@ endif
" }}}1
function! SyntaxCheckers_ocaml_camlp4o_IsAvailable() dict " {{{1
let s:ocamlpp = get(g:, 'syntastic_ocaml_camlp4r', 0) ? 'camlp4r' : 'camlp4o'
return executable(s:ocamlpp)
endfunction " }}}1
@ -81,31 +80,22 @@ endfunction " }}}1
" Utilities {{{1
function! s:GetMakeprg() " {{{2
if g:syntastic_ocaml_use_ocamlc
return s:GetOcamlcMakeprg()
endif
if g:syntastic_ocaml_use_ocamlbuild && isdirectory('_build')
return s:GetOcamlBuildMakeprg()
endif
return s:GetOtherMakeprg()
return
\ g:syntastic_ocaml_use_ocamlc ? g:syntastic_ocaml_use_ocamlc :
\ (g:syntastic_ocaml_use_ocamlbuild && isdirectory('_build')) ? s:GetOcamlcMakeprg() :
\ s:GetOtherMakeprg()
endfunction " }}}2
function! s:GetOcamlcMakeprg() " {{{2
if g:syntastic_ocaml_use_janestreet_core
let build_cmd = 'ocamlc -I '
let build_cmd .= expand(g:syntastic_ocaml_janestreet_core_dir, 1)
let build_cmd .= ' -c ' . syntastic#util#shexpand('%')
return build_cmd
else
return 'ocamlc -c ' . syntastic#util#shexpand('%')
endif
let build_cmd = g:syntastic_ocaml_use_janestreet_core ?
\ 'ocamlc -I ' . syntastic#util#shexpand(g:syntastic_ocaml_janestreet_core_dir) : 'ocamlc'
let build_cmd .= ' -c ' . syntastic#util#shexpand('%')
return build_cmd
endfunction " }}}2
function! s:GetOcamlBuildMakeprg() " {{{2
return 'ocamlbuild -quiet -no-log -tag annot,' . s:ocamlpp . ' -no-links -no-hygiene -no-sanitize ' .
\ syntastic#util#shexpand('%:r') . '.cmi'
\ syntastic#util#shexpand('%:r') . '.cmi'
endfunction " }}}2
function! s:GetOtherMakeprg() " {{{2

View File

@ -39,7 +39,7 @@ endif
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_perl_perl_IsAvailable() dict
function! SyntaxCheckers_perl_perl_IsAvailable() dict " {{{1
if !exists('g:syntastic_perl_perl_exec') && exists('g:syntastic_perl_interpreter')
let g:syntastic_perl_perl_exec = g:syntastic_perl_interpreter
endif
@ -48,9 +48,9 @@ function! SyntaxCheckers_perl_perl_IsAvailable() dict
" let g:syntastic_perl_interpreter='/usr/bin/env perl'
silent! call syntastic#util#system(self.getExecEscaped() . ' -e ' . syntastic#util#shescape('exit(0)'))
return v:shell_error == 0
endfunction
endfunction " }}}1
function! SyntaxCheckers_perl_perl_GetLocList() dict
function! SyntaxCheckers_perl_perl_GetLocList() dict " {{{1
if type(g:syntastic_perl_lib_path) == type('')
call syntastic#log#oneTimeWarn('variable g:syntastic_perl_lib_path should be a list')
let includes = split(g:syntastic_perl_lib_path, ',')
@ -81,7 +81,7 @@ function! SyntaxCheckers_perl_perl_GetLocList() dict
\ 'errorformat': errorformat,
\ 'preprocess': 'perl',
\ 'defaults': {'type': 'W'} })
endfunction
endfunction " }}}1
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'perl',

View File

@ -19,7 +19,7 @@ set cpo&vim
let s:pylint_new = -1
function! SyntaxCheckers_python_pylint_IsAvailable() dict
function! SyntaxCheckers_python_pylint_IsAvailable() dict " {{{1
if !executable(self.getExec())
return 0
endif
@ -45,9 +45,9 @@ function! SyntaxCheckers_python_pylint_IsAvailable() dict
endtry
return s:pylint_new >= 0
endfunction
endfunction " }}}1
function! SyntaxCheckers_python_pylint_GetLocList() dict
function! SyntaxCheckers_python_pylint_GetLocList() dict " {{{1
let makeprg = self.makeprgBuild({
\ 'args_after': (s:pylint_new ?
\ '-f text --msg-template="{path}:{line}:{column}:{C}: [{symbol}] {msg}" -r n' :
@ -86,7 +86,7 @@ function! SyntaxCheckers_python_pylint_GetLocList() dict
endfor
return loclist
endfunction
endfunction " }}}1
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'python',

View File

@ -23,6 +23,11 @@ let s:rst2pseudoxml = (executable('rst2pseudoxml.py') && !syntastic#util#isRunni
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_rst_rst2pseudoxml_IsAvailable() dict
call self.log('exec =', self.getExec())
return executable(self.getExec())
endfunction
function! SyntaxCheckers_rst_rst2pseudoxml_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'args_after': '--report=2 --exit-status=1',

View File

@ -43,7 +43,7 @@ function! SyntaxCheckers_scala_scalastyle_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'exe_after': ['-jar', expand(g:syntastic_scala_scalastyle_jar, 1)],
\ 'args_before': ['-q', 'true', '-c', expand(g:syntastic_scala_scalastyle_config_file, 1)] })
\ 'args_before': ['-c', expand(g:syntastic_scala_scalastyle_config_file, 1)] })
let errorformat =
\ '%trror file=%f message=%m line=%l column=%c,' .

View File

@ -11,8 +11,10 @@ let g:loaded_syntastic_sh_shellcheck_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_sh_shellcheck_GetLocList() dict
let makeprg = self.makeprgBuild({ 'args_after': '-f gcc' })
function! SyntaxCheckers_sh_shellcheck_GetLocList() dict " {{{1
let makeprg = self.makeprgBuild({
\ 'args': s:GetShell(),
\ 'args_after': '-f gcc' })
let errorformat =
\ '%f:%l:%c: %trror: %m,' .
@ -32,7 +34,27 @@ function! SyntaxCheckers_sh_shellcheck_GetLocList() dict
endfor
return loclist
endfunction
endfunction " }}}1
" Utilities {{{1
function! s:GetShell() " {{{2
let sh = ''
if syntastic#util#parseShebang()['exe'] ==# ''
if syntastic#util#rawVar('is_kornshell', 0) || syntastic#util#rawVar('is_posix', 0)
let sh = 'ksh'
elseif syntastic#util#rawVar('is_bash', 0)
let sh = 'bash'
elseif syntastic#util#rawVar('is_sh', 0)
let sh = 'sh'
endif
endif
return sh !=# '' ? '-s ' . sh : ''
endfunction " }}}2
" }}}1
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'sh',

View File

@ -0,0 +1,23 @@
"============================================================================
"File: rapper.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Sebastian Tramp <mail@sebastian.tramp.name>
"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_trig_rapper_checker')
finish
endif
let g:loaded_syntastic_trig_rapper_checker = 1
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'trig',
\ 'name': 'rapper',
\ 'redirect': 'turtle/rapper'})
" vim: set sw=4 sts=4 et fdm=marker:

View File

@ -0,0 +1,46 @@
"============================================================================
"File: rapper.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Sebastian Tramp <mail@sebastian.tramp.name>
"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_turtle_rapper_checker')
finish
endif
let g:loaded_syntastic_turtle_rapper_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_turtle_rapper_GetHighlightRegex(item)
let term = matchstr(a:item['text'], '\mFailed to convert qname \zs\S\+\ze to URI')
return term !=# '' ? '\V\<' . escape(term, '\') . '\>' : ''
endfunction
function! SyntaxCheckers_turtle_rapper_GetLocList() dict
let makeprg = self.makeprgBuild({ 'args': '-i guess -q --count' })
let errorformat =
\ 'rapper: %trror - URI file://%f:%l - %m,' .
\ 'rapper: %tarning - URI file://%f:%l - %m'
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'returns': [0, 1] })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'turtle',
\ 'name': 'rapper'})
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: ttl.vim
"Description: turtle syntax checker - using ttl from turtle-validator (npm)
"Maintainer: Antoine Reilles (tonio@NetBSD.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_turtle_ttl_checker')
finish
endif
let g:loaded_syntastic_turtle_ttl_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_turtle_ttl_GetHighlightRegex(item)
let term = matchstr(a:item['text'], '\m"\zs[^"]\+\ze"')
return term !=# '' ? '\V\<' . escape(term, '\') . '\>' : ''
endfunction
function! SyntaxCheckers_turtle_ttl_GetLocList() dict
let makeprg = self.makeprgBuild({})
let errorformat = '%\m[Error: %m %\%%(at%\|on%\) line %l%\%.]'
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'defaults': {'bufnr': bufnr('')} })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'turtle',
\ 'name': 'ttl'})
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set sw=4 sts=4 et fdm=marker:

View File

@ -0,0 +1,46 @@
"============================================================================
"File: pyang.vim
"Description: Syntax checking plugin for syntastic.vim
"Authors: joshua.downer@gmail.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_yang_pyang_checker')
finish
endif
let g:loaded_syntastic_yang_pyang_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_yang_pyang_GetHighlightRegex(item)
let term = matchstr(a:item['text'], '\m"\zs[^"]\+\ze"')
return term != '' ? '\V\<' . escape(term, '\') . '\>' : ''
endfunction
function! SyntaxCheckers_yang_pyang_GetLocList() dict
let makeprg = self.makeprgBuild({})
let errorformat =
\ '%f:%l: %trror: %m,' .
\ '%f:%l: %tarning: %m'
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'postprocess': ['filterForeignErrors'] })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'yang',
\ 'name': 'pyang'})
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set sw=4 sts=4 et fdm=marker: