mirror of
https://github.com/amix/vimrc
synced 2025-06-23 23:15:01 +08:00
Updated vim plugins
This commit is contained in:
@ -26,20 +26,21 @@
|
||||
4. [FAQ](#faq)
|
||||
4.1. [I installed syntastic but it isn't reporting any errors...](#faqinfo)
|
||||
4.2. [Syntastic supports several checkers for my filetype, how do I tell it which one(s) to use?](#faqcheckers)
|
||||
4.3. [I have enabled multiple checkers for the current filetype. How can I display all errors from all checkers together?](#faqaggregate)
|
||||
4.4. [How can I pass additional arguments to a checker?](#faqargs)
|
||||
4.5. [I run a checker and the location list is not updated...](#faqloclist)
|
||||
4.5. [I run`:lopen` or `:lwindow` and the error window is empty...](#faqloclist)
|
||||
4.6. [How can I jump between the different errors without using the location list at the bottom of the window?](#faqlnext)
|
||||
4.7. [The error window is closed automatically when I `:quit` the current buffer but not when I `:bdelete` it?](#faqbdelete)
|
||||
4.8. [My favourite checker needs to load a configuration file from the project's root rather than the current directory...](#faqconfig)
|
||||
4.9. [What is the difference between syntax checkers and style checkers?](#faqstyle)
|
||||
4.10. [How can I check scripts written for different versions of Python?](#faqpython)
|
||||
4.11. [How can I check scripts written for different versions of Ruby?](#faqruby)
|
||||
4.12. [The `perl` checker has stopped working...](#faqperl)
|
||||
4.13. [What happened to the `rustc` checker?](#faqrust)
|
||||
4.14. [What happened to the `tsc` checker?](#faqtsc)
|
||||
4.15. [What happened to the `xcrun` checker?](#faqxcrun)
|
||||
4.3. [How can I run checkers for "foreign" filetypes against the current file?](#faqforeign)
|
||||
4.4. [I have enabled multiple checkers for the current filetype. How can I display all errors from all checkers together?](#faqaggregate)
|
||||
4.5. [How can I pass additional arguments to a checker?](#faqargs)
|
||||
4.6. [I run a checker and the location list is not updated...](#faqloclist)
|
||||
4.6. [I run`:lopen` or `:lwindow` and the error window is empty...](#faqloclist)
|
||||
4.7. [How can I jump between the different errors without using the location list at the bottom of the window?](#faqlnext)
|
||||
4.8. [The error window is closed automatically when I `:quit` the current buffer but not when I `:bdelete` it?](#faqbdelete)
|
||||
4.9. [My favourite checker needs to load a configuration file from the project's root rather than the current directory...](#faqconfig)
|
||||
4.10. [What is the difference between syntax checkers and style checkers?](#faqstyle)
|
||||
4.11. [How can I check scripts written for different versions of Python?](#faqpython)
|
||||
4.12. [How can I check scripts written for different versions of Ruby?](#faqruby)
|
||||
4.13. [The `perl` checker has stopped working...](#faqperl)
|
||||
4.14. [What happened to the `rustc` checker?](#faqrust)
|
||||
4.15. [What happened to the `tsc` checker?](#faqtsc)
|
||||
4.16. [What happened to the `xcrun` checker?](#faqxcrun)
|
||||
5. [Resources](#otherresources)
|
||||
|
||||
- - -
|
||||
@ -65,9 +66,9 @@ 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, RDF TriG, RDF Turtle, Relax NG,
|
||||
reStructuredText, RPM spec, Ruby, SASS/SCSS, Scala, Slim, SML, Solidity,
|
||||
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 [manual][checkers] for details about the
|
||||
Sphinx, SQL, Stylus, Tcl, TeX, Texinfo, Twig, TypeScript, Vala, Verilog, VHDL,
|
||||
Vim help, VimL, xHtml, XML, XSLT, XQuery, YACC, YAML, YANG data models, z80,
|
||||
Zope page templates, and Zsh. See the [manual][checkers] for details about the
|
||||
corresponding supported checkers (`:help syntastic-checkers` in Vim).
|
||||
|
||||
A number of third-party Vim plugins also provide checkers for syntastic, for
|
||||
@ -264,13 +265,36 @@ For example to run `phpcs` and `phpmd`:
|
||||
```
|
||||
|
||||
This works for any checkers available for the current filetype, even if they
|
||||
aren't listed in `g:syntastic_<filetype>_checkers`. You can't run checkers for
|
||||
"foreign" filetypes though (e.g. you can't run, say, a Python checker if the
|
||||
filetype of the current file is `php`).
|
||||
aren't listed in `g:syntastic_<filetype>_checkers`.
|
||||
|
||||
<a name="faqforeign"></a>
|
||||
|
||||
__4.3. Q. How can I run checkers for "foreign" filetypes against the current
|
||||
file?__
|
||||
|
||||
A. You need to qualify the name of the "foreign" checker with the name
|
||||
of its filetype. For example to check `tex` files with the checker
|
||||
`language_check` (which normally acts only on files of type `text`), you can
|
||||
add `text/language_check` to the list fo checkers for `tex`:
|
||||
```vim
|
||||
let g:syntastic_tex_checkers = ['lacheck', 'text/language_check']
|
||||
```
|
||||
|
||||
This also works with `:SyntasticCheck`, e.g. the following command runs
|
||||
`text/language_check` against the current file regardless of the current
|
||||
filetype:
|
||||
```vim
|
||||
:SyntasticCheck text/language_check
|
||||
```
|
||||
|
||||
Of course, the checkers specified this way need to be known to syntastic, and
|
||||
they need to be shown as available when you run `:SyntasticInfo`. You can't
|
||||
just make up a combination of a filetype and a program name and expect it to
|
||||
work as a checker.
|
||||
|
||||
<a name="faqaggregate"></a>
|
||||
|
||||
__4.3. Q. I have enabled multiple checkers for the current filetype. How can I
|
||||
__4.4. Q. I have enabled multiple checkers for the current filetype. How can I
|
||||
display all errors from all checkers together?__
|
||||
|
||||
A. Set `g:syntastic_aggregate_errors` to 1 in your `vimrc`:
|
||||
@ -282,7 +306,7 @@ See `:help syntastic-aggregating-errors` for more details.
|
||||
|
||||
<a name="faqargs"></a>
|
||||
|
||||
__4.4. Q. How can I pass additional arguments to a checker?__
|
||||
__4.5. Q. How can I pass additional arguments to a checker?__
|
||||
|
||||
A. In most cases a command line is constructed using an internal function
|
||||
named `makeprgBuild()`, which provides a number of options that allow you to
|
||||
@ -306,8 +330,8 @@ list of options should be included in the [manual][checkers]
|
||||
|
||||
<a name="faqloclist"></a>
|
||||
|
||||
__4.5. Q. I run a checker and the location list is not updated...__
|
||||
__4.5. Q. I run`:lopen` or `:lwindow` and the error window is empty...__
|
||||
__4.6. Q. I run a checker and the location list is not updated...__
|
||||
__4.6. Q. I run`:lopen` or `:lwindow` and the error window is empty...__
|
||||
|
||||
A. By default the location list is changed only when you run the `:Errors`
|
||||
command, in order to minimise conflicts with other plugins. If you want the
|
||||
@ -319,7 +343,7 @@ let g:syntastic_always_populate_loc_list = 1
|
||||
|
||||
<a name="faqlnext"></a>
|
||||
|
||||
__4.6. Q. How can I jump between the different errors without using the location
|
||||
__4.7. Q. How can I jump between the different errors without using the location
|
||||
list at the bottom of the window?__
|
||||
|
||||
A. Vim provides several built-in commands for this. See `:help :lnext` and
|
||||
@ -331,7 +355,7 @@ mappings (among other things).
|
||||
|
||||
<a name="faqbdelete"></a>
|
||||
|
||||
__4.7. Q. The error window is closed automatically when I `:quit` the current buffer
|
||||
__4.8. Q. The error window is closed automatically when I `:quit` the current buffer
|
||||
but not when I `:bdelete` it?__
|
||||
|
||||
A. There is no safe way to handle that situation automatically, but you can
|
||||
@ -343,7 +367,7 @@ cabbrev <silent> bd <C-r>=(getcmdtype()==#':' && getcmdpos()==1 ? 'lclose\|bdele
|
||||
|
||||
<a name="faqconfig"></a>
|
||||
|
||||
__4.8. My favourite checker needs to load a configuration file from the
|
||||
__4.9. My favourite checker needs to load a configuration file from the
|
||||
project's root rather than the current directory...__
|
||||
|
||||
A. You can set up an `autocmd` to search for the configuration file in the
|
||||
@ -363,7 +387,7 @@ autocmd FileType javascript let b:syntastic_javascript_jscs_args =
|
||||
|
||||
<a name="faqstyle"></a>
|
||||
|
||||
__4.9. Q. What is the difference between syntax checkers and style checkers?__
|
||||
__4.10. Q. What is the difference between syntax checkers and style checkers?__
|
||||
|
||||
A. The errors and warnings they produce are highlighted differently and can
|
||||
be filtered by different rules, but otherwise the distinction is pretty much
|
||||
@ -393,7 +417,7 @@ See `:help syntastic_quiet_messages` for more information.
|
||||
|
||||
<a name="faqpython"></a>
|
||||
|
||||
__4.10. Q. How can I check scripts written for different versions of Python?__
|
||||
__4.11. Q. How can I check scripts written for different versions of Python?__
|
||||
|
||||
A. Install a Python version manager such as [virtualenv][virtualenv]
|
||||
or [pyenv][pyenv], activate the environment for the relevant version
|
||||
@ -409,7 +433,7 @@ scripts.
|
||||
|
||||
<a name="faqruby"></a>
|
||||
|
||||
__4.11. Q. How can I check scripts written for different versions of Ruby?__
|
||||
__4.12. Q. How can I check scripts written for different versions of Ruby?__
|
||||
|
||||
A. Install a Ruby version manager such as [rvm][rvm] or [rbenv][rbenv],
|
||||
activate the environment for the relevant version of Ruby, and install in it
|
||||
@ -424,7 +448,7 @@ scripts.
|
||||
|
||||
<a name="faqperl"></a>
|
||||
|
||||
__4.12. Q. The `perl` checker has stopped working...__
|
||||
__4.13. Q. The `perl` checker has stopped working...__
|
||||
|
||||
A. The `perl` checker runs `perl -c` against your file, which in turn
|
||||
__executes__ any `BEGIN`, `UNITCHECK`, and `CHECK` blocks, and any `use`
|
||||
@ -440,14 +464,14 @@ let g:syntastic_enable_perl_checker = 1
|
||||
|
||||
<a name="faqrust"></a>
|
||||
|
||||
__4.13. Q. What happened to the `rustc` checker?__
|
||||
__4.14. Q. What happened to the `rustc` checker?__
|
||||
|
||||
A. It is now part of the [rust.vim][rust] plugin. If you install this plugin the
|
||||
checker should be picked up automatically by syntastic.
|
||||
|
||||
<a name="faqtsc"></a>
|
||||
|
||||
__4.14. Q. What happened to the `tsc` checker?__
|
||||
__4.15. Q. What happened to the `tsc` checker?__
|
||||
|
||||
A. It didn't meet people's expectations and it has been removed. The plugin
|
||||
[tsuquyomi][tsuquyomi] comes packaged with a checker for TypeScript. If you
|
||||
@ -455,7 +479,7 @@ install this plugin the checker should be picked up automatically by syntastic.
|
||||
|
||||
<a name="faqxcrun"></a>
|
||||
|
||||
__4.15. Q. What happened to the `xcrun` checker?__
|
||||
__4.16. Q. What happened to the `xcrun` checker?__
|
||||
|
||||
A. The `xcrun` checker used to have a security problem and it has been removed.
|
||||
A better checker for __Swift__ is part of the [vim-swift][swift] plugin. If you
|
||||
|
@ -21,7 +21,7 @@ function! syntastic#log#warn(msg) abort " {{{2
|
||||
endfunction " }}}2
|
||||
|
||||
function! syntastic#log#error(msg) abort " {{{2
|
||||
execute "normal \<Esc>"
|
||||
execute 'normal! \<Esc>'
|
||||
echohl ErrorMsg
|
||||
echomsg 'syntastic: error: ' . a:msg
|
||||
echohl None
|
||||
@ -68,7 +68,7 @@ function! syntastic#log#debug(level, msg, ...) abort " {{{2
|
||||
let leader = s:_log_timestamp()
|
||||
call s:_logRedirect(1)
|
||||
|
||||
if a:0 > 0
|
||||
if a:0
|
||||
" filter out dictionary functions
|
||||
echomsg leader . a:msg . ' ' .
|
||||
\ strtrans(string(type(a:1) == type({}) || type(a:1) == type([]) ?
|
||||
|
@ -102,6 +102,10 @@ function! syntastic#util#rmrf(what) abort " {{{2
|
||||
endif
|
||||
endfunction " }}}2
|
||||
|
||||
function! syntastic#util#getbufvar(buf, name, ...) abort " {{{2
|
||||
return a:0 ? s:_getbufvar(a:buf, a:name, a:1) : getbufvar(a:buf, a:name)
|
||||
endfunction " }}}2
|
||||
|
||||
" Search the first 5 lines of the file for a magic number and return a map
|
||||
" containing the args and the executable
|
||||
"
|
||||
@ -126,9 +130,19 @@ function! syntastic#util#parseShebang() abort " {{{2
|
||||
return { 'exe': '', 'args': [] }
|
||||
endfunction " }}}2
|
||||
|
||||
" Get the value of a Vim variable. Allow buffer variables to override global ones.
|
||||
function! syntastic#util#bufRawVar(buf, name, ...) abort " {{{2
|
||||
return s:_getbufvar(a:buf, a:name, get(g:, a:name, a:0 ? a:1 : ''))
|
||||
endfunction "}}}2
|
||||
|
||||
" Get the value of a syntastic variable. Allow buffer variables to override global ones.
|
||||
function! syntastic#util#bufVar(buf, name, ...) abort " {{{2
|
||||
return call('syntastic#util#bufRawVar', [a:buf, 'syntastic_' . a:name] + a:000)
|
||||
endfunction "}}}2
|
||||
|
||||
" 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 : ''))
|
||||
return get(b:, a:name, get(g:, a:name, a:0 ? a:1 : ''))
|
||||
endfunction " }}}2
|
||||
|
||||
" Get the value of a syntastic variable. Allow local variables to override global ones.
|
||||
@ -165,11 +179,6 @@ function! syntastic#util#compareLexi(a, b) abort " {{{2
|
||||
return 0
|
||||
endfunction " }}}2
|
||||
|
||||
" strwidth() was added in Vim 7.3; if it doesn't exist, we use strlen()
|
||||
" and hope for the best :)
|
||||
let s:_width = function(exists('*strwidth') ? 'strwidth' : 'strlen')
|
||||
lockvar s:_width
|
||||
|
||||
function! syntastic#util#screenWidth(str, tabstop) abort " {{{2
|
||||
let chunks = split(a:str, "\t", 1)
|
||||
let width = s:_width(chunks[-1])
|
||||
@ -391,9 +400,6 @@ function! syntastic#util#setWids() abort " {{{2
|
||||
endfor
|
||||
endfunction " }}}2
|
||||
|
||||
let s:_str2float = function(exists('*str2float') ? 'str2float' : 'str2nr')
|
||||
lockvar s:_str2float
|
||||
|
||||
function! syntastic#util#str2float(val) abort " {{{2
|
||||
return s:_str2float(a:val)
|
||||
endfunction " }}}2
|
||||
@ -515,6 +521,11 @@ function! s:_translateElement(key, term) abort " {{{2
|
||||
return ret
|
||||
endfunction " }}}2
|
||||
|
||||
" strwidth() was added in Vim 7.3; if it doesn't exist, we use strlen()
|
||||
" and hope for the best :)
|
||||
let s:_width = function(exists('*strwidth') ? 'strwidth' : 'strlen')
|
||||
lockvar s:_width
|
||||
|
||||
" @vimlint(EVL103, 1, a:flags)
|
||||
function! s:_delete_dumb(what, flags) abort " {{{2
|
||||
if !exists('s:rmrf')
|
||||
@ -561,6 +572,9 @@ function! s:_rmrf(what) abort " {{{2
|
||||
endif
|
||||
endfunction " }}}2
|
||||
|
||||
let s:_str2float = function(exists('*str2float') ? 'str2float' : 'str2nr')
|
||||
lockvar s:_str2float
|
||||
|
||||
function! s:_float2str_smart(val) abort " {{{2
|
||||
return printf('%.1f', a:val)
|
||||
endfunction " }}}2
|
||||
@ -572,6 +586,18 @@ endfunction " }}}2
|
||||
let s:_float2str = function(has('float') ? 's:_float2str_smart' : 's:_float2str_dumb')
|
||||
lockvar s:_float2str
|
||||
|
||||
function! s:_getbufvar_dumb(buf, name, ...) abort " {{{2
|
||||
let ret = getbufvar(a:buf, a:name)
|
||||
if a:0 && type(ret) == type('') && ret ==# ''
|
||||
unlet! ret
|
||||
let ret = a:1
|
||||
endif
|
||||
return ret
|
||||
endfunction "}}}2
|
||||
|
||||
let s:_getbufvar = function(v:version > 703 || (v:version == 703 && has('patch831')) ? 'getbufvar' : 's:_getbufvar_dumb')
|
||||
lockvar s:_getbufvar
|
||||
|
||||
" }}}1
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
|
@ -117,6 +117,7 @@ SYNTAX CHECKERS BY LANGUAGE *syntastic-checkers-lang*
|
||||
Vala.....................................|syntastic-checkers-vala|
|
||||
Verilog..................................|syntastic-checkers-verilog|
|
||||
VHDL.....................................|syntastic-checkers-vhdl|
|
||||
Vim help.................................|syntastic-checkers-help|
|
||||
VimL.....................................|syntastic-checkers-vim|
|
||||
|
||||
xHTML....................................|syntastic-checkers-xhtml|
|
||||
@ -353,6 +354,7 @@ SYNTAX CHECKERS FOR ASCIIDOC *syntastic-checkers-asciidoc*
|
||||
The following checkers are available for AsciiDoc (filetype "asciidoc"):
|
||||
|
||||
1. Asciidoc.................|syntastic-asciidoc-asciidoc|
|
||||
2. proselint................|syntastic-asciidoc-proselint|
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
1. Asciidoc *syntastic-asciidoc-asciidoc*
|
||||
@ -374,6 +376,27 @@ Checker options~
|
||||
This checker is initialised using the "makeprgBuild()" function and thus it
|
||||
accepts the standard options described at |syntastic-config-makeprg|.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
2. proselint *syntastic-asciidoc-proselint*
|
||||
|
||||
Name: proselint
|
||||
Maintainer: LCD 47 <lcd047@gmail.com>
|
||||
|
||||
"proselint" is a linter for prose. See the page for details:
|
||||
|
||||
http://proselint.com/
|
||||
|
||||
Checker options~
|
||||
|
||||
This checker is initialised using the "makeprgBuild()" function and thus it
|
||||
accepts the standard options described at |syntastic-config-makeprg|.
|
||||
|
||||
See also: |syntastic-help-proselint|, |syntastic-html-proselint|,
|
||||
|syntastic-markdown-proselint|, |syntastic-nroff-proselint|,
|
||||
|syntastic-pod-proselint|, |syntastic-rst-proselint|,
|
||||
|syntastic-tex-proselint|, |syntastic-texinfo-proselint|,
|
||||
|syntastic-text-proselint|, |syntastic-xhtml-proselint|.
|
||||
|
||||
==============================================================================
|
||||
SYNTAX CHECKERS FOR ASSEMBLY LANGUAGES *syntastic-checkers-asm*
|
||||
|
||||
@ -2586,10 +2609,12 @@ The following checkers are available for HTML (filetype "html"):
|
||||
1. ESLint...................|syntastic-html-eslint|
|
||||
2. gjslint..................|syntastic-html-gjslint|
|
||||
3. HTML tidy................|syntastic-html-tidy|
|
||||
4. JSHint...................|syntastic-html-jshint|
|
||||
5. textlint.................|syntastic-html-textlint|
|
||||
6. Validator................|syntastic-html-validator|
|
||||
7. W3.......................|syntastic-html-w3|
|
||||
4. HTMLHint.................|syntastic-html-htmlhint|
|
||||
5. JSHint...................|syntastic-html-jshint|
|
||||
6. proselint................|syntastic-html-proselint|
|
||||
7. textlint.................|syntastic-html-textlint|
|
||||
8. Validator................|syntastic-html-validator|
|
||||
9. W3.......................|syntastic-html-w3|
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
1. ESLint *syntastic-html-eslint*
|
||||
@ -2679,7 +2704,25 @@ List of additional empty tags, to be added to "--new-empty-tags".
|
||||
See also: |syntastic-xhtml-tidy|.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
4. jshint *syntastic-html-jshint*
|
||||
4. HTMLHint *syntastic-html-htmlhint*
|
||||
|
||||
Name: HTMLHint
|
||||
Maintainer: LCD 47 <lcd047@gmail.com>
|
||||
|
||||
"JSHint" is a static code analysis tool for HTML. See the project's page for
|
||||
details:
|
||||
|
||||
http://htmlhint.com/
|
||||
|
||||
Syntastic requires "HTMLHint" version 0.9.13 or later.
|
||||
|
||||
Checker options~
|
||||
|
||||
This checker is initialised using the "makeprgBuild()" function and thus it
|
||||
accepts the standard options described at |syntastic-config-makeprg|.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
5. jshint *syntastic-html-jshint*
|
||||
|
||||
Name: JSHint
|
||||
Maintainer: LCD 47 <lcd047@gmail.com>
|
||||
@ -2725,7 +2768,28 @@ in "JSHint". If that is undesirable, your only other option is to leave
|
||||
See also: |syntastic-javascript-jshint|, |syntastic-xhtml-jshint|.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
5. textlint *syntastic-html-textlint*
|
||||
6. proselint *syntastic-html-proselint*
|
||||
|
||||
Name: proselint
|
||||
Maintainer: LCD 47 <lcd047@gmail.com>
|
||||
|
||||
"proselint" is a linter for prose. See the page for details:
|
||||
|
||||
http://proselint.com/
|
||||
|
||||
Checker options~
|
||||
|
||||
This checker is initialised using the "makeprgBuild()" function and thus it
|
||||
accepts the standard options described at |syntastic-config-makeprg|.
|
||||
|
||||
See also: |syntastic-asciidoc-proselint|, |syntastic-help-proselint|,
|
||||
|syntastic-markdown-proselint|, |syntastic-nroff-proselint|,
|
||||
|syntastic-pod-proselint|, |syntastic-rst-proselint|,
|
||||
|syntastic-tex-proselint|, |syntastic-texinfo-proselint|,
|
||||
|syntastic-text-proselint|, |syntastic-xhtml-proselint|.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
7. textlint *syntastic-html-textlint*
|
||||
|
||||
Name: textlint
|
||||
Maintainer: LCD 47 <lcd047@gmail.com>
|
||||
@ -2750,7 +2814,7 @@ work:
|
||||
See also: |syntastic-markdown-textlint|, |syntastic-text-textlint|.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
6. Validator *syntastic-html-validator*
|
||||
8. Validator *syntastic-html-validator*
|
||||
|
||||
Name: validator
|
||||
Maintainer: LCD 47 <lcd047@gmail.com>
|
||||
@ -2823,7 +2887,7 @@ You can lookup the meaning of these codes in cURL's manual:
|
||||
http://curl.haxx.se/docs/manpage.html#EXIT
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
7. W3 *syntastic-html-w3*
|
||||
9. W3 *syntastic-html-w3*
|
||||
|
||||
Name: w3
|
||||
Maintainer: Martin Grenfell <martin.grenfell@gmail.com>
|
||||
@ -2949,6 +3013,14 @@ Name: javac
|
||||
Maintainers: Jochen Keil <jochen.keil@gmail.com>
|
||||
Dmitry Geurkov <d.geurkov@gmail.com>
|
||||
|
||||
Note~
|
||||
|
||||
This checker is not suitable for use with large Java projects. The design
|
||||
of "javac" makes this checker prone to running into various limitations of
|
||||
your shell, Vim, and your Java compiler. You are strongly advised to use
|
||||
something like Eclim (http://eclim.org/) instead of syntastic for projects of
|
||||
any substantial size or complexity.
|
||||
|
||||
Commands~
|
||||
|
||||
The following commands are available:
|
||||
@ -3684,7 +3756,8 @@ SYNTAX CHECKERS FOR MARKDOWN *syntastic-checkers-markdown*
|
||||
The following checkers are available for Markdown (filetype "markdown"):
|
||||
|
||||
1. Markdown lint tool.......|syntastic-markdown-mdl|
|
||||
2. textlint.................|syntastic-markdown-textlint|
|
||||
2. proselint................|syntastic-markdown-proselint|
|
||||
3. textlint.................|syntastic-markdown-textlint|
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
1. Markdown lint tool *syntastic-markdown-mdl*
|
||||
@ -3721,7 +3794,28 @@ to a set of valid "markdownlint-cli" options): >
|
||||
let g:syntastic_markdown_mdl_args = ""
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
2. textlint *syntastic-markdown-textlint*
|
||||
2. proselint *syntastic-markdown-proselint*
|
||||
|
||||
Name: proselint
|
||||
Maintainer: LCD 47 <lcd047@gmail.com>
|
||||
|
||||
"proselint" is a linter for prose. See the page for details:
|
||||
|
||||
http://proselint.com/
|
||||
|
||||
Checker options~
|
||||
|
||||
This checker is initialised using the "makeprgBuild()" function and thus it
|
||||
accepts the standard options described at |syntastic-config-makeprg|.
|
||||
|
||||
See also: |syntastic-asciidoc-proselint|, |syntastic-help-proselint|,
|
||||
|syntastic-html-proselint|, |syntastic-nroff-proselint|,
|
||||
|syntastic-pod-proselint|, |syntastic-rst-proselint|,
|
||||
|syntastic-tex-proselint|, |syntastic-texinfo-proselint|,
|
||||
|syntastic-text-proselint|, |syntastic-xhtml-proselint|.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
3. textlint *syntastic-markdown-textlint*
|
||||
|
||||
Name: textlint
|
||||
Maintainer: LCD 47 <lcd047@gmail.com>
|
||||
@ -3836,6 +3930,7 @@ The following checkers are available for nroff (filetype "nroff"):
|
||||
|
||||
1. Igor.....................|syntastic-nroff-igor|
|
||||
2. mandoc...................|syntastic-nroff-mandoc|
|
||||
3. proselint................|syntastic-nroff-proselint|
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
1. Igor *syntastic-nroff-igor*
|
||||
@ -3875,6 +3970,27 @@ Checker options~
|
||||
This checker is initialised using the "makeprgBuild()" function and thus it
|
||||
accepts the standard options described at |syntastic-config-makeprg|.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
3. proselint *syntastic-nroff-proselint*
|
||||
|
||||
Name: proselint
|
||||
Maintainer: LCD 47 <lcd047@gmail.com>
|
||||
|
||||
"proselint" is a linter for prose. See the page for details:
|
||||
|
||||
http://proselint.com/
|
||||
|
||||
Checker options~
|
||||
|
||||
This checker is initialised using the "makeprgBuild()" function and thus it
|
||||
accepts the standard options described at |syntastic-config-makeprg|.
|
||||
|
||||
See also: |syntastic-asciidoc-proselint|, |syntastic-help-proselint|,
|
||||
|syntastic-html-proselint|, |syntastic-markdown-proselint|,
|
||||
|syntastic-pod-proselint|, |syntastic-rst-proselint|,
|
||||
|syntastic-tex-proselint|, |syntastic-texinfo-proselint|,
|
||||
|syntastic-text-proselint|, |syntastic-xhtml-proselint|.
|
||||
|
||||
==============================================================================
|
||||
SYNTAX CHECKERS FOR OBJECTIVE-C *syntastic-checkers-objc*
|
||||
|
||||
@ -4362,6 +4478,7 @@ SYNTAX CHECKERS FOR POD *syntastic-checkers-pod*
|
||||
The following checkers are available for POD (filetype "pod"):
|
||||
|
||||
1. Pod::Checker.............|syntastic-pod-podchecker|
|
||||
2. proselint................|syntastic-pod-proselint|
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
1. Pod::Checker *syntastic-pod-podchecker*
|
||||
@ -4381,6 +4498,27 @@ accepts the standard options described at |syntastic-config-makeprg|.
|
||||
|
||||
See also: |syntastic-perl-podchecker|.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
2. proselint *syntastic-pod-proselint*
|
||||
|
||||
Name: proselint
|
||||
Maintainer: LCD 47 <lcd047@gmail.com>
|
||||
|
||||
"proselint" is a linter for prose. See the page for details:
|
||||
|
||||
http://proselint.com/
|
||||
|
||||
Checker options~
|
||||
|
||||
This checker is initialised using the "makeprgBuild()" function and thus it
|
||||
accepts the standard options described at |syntastic-config-makeprg|.
|
||||
|
||||
See also: |syntastic-asciidoc-proselint|, |syntastic-help-proselint|,
|
||||
|syntastic-html-proselint|, |syntastic-markdown-proselint|,
|
||||
|syntastic-nroff-proselint|, |syntastic-rst-proselint|,
|
||||
|syntastic-tex-proselint|, |syntastic-texinfo-proselint|,
|
||||
|syntastic-text-proselint|, |syntastic-xhtml-proselint|.
|
||||
|
||||
==============================================================================
|
||||
SYNTAX CHECKERS FOR PUG (FORMERLY JADE) *syntastic-checkers-pug*
|
||||
|
||||
@ -5034,12 +5172,34 @@ SYNTAX CHECKERS FOR RESTRUCTUREDTEXT *syntastic-checkers-rst*
|
||||
|
||||
The following checkers are available for reStructuredText (filetype "rst"):
|
||||
|
||||
1. rst2pseudoxml............|syntastic-rst-rst2pseudoxml|
|
||||
2. rstcheck.................|syntastic-rst-rstcheck|
|
||||
3. Sphinx...................|syntastic-rst-sphinx|
|
||||
1. proselint................|syntastic-rst-proselint|
|
||||
2. rst2pseudoxml............|syntastic-rst-rst2pseudoxml|
|
||||
3. rstcheck.................|syntastic-rst-rstcheck|
|
||||
4. Sphinx...................|syntastic-rst-sphinx|
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
1. rst2pseudoxml *syntastic-rst-rst2pseudoxml*
|
||||
1. proselint *syntastic-rst-proselint*
|
||||
|
||||
Name: proselint
|
||||
Maintainer: LCD 47 <lcd047@gmail.com>
|
||||
|
||||
"proselint" is a linter for prose. See the page for details:
|
||||
|
||||
http://proselint.com/
|
||||
|
||||
Checker options~
|
||||
|
||||
This checker is initialised using the "makeprgBuild()" function and thus it
|
||||
accepts the standard options described at |syntastic-config-makeprg|.
|
||||
|
||||
See also: |syntastic-asciidoc-proselint|, |syntastic-help-proselint|,
|
||||
|syntastic-html-proselint|, |syntastic-markdown-proselint|,
|
||||
|syntastic-nroff-proselint|, |syntastic-pod-proselint|,
|
||||
|syntastic-tex-proselint|, |syntastic-texinfo-proselint|,
|
||||
|syntastic-text-proselint|, |syntastic-xhtml-proselint|.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
2. rst2pseudoxml *syntastic-rst-rst2pseudoxml*
|
||||
|
||||
Name: rst2pseudoxml
|
||||
Maintainer: James Rowe <jnrowe@gmail.com>
|
||||
@ -5057,7 +5217,7 @@ This checker is initialised using the "makeprgBuild()" function and thus it
|
||||
accepts the standard options described at |syntastic-config-makeprg|.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
2. rstcheck *syntastic-rst-rstcheck*
|
||||
3. rstcheck *syntastic-rst-rstcheck*
|
||||
|
||||
Name: rstcheck
|
||||
Maintainer: Steven Myint <git@stevenmyint.com>
|
||||
@ -5073,7 +5233,7 @@ This checker is initialised using the "makeprgBuild()" function and thus it
|
||||
accepts the standard options described at |syntastic-config-makeprg|.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
3. Sphinx *syntastic-rst-sphinx*
|
||||
4. Sphinx *syntastic-rst-sphinx*
|
||||
|
||||
Name: sphinx
|
||||
Maintainer: Buck Evan <buck@yelp.com>
|
||||
@ -5892,6 +6052,7 @@ The following checkers are available for TeX (filetype "tex"):
|
||||
|
||||
1. ChkTeX...................|syntastic-tex-chktex|
|
||||
2. lacheck..................|syntastic-tex-lacheck|
|
||||
3. proselint................|syntastic-tex-proselint|
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
1. ChkTeX *syntastic-tex-chktex*
|
||||
@ -5937,12 +6098,34 @@ Limitations~
|
||||
At the time of this writing "lacheck" can't expand "\def" commands. As a
|
||||
result, most "\input" commands using macros are signaled as errors.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
3. proselint *syntastic-tex-proselint*
|
||||
|
||||
Name: proselint
|
||||
Maintainer: LCD 47 <lcd047@gmail.com>
|
||||
|
||||
"proselint" is a linter for prose. See the page for details:
|
||||
|
||||
http://proselint.com/
|
||||
|
||||
Checker options~
|
||||
|
||||
This checker is initialised using the "makeprgBuild()" function and thus it
|
||||
accepts the standard options described at |syntastic-config-makeprg|.
|
||||
|
||||
See also: |syntastic-asciidoc-proselint|, |syntastic-help-proselint|,
|
||||
|syntastic-html-proselint|, |syntastic-markdown-proselint|,
|
||||
|syntastic-nroff-proselint|, |syntastic-pod-proselint|,
|
||||
|syntastic-rst-proselint|, |syntastic-texinfo-proselint|,
|
||||
|syntastic-text-proselint|, |syntastic-xhtml-proselint|.
|
||||
|
||||
==============================================================================
|
||||
SYNTAX CHECKERS FOR TEXINFO *syntastic-checkers-texinfo*
|
||||
|
||||
The following checkers are available for Texinfo (filetype "texinfo"):
|
||||
|
||||
1. Makeinfo.................|syntastic-texinfo-makeinfo|
|
||||
2. proselint................|syntastic-texinfo-proselint|
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
1. Makeinfo *syntastic-texinfo-makeinfo*
|
||||
@ -5960,6 +6143,27 @@ Checker options~
|
||||
This checker is initialised using the "makeprgBuild()" function and thus it
|
||||
accepts the standard options described at |syntastic-config-makeprg|.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
2. proselint *syntastic-texinfo-proselint*
|
||||
|
||||
Name: proselint
|
||||
Maintainer: LCD 47 <lcd047@gmail.com>
|
||||
|
||||
"proselint" is a linter for prose. See the page for details:
|
||||
|
||||
http://proselint.com/
|
||||
|
||||
Checker options~
|
||||
|
||||
This checker is initialised using the "makeprgBuild()" function and thus it
|
||||
accepts the standard options described at |syntastic-config-makeprg|.
|
||||
|
||||
See also: |syntastic-asciidoc-proselint|, |syntastic-help-proselint|,
|
||||
|syntastic-html-proselint|, |syntastic-markdown-proselint|,
|
||||
|syntastic-nroff-proselint|, |syntastic-pod-proselint|,
|
||||
|syntastic-rst-proselint|, |syntastic-tex-proselint|,
|
||||
|syntastic-text-proselint|, |syntastic-xhtml-proselint|.
|
||||
|
||||
==============================================================================
|
||||
SYNTAX CHECKERS FOR TEXT *syntastic-checkers-text*
|
||||
|
||||
@ -5968,7 +6172,8 @@ The following checkers are available for plain text (filetype "text"):
|
||||
1. atdtool..................|syntastic-text-atdtool|
|
||||
2. Igor.....................|syntastic-text-igor|
|
||||
3. language-check...........|syntastic-text-language_check|
|
||||
4. textlint.................|syntastic-text-textlint|
|
||||
4. proselint................|syntastic-text-proselint|
|
||||
5. textlint.................|syntastic-text-textlint|
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
1. atdtool *syntastic-text-atdtool*
|
||||
@ -6031,7 +6236,28 @@ This checker is initialised using the "makeprgBuild()" function and thus it
|
||||
accepts the standard options described at |syntastic-config-makeprg|.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
4. textlint *syntastic-text-textlint*
|
||||
4. proselint *syntastic-text-proselint*
|
||||
|
||||
Name: proselint
|
||||
Maintainer: LCD 47 <lcd047@gmail.com>
|
||||
|
||||
"proselint" is a linter for prose. See the page for details:
|
||||
|
||||
http://proselint.com/
|
||||
|
||||
Checker options~
|
||||
|
||||
This checker is initialised using the "makeprgBuild()" function and thus it
|
||||
accepts the standard options described at |syntastic-config-makeprg|.
|
||||
|
||||
See also: |syntastic-asciidoc-proselint|, |syntastic-help-proselint|,
|
||||
|syntastic-html-proselint|, |syntastic-markdown-proselint|,
|
||||
|syntastic-nroff-proselint|, |syntastic-pod-proselint|,
|
||||
|syntastic-rst-proselint|, |syntastic-tex-proselint|,
|
||||
|syntastic-texinfo-proselint|, |syntastic-xhtml-proselint|.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
5. textlint *syntastic-text-textlint*
|
||||
|
||||
Name: textlint
|
||||
Maintainer: LCD 47 <lcd047@gmail.com>
|
||||
@ -6394,6 +6620,34 @@ 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 VIM HELP *syntastic-checkers-help*
|
||||
|
||||
The following checkers are available for Vim help (filetype "help"):
|
||||
|
||||
1. proselint................|syntastic-help-proselint|
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
1. proselint *syntastic-help-proselint*
|
||||
|
||||
Name: proselint
|
||||
Maintainer: LCD 47 <lcd047@gmail.com>
|
||||
|
||||
"proselint" is a linter for prose. See the page for details:
|
||||
|
||||
http://proselint.com/
|
||||
|
||||
Checker options~
|
||||
|
||||
This checker is initialised using the "makeprgBuild()" function and thus it
|
||||
accepts the standard options described at |syntastic-config-makeprg|.
|
||||
|
||||
See also: |syntastic-asciidoc-proselint|, |syntastic-html-proselint|,
|
||||
|syntastic-markdown-proselint|, |syntastic-nroff-proselint|,
|
||||
|syntastic-pod-proselint|, |syntastic-rst-proselint|,
|
||||
|syntastic-tex-proselint|, |syntastic-texinfo-proselint|,
|
||||
|syntastic-text-proselint|, |syntastic-xhtml-proselint|.
|
||||
|
||||
==============================================================================
|
||||
SYNTAX CHECKERS FOR VIML *syntastic-checkers-vim*
|
||||
|
||||
@ -6479,6 +6733,7 @@ The following checkers are available for xHTML (filetype "xhtml"):
|
||||
|
||||
1. HTML Tidy................|syntastic-xhtml-tidy|
|
||||
2. jshint...................|syntastic-xhtml-jshint|
|
||||
3. proselint................|syntastic-xhtml-proselint|
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
1. HTML tidy *syntastic-xhtml-tidy*
|
||||
@ -6553,6 +6808,27 @@ in "JSHint". If that is undesirable, your only other option is to leave
|
||||
<
|
||||
See also: |syntastic-html-jshint|, |syntastic-javascript-jshint|.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
3. proselint *syntastic-xhtml-proselint*
|
||||
|
||||
Name: proselint
|
||||
Maintainer: LCD 47 <lcd047@gmail.com>
|
||||
|
||||
"proselint" is a linter for prose. See the page for details:
|
||||
|
||||
http://proselint.com/
|
||||
|
||||
Checker options~
|
||||
|
||||
This checker is initialised using the "makeprgBuild()" function and thus it
|
||||
accepts the standard options described at |syntastic-config-makeprg|.
|
||||
|
||||
See also: |syntastic-asciidoc-proselint|, |syntastic-help-proselint|,
|
||||
|syntastic-html-proselint|, |syntastic-markdown-proselint|,
|
||||
|syntastic-nroff-proselint|, |syntastic-pod-proselint|,
|
||||
|syntastic-rst-proselint|, |syntastic-tex-proselint|,
|
||||
|syntastic-texinfo-proselint|, |syntastic-text-proselint|.
|
||||
|
||||
==============================================================================
|
||||
SYNTAX CHECKERS FOR XML *syntastic-checkers-xml*
|
||||
|
||||
|
@ -48,19 +48,20 @@ CONTENTS *syntastic-contents*
|
||||
7.Compatibility with other software............|syntastic-compatibility|
|
||||
7.1.airline................................|syntastic-airline|
|
||||
7.2.The csh and tcsh shells................|syntastic-csh|
|
||||
7.3.Eclim..................................|syntastic-eclim|
|
||||
7.4.ferret.................................|syntastic-ferret|
|
||||
7.5.The fish shell.........................|syntastic-fish|
|
||||
7.6.The fizsh shell........................|syntastic-fizsh|
|
||||
7.7.flagship...............................|syntastic-flagship|
|
||||
7.8.powerline..............................|syntastic-powerline|
|
||||
7.9.The PowerShell shell...................|syntastic-powershell|
|
||||
7.10.python-mode...........................|syntastic-pymode|
|
||||
7.11.vim-auto-save.........................|syntastic-vim-auto-save|
|
||||
7.12.vim-go................................|syntastic-vim-go|
|
||||
7.13.vim-virtualenv........................|syntastic-vim-virtualenv|
|
||||
7.14.YouCompleteMe.........................|syntastic-ycm|
|
||||
7.15.The zsh shell and MacVim..............|syntastic-zsh|
|
||||
7.3.EasyGrep...............................|syntastic-easygrep|
|
||||
7.4.Eclim..................................|syntastic-eclim|
|
||||
7.5.ferret.................................|syntastic-ferret|
|
||||
7.6.The fish shell.........................|syntastic-fish|
|
||||
7.7.The fizsh shell........................|syntastic-fizsh|
|
||||
7.8.flagship...............................|syntastic-flagship|
|
||||
7.9.powerline..............................|syntastic-powerline|
|
||||
7.10.The PowerShell shell..................|syntastic-powershell|
|
||||
7.11.python-mode...........................|syntastic-pymode|
|
||||
7.12.vim-auto-save.........................|syntastic-vim-auto-save|
|
||||
7.13.vim-go................................|syntastic-vim-go|
|
||||
7.14.vim-virtualenv........................|syntastic-vim-virtualenv|
|
||||
7.15.YouCompleteMe.........................|syntastic-ycm|
|
||||
7.16.The zsh shell and MacVim..............|syntastic-zsh|
|
||||
8.About........................................|syntastic-about|
|
||||
9.License......................................|syntastic-license|
|
||||
|
||||
@ -301,12 +302,22 @@ the order specified. The set by |'syntastic_aggregate_errors'| still apply.
|
||||
Example: >
|
||||
:SyntasticCheck flake8 pylint
|
||||
<
|
||||
You can also run checkers for filetypes different from the current filetype
|
||||
by qualifying their names with their respective filetypes, like this:
|
||||
"<filetype>/<checker>".
|
||||
|
||||
Example: >
|
||||
:SyntasticCheck lacheck text/language_check
|
||||
<
|
||||
:SyntasticInfo *:SyntasticInfo*
|
||||
|
||||
The command takes an optional argument, and outputs information about the
|
||||
checkers available for the filetype named by said argument, or for the current
|
||||
filetype if no argument was provided.
|
||||
|
||||
Example: >
|
||||
:SyntasticInfo python
|
||||
<
|
||||
:SyntasticReset *:SyntasticReset*
|
||||
|
||||
Resets the list of errors and turns off all error notifiers.
|
||||
@ -761,6 +772,10 @@ If neither |'g:syntastic_<filetype>_checkers'| nor |'b:syntastic_checkers'|
|
||||
is set, a default list of checker is used. Beware however that this list
|
||||
deliberately kept minimal, for performance reasons.
|
||||
|
||||
You can specify checkers for other filetypes anywhere in these lists, by
|
||||
qualifying their names with their respective filetypes: >
|
||||
let g:syntastic_tex_checkers = ["lacheck", "text/language_check"]
|
||||
<
|
||||
Take a look elsewhere in this manual to find out what checkers and filetypes
|
||||
are supported by syntastic: |syntastic-checkers|.
|
||||
|
||||
@ -854,9 +869,8 @@ omitting the filename from the command line: >
|
||||
let g:syntastic_sml_smlnj_fname = ""
|
||||
<
|
||||
*syntastic-config-no-makeprgbuild*
|
||||
For checkers that do not use the "makeprgBuild()" function you will have to
|
||||
look at the source code of the checker in question. If there are specific
|
||||
options that can be set they are normally documented in this manual (see
|
||||
For checkers that do not use the "makeprgBuild()" function any specific
|
||||
options that can be set should be documented in this manual (see
|
||||
|syntastic-checkers|).
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
@ -1017,7 +1031,16 @@ such as "zsh", "bash", "ksh", or even the original Bourne "sh": >
|
||||
let g:syntastic_shell = "/bin/sh"
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
7.3. Eclim *syntastic-eclim*
|
||||
7.3. EasyGrep *syntastic-easygrep*
|
||||
|
||||
The "EasyGrep" Vim plugin (https://github.com/dkprice/vim-easygrep) can use
|
||||
either |quickfix| lists, or location lists (see |location-list|). Syntastic can
|
||||
be run along with "EasyGrep" provided that the latter is configured to use
|
||||
|quickfix| lists (which is the default at the time of this writing): >
|
||||
let g:EasyGrepWindow = 0
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
7.4. Eclim *syntastic-eclim*
|
||||
|
||||
Syntastic can be used together with "Eclim" (see http://eclim.org/). However,
|
||||
by default Eclim disables syntastic's checks for the filetypes it supports, in
|
||||
@ -1030,7 +1053,7 @@ run Eclim's validation for others. Please consult Eclim's documentation for
|
||||
details.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
7.4. ferret *syntastic-ferret*
|
||||
7.5. ferret *syntastic-ferret*
|
||||
|
||||
At the time of this writing syntastic conflicts with the "ferret" Vim plugin
|
||||
(https://github.com/wincent/ferret). The "ferret" plugin assumes control over
|
||||
@ -1038,7 +1061,7 @@ loclist windows even when configured to use |quickfix| lists. This interferes
|
||||
with syntastic's functioning.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
7.5. The fish shell *syntastic-fish*
|
||||
7.6. The fish shell *syntastic-fish*
|
||||
|
||||
At the time of this writing the "fish" shell (see http://fishshell.com/)
|
||||
doesn't support the standard UNIX syntax for file redirections, and thus it
|
||||
@ -1048,7 +1071,7 @@ original Bourne "sh": >
|
||||
let g:syntastic_shell = "/bin/sh"
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
7.6. The fizsh shell *syntastic-fizsh*
|
||||
7.7. The fizsh shell *syntastic-fizsh*
|
||||
|
||||
Using syntastic with the "fizsh" shell (see https://github.com/zsh-users/fizsh)
|
||||
is possible, but potentially problematic. In order to do it you'll need to set
|
||||
@ -1061,7 +1084,7 @@ interactive features of "fizsh". Using a more traditional shell such as "zsh",
|
||||
let g:syntastic_shell = "/bin/sh"
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
7.7. flagship *syntastic-flagship*
|
||||
7.8. flagship *syntastic-flagship*
|
||||
|
||||
The "flagship" Vim plugin (https://github.com/tpope/vim-flagship) has its
|
||||
own mechanism of showing flags on the |'statusline'|. To allow "flagship"
|
||||
@ -1071,7 +1094,7 @@ described in the |syntastic-statusline-flag| section above: >
|
||||
autocmd User Flags call Hoist("window", "SyntasticStatuslineFlag")
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
7.8. powerline *syntastic-powerline*
|
||||
7.9. powerline *syntastic-powerline*
|
||||
|
||||
The "powerline" Vim plugin (https://github.com/powerline/powerline) comes
|
||||
packaged with a syntastic segment. To customize this segment create a file
|
||||
@ -1088,7 +1111,7 @@ packaged with a syntastic segment. To customize this segment create a file
|
||||
}
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
7.9. The PowerShell shell *syntastic-powershell*
|
||||
7.10. The PowerShell shell *syntastic-powershell*
|
||||
|
||||
At the time of this writing syntastic is not compatible with using
|
||||
"PowerShell" (https://msdn.microsoft.com/en-us/powershell) as Vim's 'shell'.
|
||||
@ -1099,7 +1122,7 @@ You may still run Vim from "PowerShell", but you do have to point Vim's
|
||||
set shell=/bin/sh
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
7.10. python-mode *syntastic-pymode*
|
||||
7.11. python-mode *syntastic-pymode*
|
||||
|
||||
Syntastic can be used along with the "python-mode" Vim plugin (see
|
||||
https://github.com/klen/python-mode). However, they both run syntax checks by
|
||||
@ -1110,14 +1133,14 @@ for python in syntastic (see |'syntastic_mode_map'|), or disable lint checks in
|
||||
let g:pymode_lint_on_write = 0
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
7.11. vim-auto-save *syntastic-vim-auto-save*
|
||||
7.12. vim-auto-save *syntastic-vim-auto-save*
|
||||
|
||||
Syntastic can be used together with the "vim-auto-save" Vim plugin (see
|
||||
https://github.com/907th/vim-auto-save). However, syntastic checks in active
|
||||
mode only work with "vim-auto-save" version 0.1.7 or later.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
7.12. vim-go *syntastic-vim-go*
|
||||
7.13. vim-go *syntastic-vim-go*
|
||||
|
||||
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
|
||||
@ -1134,7 +1157,7 @@ stick with |quickfix| lists: >
|
||||
let g:go_list_type = "quickfix"
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
7.13. vim-virtualenv *syntastic-vim-virtualenv*
|
||||
7.14. vim-virtualenv *syntastic-vim-virtualenv*
|
||||
|
||||
At the time of this writing, syntastic can't run checkers installed
|
||||
in Python virtual environments activated by "vim-virtualenv" (see
|
||||
@ -1142,7 +1165,7 @@ https://github.com/jmcantrell/vim-virtualenv). This is a limitation of
|
||||
"vim-virtualenv".
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
7.14. YouCompleteMe *syntastic-ycm*
|
||||
7.15. YouCompleteMe *syntastic-ycm*
|
||||
|
||||
Syntastic can be used together with the "YouCompleteMe" Vim plugin (see
|
||||
http://valloric.github.io/YouCompleteMe/). However, by default "YouCompleteMe"
|
||||
@ -1153,7 +1176,7 @@ have to set |g:ycm_show_diagnostics_ui| to 0. E.g.: >
|
||||
let g:ycm_show_diagnostics_ui = 0
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
7.15. The zsh shell and MacVim *syntastic-zsh*
|
||||
7.16. The zsh shell and MacVim *syntastic-zsh*
|
||||
|
||||
If you're running MacVim together with the "zsh" shell (http://www.zsh.org/)
|
||||
you need to be aware that MacVim does not source your .zshrc file, but will
|
||||
|
@ -19,7 +19,7 @@ if has('reltime')
|
||||
lockvar! g:_SYNTASTIC_START
|
||||
endif
|
||||
|
||||
let g:_SYNTASTIC_VERSION = '3.7.0-226'
|
||||
let g:_SYNTASTIC_VERSION = '3.8.0-3'
|
||||
lockvar g:_SYNTASTIC_VERSION
|
||||
|
||||
" Sanity checks {{{1
|
||||
@ -57,7 +57,7 @@ elseif executable('uname')
|
||||
try
|
||||
let g:_SYNTASTIC_UNAME = split(syntastic#util#system('uname'), "\n")[0]
|
||||
catch /\m^Vim\%((\a\+)\)\=:E484/
|
||||
call syntastic#log#error("your shell " . syntastic#util#var('shell') . " can't handle traditional UNIX syntax for redirections")
|
||||
call syntastic#log#error("can't run external programs (misconfigured shell options?)")
|
||||
finish
|
||||
catch /\m^Vim\%((\a\+)\)\=:E684/
|
||||
let g:_SYNTASTIC_UNAME = 'Unknown'
|
||||
@ -136,9 +136,9 @@ let s:_DEBUG_DUMP_OPTIONS = [
|
||||
\ 'shellxquote'
|
||||
\ ]
|
||||
for s:feature in [
|
||||
\ 'shellxescape',
|
||||
\ 'shellslash',
|
||||
\ 'autochdir',
|
||||
\ 'shellslash',
|
||||
\ 'shellxescape',
|
||||
\ ]
|
||||
|
||||
if exists('+' . s:feature)
|
||||
@ -178,11 +178,20 @@ let s:_quit_pre = []
|
||||
" @vimlint(EVL103, 1, a:cmdLine)
|
||||
" @vimlint(EVL103, 1, a:argLead)
|
||||
function! s:CompleteCheckerName(argLead, cmdLine, cursorPos) abort " {{{2
|
||||
let checker_names = []
|
||||
for ft in s:_resolve_filetypes([])
|
||||
call extend(checker_names, s:registry.getNamesOfAvailableCheckers(ft))
|
||||
endfor
|
||||
return join(checker_names, "\n")
|
||||
let names = []
|
||||
|
||||
let sep_idx = stridx(a:argLead, '/')
|
||||
if sep_idx >= 1
|
||||
let ft = a:argLead[: sep_idx-1]
|
||||
call extend(names, map( s:registry.getNamesOfAvailableCheckers(ft), 'ft . "/" . v:val' ))
|
||||
else
|
||||
for ft in s:registry.resolveFiletypes(&filetype)
|
||||
call extend(names, s:registry.getNamesOfAvailableCheckers(ft))
|
||||
endfor
|
||||
call extend(names, map( copy(s:registry.getKnownFiletypes()), 'v:val . "/"' ))
|
||||
endif
|
||||
|
||||
return join(names, "\n")
|
||||
endfunction " }}}2
|
||||
" @vimlint(EVL103, 0, a:cursorPos)
|
||||
" @vimlint(EVL103, 0, a:cmdLine)
|
||||
@ -220,7 +229,7 @@ endfunction " }}}2
|
||||
|
||||
function! SyntasticInfo(...) abort " {{{2
|
||||
call s:modemap.modeInfo(a:000)
|
||||
call s:registry.echoInfoFor(s:_resolve_filetypes(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#debugDump(g:_SYNTASTIC_DEBUG_VARIABLES)
|
||||
@ -312,7 +321,7 @@ function! s:BufEnterHook(fname) abort " {{{2
|
||||
" TODO: this is needed because in recent versions of Vim lclose
|
||||
" can no longer be called from BufWinLeave
|
||||
" TODO: at this point there is no b:syntastic_loclist
|
||||
let loclist = filter(copy(getloclist(0)), 'v:val["valid"] == 1')
|
||||
let loclist = filter(copy(getloclist(0)), 'v:val["valid"]')
|
||||
let owner = str2nr(getbufvar(buf, 'syntastic_owner_buffer'))
|
||||
let buffers = syntastic#util#unique(map(loclist, 'v:val["bufnr"]') + (owner ? [owner] : []))
|
||||
if !empty(get(w:, 'syntastic_loclist_set', [])) && !empty(loclist) && empty(filter( buffers, 'syntastic#util#bufIsActive(v:val)' ))
|
||||
@ -384,14 +393,12 @@ function! s:UpdateErrors(buf, auto_invoked, checker_names) abort " {{{2
|
||||
return
|
||||
endif
|
||||
|
||||
let run_checks = !a:auto_invoked || s:modemap.doAutoChecking()
|
||||
let run_checks = !a:auto_invoked || s:modemap.doAutoChecking(a:buf)
|
||||
if run_checks
|
||||
call s:CacheErrors(a:buf, a:checker_names)
|
||||
call syntastic#util#setLastTick(a:buf)
|
||||
else
|
||||
if a:auto_invoked
|
||||
return
|
||||
endif
|
||||
elseif a:auto_invoked
|
||||
return
|
||||
endif
|
||||
|
||||
let loclist = g:SyntasticLoclist.current(a:buf)
|
||||
@ -453,20 +460,17 @@ function! s:CacheErrors(buf, checker_names) abort " {{{2
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, 'getcwd() = ' . string(getcwd()))
|
||||
" }}}3
|
||||
|
||||
let filetypes = s:_resolve_filetypes([])
|
||||
let aggregate_errors = syntastic#util#var('aggregate_errors') || len(filetypes) > 1
|
||||
let clist = s:registry.getCheckers(getbufvar(a:buf, '&filetype'), a:checker_names)
|
||||
|
||||
let aggregate_errors =
|
||||
\ syntastic#util#var('aggregate_errors') || len(syntastic#util#unique(map(copy(clist), 'v:val.getFiletype()'))) > 1
|
||||
let decorate_errors = aggregate_errors && syntastic#util#var('id_checkers')
|
||||
let sort_aggregated_errors = aggregate_errors && syntastic#util#var('sort_aggregated_errors')
|
||||
|
||||
let clist = []
|
||||
for type in filetypes
|
||||
call extend(clist, s:registry.getCheckers(type, a:checker_names))
|
||||
endfor
|
||||
|
||||
let names = []
|
||||
let unavailable_checkers = 0
|
||||
for checker in clist
|
||||
let cname = checker.getFiletype() . '/' . checker.getName()
|
||||
let cname = checker.getCName()
|
||||
if !checker.isAvailable()
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, 'CacheErrors: Checker ' . cname . ' is not available')
|
||||
let unavailable_checkers += 1
|
||||
@ -687,11 +691,6 @@ endfunction " }}}2
|
||||
|
||||
" Utilities {{{1
|
||||
|
||||
function! s:_resolve_filetypes(filetypes) abort " {{{2
|
||||
let type = len(a:filetypes) ? a:filetypes[0] : &filetype
|
||||
return split( get(g:syntastic_filetype_map, type, type), '\m\.' )
|
||||
endfunction " }}}2
|
||||
|
||||
function! s:_ignore_file(filename) abort " {{{2
|
||||
let fname = fnamemodify(a:filename, ':p')
|
||||
for pattern in g:syntastic_ignore_files
|
||||
|
@ -15,7 +15,7 @@ function! g:SyntasticChecker.New(args, ...) abort " {{{2
|
||||
|
||||
if a:0
|
||||
" redirected checker
|
||||
let newObj._exec = get(a:args, 'exec', a:1['_exec'])
|
||||
let newObj._exec_default = get(a:args, 'exec', a:1['_exec_default'])
|
||||
|
||||
let filetype = a:1['_filetype']
|
||||
let name = a:1['_name']
|
||||
@ -31,7 +31,10 @@ function! g:SyntasticChecker.New(args, ...) abort " {{{2
|
||||
let newObj._enable = a:1['_enable']
|
||||
endif
|
||||
else
|
||||
let newObj._exec = get(a:args, 'exec', newObj._name)
|
||||
let newObj._exec_default = get(a:args, 'exec', newObj._name)
|
||||
if newObj._exec_default ==# ''
|
||||
let newObj._exec_default = '<dummy>'
|
||||
endif
|
||||
let prefix = 'SyntaxCheckers_' . newObj._filetype . '_' . newObj._name . '_'
|
||||
|
||||
if has_key(a:args, 'enable')
|
||||
@ -62,23 +65,24 @@ function! g:SyntasticChecker.getName() abort " {{{2
|
||||
return self._name
|
||||
endfunction " }}}2
|
||||
|
||||
function! g:SyntasticChecker.getCName() abort " {{{2
|
||||
return self._filetype . '/' . self._name
|
||||
endfunction " }}}2
|
||||
|
||||
" Synchronise _exec with user's setting. Force re-validation if needed.
|
||||
"
|
||||
" XXX: This function must be called at least once before calling either
|
||||
" getExec() or getExecEscaped(). Normally isAvailable() does that for you
|
||||
" automatically, but you should keep still this in mind if you change the
|
||||
" current checker workflow.
|
||||
function! g:SyntasticChecker.syncExec() abort " {{{2
|
||||
let user_exec =
|
||||
\ expand( exists('b:syntastic_' . self._name . '_exec') ? b:syntastic_{self._name}_exec :
|
||||
\ syntastic#util#var(self._filetype . '_' . self._name . '_exec'), 1 )
|
||||
|
||||
if user_exec !=# '' && user_exec !=# self._exec
|
||||
let self._exec = user_exec
|
||||
if has_key(self, '_available')
|
||||
" we have a new _exec on the block, it has to be validated
|
||||
call remove(self, '_available')
|
||||
endif
|
||||
function! g:SyntasticChecker.syncExec(...) abort " {{{2
|
||||
if a:0
|
||||
let self._exec = a:1
|
||||
else
|
||||
let suffix = self._name . '_exec'
|
||||
let self._exec = expand(
|
||||
\ syntastic#util#var(self._filetype . '_' . suffix,
|
||||
\ syntastic#util#var(suffix, self._exec_default)), 1 )
|
||||
endif
|
||||
endfunction " }}}2
|
||||
|
||||
@ -92,7 +96,7 @@ endfunction " }}}2
|
||||
|
||||
function! g:SyntasticChecker.getLocListRaw() abort " {{{2
|
||||
let checker_start = reltime()
|
||||
let name = self._filetype . '/' . self._name
|
||||
let name = self.getCName()
|
||||
|
||||
if has_key(self, '_enable')
|
||||
let status = syntastic#util#var(self._enable, -1)
|
||||
@ -150,7 +154,7 @@ function! g:SyntasticChecker.getVersion(...) abort " {{{2
|
||||
call self.setVersion(parsed_ver)
|
||||
else
|
||||
call syntastic#log#ndebug(g:_SYNTASTIC_DEBUG_LOCLIST, 'checker output:', split(version_output, "\n", 1))
|
||||
call syntastic#log#error("checker " . self._filetype . "/" . self._name . ": can't parse version string (abnormal termination?)")
|
||||
call syntastic#log#error("checker " . self.getCName() . ": can't parse version string (abnormal termination?)")
|
||||
endif
|
||||
endif
|
||||
return get(self, '_version', [])
|
||||
@ -164,8 +168,8 @@ function! g:SyntasticChecker.setVersion(version) abort " {{{2
|
||||
endfunction " }}}2
|
||||
|
||||
function! g:SyntasticChecker.log(msg, ...) abort " {{{2
|
||||
let leader = self._filetype . '/' . self._name . ': '
|
||||
if a:0 > 0
|
||||
let leader = self.getCName() . ': '
|
||||
if a:0
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_CHECKERS, leader . a:msg, a:1)
|
||||
else
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_CHECKERS, leader . a:msg)
|
||||
@ -187,10 +191,15 @@ endfunction " }}}2
|
||||
|
||||
function! g:SyntasticChecker.isAvailable() abort " {{{2
|
||||
call self.syncExec()
|
||||
|
||||
if !has_key(self, '_available')
|
||||
let self._available = self._isAvailableFunc()
|
||||
let self._available = {}
|
||||
endif
|
||||
return self._available
|
||||
if !has_key(self._available, self._exec)
|
||||
let self._available[self._exec] = self._isAvailableFunc()
|
||||
endif
|
||||
|
||||
return self._available[self._exec]
|
||||
endfunction " }}}2
|
||||
|
||||
function! g:SyntasticChecker.isDisabled() abort " {{{2
|
||||
|
@ -10,7 +10,7 @@ let g:SyntasticLoclist = {}
|
||||
function! g:SyntasticLoclist.New(rawLoclist) abort " {{{2
|
||||
let newObj = copy(self)
|
||||
|
||||
let llist = filter(copy(a:rawLoclist), 'v:val["valid"] == 1')
|
||||
let llist = filter(copy(a:rawLoclist), 'v:val["valid"]')
|
||||
|
||||
for e in llist
|
||||
if get(e, 'type', '') ==# ''
|
||||
@ -28,8 +28,8 @@ function! g:SyntasticLoclist.New(rawLoclist) abort " {{{2
|
||||
endfunction " }}}2
|
||||
|
||||
function! g:SyntasticLoclist.current(...) abort " {{{2
|
||||
let buf = a:0 > 1 ? a:1 : bufnr('')
|
||||
let loclist = getbufvar(buf, 'syntastic_loclist')
|
||||
let buf = a:0 ? a:1 : bufnr('')
|
||||
let loclist = syntastic#util#getbufvar(buf, 'syntastic_loclist', {})
|
||||
if type(loclist) != type({}) || empty(loclist)
|
||||
unlet! loclist
|
||||
let loclist = g:SyntasticLoclist.New([])
|
||||
@ -281,7 +281,7 @@ endfunction " }}}2
|
||||
"
|
||||
"would return all errors for buffer 10.
|
||||
"
|
||||
"Note that all comparisons are done with ==?
|
||||
"Note that all string comparisons are done with ==?
|
||||
function! g:SyntasticLoclist.filter(filters) abort " {{{2
|
||||
let conditions = values(map(copy(a:filters), 's:_translate(v:key, v:val)'))
|
||||
let filter = len(conditions) == 1 ?
|
||||
|
@ -29,7 +29,8 @@ function! g:SyntasticModeMap.synch() abort " {{{2
|
||||
endfunction " }}}2
|
||||
|
||||
function! g:SyntasticModeMap.allowsAutoChecking(filetype) abort " {{{2
|
||||
let fts = split(a:filetype, '\m\.')
|
||||
let registry = g:SyntasticRegistry.Instance()
|
||||
let fts = registry.resolveFiletypes(a:filetype)
|
||||
|
||||
if self.isPassive()
|
||||
return self._isOneFiletypeActive(fts)
|
||||
@ -38,13 +39,13 @@ function! g:SyntasticModeMap.allowsAutoChecking(filetype) abort " {{{2
|
||||
endif
|
||||
endfunction " }}}2
|
||||
|
||||
function! g:SyntasticModeMap.doAutoChecking() abort " {{{2
|
||||
let local_mode = get(b:, 'syntastic_mode', '')
|
||||
function! g:SyntasticModeMap.doAutoChecking(buf) abort " {{{2
|
||||
let local_mode = getbufvar(a:buf, 'syntastic_mode')
|
||||
if local_mode ==# 'active' || local_mode ==# 'passive'
|
||||
return local_mode ==# 'active'
|
||||
endif
|
||||
|
||||
return self.allowsAutoChecking(&filetype)
|
||||
return self.allowsAutoChecking(getbufvar(a:buf, '&filetype'))
|
||||
endfunction " }}}2
|
||||
|
||||
function! g:SyntasticModeMap.isPassive() abort " {{{2
|
||||
@ -96,7 +97,7 @@ function! g:SyntasticModeMap.modeInfo(filetypes) abort " {{{2
|
||||
echomsg 'Local mode: ' . b:syntastic_mode
|
||||
endif
|
||||
|
||||
echomsg 'The current file will ' . (self.doAutoChecking() ? '' : 'not ') . 'be checked automatically'
|
||||
echomsg 'The current file will ' . (self.doAutoChecking(bufnr('')) ? '' : 'not ') . 'be checked automatically'
|
||||
endif
|
||||
endfunction " }}}2
|
||||
|
||||
|
@ -43,6 +43,7 @@ let s:_DEFAULT_CHECKERS = {
|
||||
\ 'handlebars': ['handlebars'],
|
||||
\ 'haskell': ['hdevtools', 'hlint'],
|
||||
\ 'haxe': ['haxe'],
|
||||
\ 'help': [],
|
||||
\ 'hss': ['hss'],
|
||||
\ 'html': ['tidy'],
|
||||
\ 'jade': ['jade_lint'],
|
||||
@ -188,24 +189,39 @@ endfunction " }}}2
|
||||
" not checked for availability (that is, the corresponding IsAvailable() are
|
||||
" not run).
|
||||
function! g:SyntasticRegistry.getCheckers(ftalias, hints_list) abort " {{{2
|
||||
let ft = s:_normalise_filetype(a:ftalias)
|
||||
call self._loadCheckersFor(ft, 0)
|
||||
|
||||
let checkers_map = self._checkerMap[ft]
|
||||
if empty(checkers_map)
|
||||
return []
|
||||
endif
|
||||
|
||||
call self._checkDeprecation(ft)
|
||||
let ftlist = self.resolveFiletypes(a:ftalias)
|
||||
|
||||
let names =
|
||||
\ !empty(a:hints_list) ? syntastic#util#unique(a:hints_list) :
|
||||
\ exists('b:syntastic_checkers') ? b:syntastic_checkers :
|
||||
\ exists('g:syntastic_' . ft . '_checkers') ? g:syntastic_{ft}_checkers :
|
||||
\ get(s:_DEFAULT_CHECKERS, ft, 0)
|
||||
\ !empty(a:hints_list) ? a:hints_list :
|
||||
\ exists('b:syntastic_checkers') ? b:syntastic_checkers : []
|
||||
|
||||
return type(names) == type([]) ?
|
||||
\ self._filterCheckersByName(checkers_map, names) : [checkers_map[keys(checkers_map)[0]]]
|
||||
let cnames = []
|
||||
if !empty(names)
|
||||
for name in names
|
||||
if name !~# '/'
|
||||
for ft in ftlist
|
||||
call add(cnames, ft . '/' . name)
|
||||
endfor
|
||||
else
|
||||
call add(cnames, name)
|
||||
endif
|
||||
endfor
|
||||
else
|
||||
for ft in ftlist
|
||||
call self._sanityCheck(ft)
|
||||
let defs =
|
||||
\ exists('g:syntastic_' . ft . '_checkers') ? g:syntastic_{ft}_checkers :
|
||||
\ get(s:_DEFAULT_CHECKERS, ft, [])
|
||||
call extend(cnames, map(copy(defs), 'stridx(v:val, "/") < 0 ? ft . "/" . v:val : v:val' ))
|
||||
endfor
|
||||
endif
|
||||
let cnames = syntastic#util#unique(cnames)
|
||||
|
||||
for ft in syntastic#util#unique(map( copy(cnames), 'v:val[: stridx(v:val, "/")-1]' ))
|
||||
call self._loadCheckersFor(ft, 0)
|
||||
endfor
|
||||
|
||||
return self._filterCheckersByName(cnames)
|
||||
endfunction " }}}2
|
||||
|
||||
" Same as getCheckers(), but keep only the available checkers. This runs the
|
||||
@ -242,8 +258,12 @@ function! g:SyntasticRegistry.getNamesOfAvailableCheckers(ftalias) abort " {{{2
|
||||
return keys(filter( copy(self._checkerMap[ft]), 'v:val.isAvailable()' ))
|
||||
endfunction " }}}2
|
||||
|
||||
function! g:SyntasticRegistry.resolveFiletypes(ftalias) abort " {{{2
|
||||
return map(split( get(g:syntastic_filetype_map, a:ftalias, a:ftalias), '\m\.' ), 's:_normalise_filetype(v:val)')
|
||||
endfunction " }}}2
|
||||
|
||||
function! g:SyntasticRegistry.echoInfoFor(ftalias_list) abort " {{{2
|
||||
let ft_list = syntastic#util#unique(map( copy(a:ftalias_list), 's:_normalise_filetype(v:val)' ))
|
||||
let ft_list = syntastic#util#unique(self.resolveFiletypes(empty(a:ftalias_list) ? &filetype : a:ftalias_list[0]))
|
||||
if len(ft_list) != 1
|
||||
let available = []
|
||||
let active = []
|
||||
@ -257,8 +277,8 @@ function! g:SyntasticRegistry.echoInfoFor(ftalias_list) abort " {{{2
|
||||
else
|
||||
let ft = ft_list[0]
|
||||
let available = self.getNamesOfAvailableCheckers(ft)
|
||||
let active = map(self.getCheckersAvailable(ft, []), 'v:val.getName()')
|
||||
let disabled = map(self.getCheckersDisabled(ft, []), 'v:val.getName()')
|
||||
let active = map(self.getCheckersAvailable(ft, []), 'ft ==# v:val.getFiletype() ? v:val.getName() : v:val.getCName()')
|
||||
let disabled = map(self.getCheckersDisabled(ft, []), 'ft ==# v:val.getFiletype() ? v:val.getName() : v:val.getCName()')
|
||||
endif
|
||||
|
||||
let cnt = len(available)
|
||||
@ -274,7 +294,7 @@ function! g:SyntasticRegistry.echoInfoFor(ftalias_list) abort " {{{2
|
||||
let cnt = len(disabled)
|
||||
let plural = cnt != 1 ? 's' : ''
|
||||
if len(disabled)
|
||||
let cklist = join(sort(disabled))
|
||||
let cklist = join(sort(disabled, 's:_compare_checker_names'))
|
||||
echomsg 'Checker' . plural . ' disabled for security reasons: ' . cklist
|
||||
endif
|
||||
|
||||
@ -321,8 +341,20 @@ function! g:SyntasticRegistry._registerChecker(checker) abort " {{{2
|
||||
let self._checkerMap[ft][name] = a:checker
|
||||
endfunction " }}}2
|
||||
|
||||
function! g:SyntasticRegistry._filterCheckersByName(checkers_map, list) abort " {{{2
|
||||
return filter( map(copy(a:list), 'get(a:checkers_map, v:val, {})'), '!empty(v:val)' )
|
||||
function! g:SyntasticRegistry._findChecker(cname) abort " {{{2
|
||||
let sep_idx = stridx(a:cname, '/')
|
||||
if sep_idx > 0
|
||||
let ft = a:cname[: sep_idx-1]
|
||||
let name = a:cname[sep_idx+1 :]
|
||||
else
|
||||
let ft = &filetype
|
||||
let name = a:cname
|
||||
endif
|
||||
return get(self._checkerMap[ft], name, {})
|
||||
endfunction "}}}2
|
||||
|
||||
function! g:SyntasticRegistry._filterCheckersByName(cnames) abort " {{{2
|
||||
return filter( map(copy(a:cnames), 'self._findChecker(v:val)'), '!empty(v:val)' )
|
||||
endfunction " }}}2
|
||||
|
||||
function! g:SyntasticRegistry._loadCheckersFor(filetype, force) abort " {{{2
|
||||
@ -338,7 +370,14 @@ function! g:SyntasticRegistry._loadCheckersFor(filetype, force) abort " {{{2
|
||||
endfunction " }}}2
|
||||
|
||||
" Check for obsolete variable g:syntastic_<filetype>_checker
|
||||
function! g:SyntasticRegistry._checkDeprecation(filetype) abort " {{{2
|
||||
function! g:SyntasticRegistry._sanityCheck(filetype) abort " {{{2
|
||||
if exists('g:syntastic_' . a:filetype . '_checkers') &&
|
||||
\ type(g:syntastic_{a:filetype}_checkers) != type([])
|
||||
|
||||
unlet! g:syntastic_{a:filetype}_checkers
|
||||
call syntastic#log#error('variable g:syntastic_' . a:filetype . '_checkers has to be a list of strings')
|
||||
endif
|
||||
|
||||
if exists('g:syntastic_' . a:filetype . '_checker') &&
|
||||
\ !exists('g:syntastic_' . a:filetype . '_checkers') &&
|
||||
\ type(g:syntastic_{a:filetype}_checker) == type('')
|
||||
@ -375,6 +414,26 @@ function! s:_disabled_by_ycm(filetype) abort " {{{2
|
||||
return index(s:_YCM_TYPES, a:filetype) >= 0
|
||||
endfunction " }}}2
|
||||
|
||||
function! s:_compare_checker_names(a, b) abort " {{{2
|
||||
if a:a ==# a:b
|
||||
return 0
|
||||
endif
|
||||
|
||||
if stridx(a:a, '/') < 0
|
||||
if stridx(a:b, '/') < 0
|
||||
return a:a < a:b ? -1 : 1
|
||||
else
|
||||
return -1
|
||||
endif
|
||||
else
|
||||
if stridx(a:b, '/') < 0
|
||||
return 1
|
||||
else
|
||||
return a:a < a:b ? -1 : 1
|
||||
endif
|
||||
endif
|
||||
endfunction " }}}2
|
||||
|
||||
" }}}1
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -0,0 +1,23 @@
|
||||
"============================================================================
|
||||
"File: proselint.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_asciidoc_proselint_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_asciidoc_proselint_checker = 1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'asciidoc',
|
||||
\ 'name': 'proselint',
|
||||
\ 'redirect': 'text/proselint'})
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
@ -1,94 +0,0 @@
|
||||
"============================================================================
|
||||
"File: ghc-mod.vim
|
||||
"Description: Syntax checking plugin for syntastic.vim
|
||||
"Maintainer: Anthony Carapetis <anthony.carapetis 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_haskell_ghc_mod_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_haskell_ghc_mod_checker = 1
|
||||
|
||||
let s:ghc_mod_new = -1
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_haskell_ghc_mod_IsAvailable() dict " {{{1
|
||||
if !executable(self.getExec())
|
||||
return 0
|
||||
endif
|
||||
|
||||
" ghc-mod 5.0.0 and later needs the "version" command to print the
|
||||
" version. But the "version" command appeared in 4.1.0. Thus, we need to
|
||||
" know the version in order to know how to find out the version. :)
|
||||
|
||||
" Try "ghc-mod version".
|
||||
let version_output = split(syntastic#util#system(self.getExecEscaped() . ' version'), '\n', 1)
|
||||
let ver = filter(copy(version_output), 'v:val =~# ''\m\sversion''')
|
||||
if !len(ver)
|
||||
" That didn't work. Try "ghc-mod" alone.
|
||||
let version_output = split(syntastic#util#system(self.getExecEscaped()), '\n', 1)
|
||||
let ver = filter(copy(version_output), 'v:val =~# ''\m\sversion''')
|
||||
endif
|
||||
let parsed_ver = len(ver) ? syntastic#util#parseVersion(ver[0]) : []
|
||||
|
||||
if len(parsed_ver)
|
||||
" Encouraged by the great success in finding out the version, now we
|
||||
" need either a Vim that can handle NULs in system() output, or a
|
||||
" ghc-mod that has the "--boundary" option.
|
||||
call self.setVersion(parsed_ver)
|
||||
let s:ghc_mod_new = syntastic#util#versionIsAtLeast(parsed_ver, [2, 1, 2])
|
||||
else
|
||||
call syntastic#log#ndebug(g:_SYNTASTIC_DEBUG_LOCLIST, 'checker output:', version_output)
|
||||
call syntastic#log#error("checker haskell/ghc_mod: can't parse version string (abnormal termination?)")
|
||||
let s:ghc_mod_new = -1
|
||||
endif
|
||||
|
||||
" ghc-mod 5.4.0 wants to run in the root directory of the project;
|
||||
" syntastic can't cope with the resulting complications
|
||||
"
|
||||
" References:
|
||||
" https://hackage.haskell.org/package/ghc-mod-5.4.0.0/changelog
|
||||
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 " }}}1
|
||||
|
||||
function! SyntaxCheckers_haskell_ghc_mod_GetLocList() dict " {{{1
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe': self.getExecEscaped() . ' check' . (s:ghc_mod_new ? ' --boundary=""' : '') })
|
||||
|
||||
let errorformat =
|
||||
\ '%-G%\s%#,' .
|
||||
\ '%f:%l:%c:%trror: %m,' .
|
||||
\ '%f:%l:%c:%tarning: %m,'.
|
||||
\ '%f:%l:%c: %trror: %m,' .
|
||||
\ '%f:%l:%c: %tarning: %m,' .
|
||||
\ '%f:%l:%c:%m,' .
|
||||
\ '%E%f:%l:%c:,' .
|
||||
\ '%Z%m'
|
||||
|
||||
return SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'preprocess': 'iconv',
|
||||
\ 'postprocess': ['compressWhitespace'],
|
||||
\ 'returns': [0] })
|
||||
endfunction " }}}1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'haskell',
|
||||
\ 'name': 'ghc_mod',
|
||||
\ 'exec': 'ghc-mod' })
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
@ -0,0 +1,23 @@
|
||||
"============================================================================
|
||||
"File: proselint.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_help_proselint_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_help_proselint_checker = 1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'help',
|
||||
\ 'name': 'proselint',
|
||||
\ 'redirect': 'text/proselint'})
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
@ -0,0 +1,46 @@
|
||||
"============================================================================
|
||||
"File: html.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_htmlhint_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_html_htmlhint_checker = 1
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_html_htmlhint_IsAvailable() dict
|
||||
if !executable(self.getExec())
|
||||
return 0
|
||||
endif
|
||||
return syntastic#util#versionIsAtLeast(self.getVersion(), [0, 9, 13])
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_html_htmlhint_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args_before': '--format unix' })
|
||||
|
||||
let errorformat = '%f:%l:%c: %m'
|
||||
|
||||
return SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'returns': [0, 1] })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'html',
|
||||
\ 'name': 'htmlhint'})
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
@ -0,0 +1,23 @@
|
||||
"============================================================================
|
||||
"File: proselint.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_proselint_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_html_proselint_checker = 1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'html',
|
||||
\ 'name': 'proselint',
|
||||
\ 'redirect': 'text/proselint'})
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
@ -0,0 +1,23 @@
|
||||
"============================================================================
|
||||
"File: proselint.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_markdown_proselint_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_markdown_proselint_checker = 1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'markdown',
|
||||
\ 'name': 'proselint',
|
||||
\ 'redirect': 'text/proselint'})
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
@ -20,7 +20,7 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_nasm_nasm_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args_after': '-X gnu -f elf' .
|
||||
\ 'args_after': '-X gnu' .
|
||||
\ ' -I ' . syntastic#util#shescape(expand('%:p:h', 1) . syntastic#util#Slash()) .
|
||||
\ ' ' . syntastic#c#NullOutput() })
|
||||
|
||||
|
@ -0,0 +1,23 @@
|
||||
"============================================================================
|
||||
"File: proselint.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_nroff_proselint_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_nroff_proselint_checker = 1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'nroff',
|
||||
\ 'name': 'proselint',
|
||||
\ 'redirect': 'text/proselint'})
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
@ -0,0 +1,23 @@
|
||||
"============================================================================
|
||||
"File: proselint.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_pod_proselint_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_pod_proselint_checker = 1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'pod',
|
||||
\ 'name': 'proselint',
|
||||
\ 'redirect': 'text/proselint'})
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
@ -0,0 +1,23 @@
|
||||
"============================================================================
|
||||
"File: proselint.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_rst_proselint_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_rst_proselint_checker = 1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'rst',
|
||||
\ 'name': 'proselint',
|
||||
\ 'redirect': 'text/proselint'})
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
@ -0,0 +1,23 @@
|
||||
"============================================================================
|
||||
"File: proselint.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_tex_proselint_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_tex_proselint_checker = 1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'tex',
|
||||
\ 'name': 'proselint',
|
||||
\ 'redirect': 'text/proselint'})
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
@ -0,0 +1,23 @@
|
||||
"============================================================================
|
||||
"File: proselint.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_texinfo_proselint_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_texinfo_proselint_checker = 1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'texinfo',
|
||||
\ 'name': 'proselint',
|
||||
\ 'redirect': 'text/proselint'})
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
@ -0,0 +1,45 @@
|
||||
"============================================================================
|
||||
"File: proselint.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_text_proselint_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_text_proselint_checker = 1
|
||||
|
||||
if !exists('g:syntastic_text_proselint_sort')
|
||||
let g:syntastic_text_proselint_sort = 1
|
||||
endif
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_text_proselint_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({})
|
||||
|
||||
let errorformat = '%f:%l:%c: %m'
|
||||
|
||||
return SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'defaults': { 'type': 'W', 'subtype': 'Style' },
|
||||
\ 'preprocess': 'iconv',
|
||||
\ 'returns': [0, 1] })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'text',
|
||||
\ 'name': 'proselint'})
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
@ -99,8 +99,7 @@ endfunction " }}}2
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'vim',
|
||||
\ 'name': 'vimlint',
|
||||
\ 'exec': '' })
|
||||
\ 'name': 'vimlint' })
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
@ -0,0 +1,23 @@
|
||||
"============================================================================
|
||||
"File: proselint.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_xhtml_proselint_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_xhtml_proselint_checker = 1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'xhtml',
|
||||
\ 'name': 'proselint',
|
||||
\ 'redirect': 'text/proselint'})
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
Reference in New Issue
Block a user