mirror of
https://github.com/amix/vimrc
synced 2025-06-23 23:15:01 +08:00
Updated plugins
This commit is contained in:
@ -68,9 +68,9 @@ 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,
|
||||
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).
|
||||
Vim help, VimL, Vue.js, 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
|
||||
example: [merlin][merlin], [omnisharp-vim][omnisharp], [rust.vim][rust],
|
||||
@ -437,15 +437,15 @@ scripts.
|
||||
__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
|
||||
the checkers you want to use. Set `g:syntastic_ruby_checkers` accordingly in
|
||||
your `vimrc`, and run [Vim][vim] from the virtual environment.
|
||||
activate the relevant version of Ruby, and install in it the checkers you want
|
||||
to use. Set `g:syntastic_ruby_checkers` accordingly in your `vimrc`, and run
|
||||
[Vim][vim] under the relevant Ruby version.
|
||||
|
||||
If you're starting Vim from a desktop manager rather than from a terminal you
|
||||
might need to write wrapper scripts around your checkers, to activate the
|
||||
virtual environment before running the actual checks. Then you'll need to
|
||||
point the relevant `g:syntastic_ruby_<checker>_exec` variables to the wrapper
|
||||
scripts.
|
||||
If you're starting Vim from a desktop manager rather than from a terminal
|
||||
and depending on the version manager you use you might need to write wrapper
|
||||
scripts around your checkers, to activate the relevant version of Ruby
|
||||
before running the actual checks. Then you'll need to point the relevant
|
||||
`g:syntastic_ruby_<checker>_exec` variables to the wrapper scripts.
|
||||
|
||||
<a name="faqperl"></a>
|
||||
|
||||
|
@ -121,6 +121,7 @@ SYNTAX CHECKERS BY LANGUAGE *syntastic-checkers-lang*
|
||||
VHDL.....................................|syntastic-checkers-vhdl|
|
||||
Vim help.................................|syntastic-checkers-help|
|
||||
VimL.....................................|syntastic-checkers-vim|
|
||||
Vue.js...................................|syntastic-checkers-vue|
|
||||
|
||||
xHTML....................................|syntastic-checkers-xhtml|
|
||||
XML......................................|syntastic-checkers-xml|
|
||||
@ -2867,7 +2868,8 @@ to it:
|
||||
|
||||
https://github.com/mantoni/eslint_d.js#editor-integration
|
||||
|
||||
See also: |syntastic-javascript-eslint|, |syntastic-typescript-eslint|.
|
||||
See also: |syntastic-javascript-eslint|, |syntastic-typescript-eslint|,
|
||||
|syntastic-vue-eslint|.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
2. gjslint *syntastic-html-gjslint*
|
||||
@ -2935,7 +2937,7 @@ See also: |syntastic-xhtml-tidy|.
|
||||
Name: HTMLHint
|
||||
Maintainer: LCD 47 <lcd047@gmail.com>
|
||||
|
||||
"JSHint" is a static code analysis tool for HTML. See the project's page for
|
||||
"HTMLHint" is a static code analysis tool for HTML. See the project's page for
|
||||
details:
|
||||
|
||||
http://htmlhint.com/
|
||||
@ -3425,7 +3427,8 @@ version 2.1.0 or later, instead of "ESLint". Just point
|
||||
|
||||
https://github.com/mantoni/eslint_d.js#editor-integration
|
||||
|
||||
See also: |syntastic-html-eslint|, |syntastic-typescript-eslint|.
|
||||
See also: |syntastic-html-eslint|, |syntastic-typescript-eslint|,
|
||||
|syntastic-vue-eslint|.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
3. Flow *syntastic-javascript-flow*
|
||||
@ -5720,11 +5723,12 @@ running "rubocop --version" from the shell. If it complains about "Parser"
|
||||
"Ruby" than you are running, your configuration is not directly supported by
|
||||
syntastic.
|
||||
|
||||
While passing around the blame for this does have a certain entertaining value
|
||||
(cf. https://github.com/bbatsov/rubocop/issues/1819), the problem is real,
|
||||
since "Ruby" syntax did change between versions. The solution is to run a
|
||||
system such as "rbenv" (http://rbenv.org/) or "rvm" (https://rvm.io/), that
|
||||
allows you to run multiple versions of "Ruby" without conflicts: >
|
||||
While passing around the blame for this does have a certain entertaining
|
||||
value (cf. https://github.com/bbatsov/rubocop/issues/1819), the problem
|
||||
is real, since "Ruby" syntax did change between versions. The solution
|
||||
is to run a version manager such as "rbenv" (http://rbenv.org/) or "rvm"
|
||||
(https://rvm.io/), that allows you to run multiple versions of "Ruby" without
|
||||
conflicts: >
|
||||
$ rbenv version
|
||||
2.1.3 (set by /usr/local/var/rbenv/version)
|
||||
|
||||
@ -5768,11 +5772,12 @@ running "ruby-lint --version" from the shell. If it complains about "Parser"
|
||||
"Ruby" than you are running, your configuration is not directly supported by
|
||||
syntastic.
|
||||
|
||||
While passing around the blame for this does have a certain entertaining value
|
||||
(cf. https://github.com/bbatsov/rubocop/issues/1819), the problem is real,
|
||||
since "Ruby" syntax did change between versions. The solution is to run a
|
||||
system such as "rbenv" (http://rbenv.org/) or "rvm" (https://rvm.io/), that
|
||||
allows you to run multiple versions of "Ruby" without conflicts: >
|
||||
While passing around the blame for this does have a certain entertaining
|
||||
value (cf. https://github.com/bbatsov/rubocop/issues/1819), the problem
|
||||
is real, since "Ruby" syntax did change between versions. The solution
|
||||
is to run a version manager such as "rbenv" (http://rbenv.org/) or "rvm"
|
||||
(https://rvm.io/), that allows you to run multiple versions of "Ruby" without
|
||||
conflicts: >
|
||||
$ rbenv version
|
||||
2.1.3 (set by /usr/local/var/rbenv/version)
|
||||
|
||||
@ -6377,6 +6382,14 @@ Default: 1
|
||||
Whether to show informational messages ("chktex" option "-m"). By default
|
||||
informational messages are shown as warnings.
|
||||
|
||||
Note~
|
||||
|
||||
If you're checking files containing tab characters, then Vim's 'tabstop'
|
||||
must match "ChkTeX"'s idea of tabstop, otherwise column numbers will be
|
||||
shifted. At the time of this writing, "ChkTeX"'s tabstop is hardcoded to 8,
|
||||
so you should probably add something like this to your vimrc: >
|
||||
set tabstop=8
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
2. lacheck *syntastic-tex-lacheck*
|
||||
|
||||
@ -6726,7 +6739,8 @@ as "typescript-vim":
|
||||
|
||||
https://github.com/leafgarland/typescript-vim
|
||||
|
||||
See also: |syntastic-html-eslint|, |syntastic-javascript-eslint|.
|
||||
See also: |syntastic-html-eslint|, |syntastic-javascript-eslint|,
|
||||
|syntastic-vue-eslint|.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
2. TSLint *syntastic-typescript-tslint*
|
||||
@ -7026,6 +7040,72 @@ 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 VUE.JS *syntastic-checkers-vue*
|
||||
|
||||
The following checkers are available for Vue.js (filetype "vue"):
|
||||
|
||||
1. ESLint...................|syntastic-vue-eslint|
|
||||
2. pug_lint_vue.............|syntastic-vue-pug_lint_vue|
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
1. ESLint *syntastic-vue-eslint*
|
||||
|
||||
Name: eslint
|
||||
Maintainer: LCD 47 <lcd047@gmail.com>
|
||||
|
||||
"ESLint" is a tool for identifying and reporting on patterns found in
|
||||
ECMAScript/JavaScript code. It can also detect problems in JavaScript
|
||||
components of Vue.js files. See the project's page for details:
|
||||
|
||||
https://github.com/nzakas/eslint
|
||||
|
||||
Checker options~
|
||||
|
||||
This checker is initialised using the "makeprgBuild()" function and thus it
|
||||
accepts the standard options described at |syntastic-config-makeprg|.
|
||||
|
||||
Notes~
|
||||
|
||||
Automatically fixing errors (option "--fix") is not supported.
|
||||
|
||||
You can also use "eslint_d" (https://github.com/mantoni/eslint_d.js), version
|
||||
2.1.0 or later, instead of "ESLint". Just point 'g:syntastic_vue_eslint_exec'
|
||||
to it:
|
||||
|
||||
https://github.com/mantoni/eslint_d.js#editor-integration
|
||||
|
||||
See also: |syntastic-html-eslint|, |syntastic-javascript-eslint|,
|
||||
|syntastic-typescript-eslint|.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
2. pug_lint_vue *syntastic-vue-pug_lint_vue*
|
||||
|
||||
Name: pug_lint_vue
|
||||
Maintainer: Tim Carry <tim@pixelastic.com>
|
||||
|
||||
"pug-lint-vue" is a linter for Pug templates inside of Vue.js components. See
|
||||
the project's page at GitHub for details:
|
||||
|
||||
https://github.com/sourceboat/pug-lint-vue
|
||||
|
||||
Installation~
|
||||
|
||||
Install it with: >
|
||||
npm install -g pug-lint-vue
|
||||
<
|
||||
Checker options~
|
||||
|
||||
This checker is initialised using the "makeprgBuild()" function and thus it
|
||||
accepts the standard options described at |syntastic-config-makeprg|.
|
||||
|
||||
Note~
|
||||
|
||||
You probably also need a plugin to set |filetype| for Vue.js files, such as
|
||||
"vim-vue":
|
||||
|
||||
https://github.com/posva/vim-vue
|
||||
|
||||
==============================================================================
|
||||
SYNTAX CHECKERS FOR XHTML *syntastic-checkers-xhtml*
|
||||
|
||||
|
@ -1015,11 +1015,18 @@ also affect window sizes.)
|
||||
7.1. airline *syntastic-airline*
|
||||
|
||||
The "airline" Vim plugin (https://github.com/vim-airline/vim-airline) comes
|
||||
packaged with a mechanism of showing flags on the |'statusline'| according
|
||||
to your |'syntastic_stl_format'|. When using this plugin you do NOT need to
|
||||
follow the recommendation outlined in the |syntastic-statusline-flag| section
|
||||
above to modify your |'statusline'|; "airline" will make all necessary changes
|
||||
automatically.
|
||||
with an extension for showing syntastic-related flags on the |'statusline'|.
|
||||
|
||||
"airline" versions v0.8 and earlier use |'syntastic_stl_format'| to format the
|
||||
|'statusline'| flags. Newer versions ignore |'syntastic_stl_format'|, and require
|
||||
you to set variables 'airline#extensions#syntastic#stl_format_err' and
|
||||
'airline#extensions#syntastic#stl_format_warn' separately for errors and
|
||||
warnings (with the same syntax as |'syntastic_stl_format'|) if you want to
|
||||
change the flags from the defaults.
|
||||
|
||||
When using "airline" you should NOT follow the recommendation outlined in
|
||||
the |syntastic-statusline-flag| section above to modify your |'statusline'|.
|
||||
"airline" shall make all necessary changes automatically.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
7.2. The csh and tcsh shells *syntastic-csh*
|
||||
|
@ -19,7 +19,7 @@ if has('reltime')
|
||||
lockvar! g:_SYNTASTIC_START
|
||||
endif
|
||||
|
||||
let g:_SYNTASTIC_VERSION = '3.8.0-63'
|
||||
let g:_SYNTASTIC_VERSION = '3.8.0-73'
|
||||
lockvar g:_SYNTASTIC_VERSION
|
||||
|
||||
" Sanity checks {{{1
|
||||
|
@ -103,6 +103,7 @@ let s:_DEFAULT_CHECKERS = {
|
||||
\ 'verilog': ['verilator'],
|
||||
\ 'vhdl': ['ghdl'],
|
||||
\ 'vim': ['vimlint'],
|
||||
\ 'vue': ['pug_lint_vue', 'eslint'],
|
||||
\ 'xhtml': ['tidy'],
|
||||
\ 'xml': ['xmllint'],
|
||||
\ 'xslt': ['xmllint'],
|
||||
|
@ -23,7 +23,9 @@ function! SyntaxCheckers_python_flake8_GetLocList() dict
|
||||
|
||||
let errorformat =
|
||||
\ '%E%f:%l: could not compile,%-Z%p^,' .
|
||||
\ '%A%f:%l:%c: %t%n: %m,' .
|
||||
\ '%A%f:%l:%c: %t%n %m,' .
|
||||
\ '%A%f:%l: %t%n: %m,' .
|
||||
\ '%A%f:%l: %t%n %m,' .
|
||||
\ '%-G%.%#'
|
||||
|
||||
@ -39,6 +41,7 @@ function! SyntaxCheckers_python_flake8_GetLocList() dict
|
||||
" F*** are PyFlakes codes
|
||||
" C*** are McCabe complexity messages
|
||||
" N*** are naming conventions from pep8-naming
|
||||
" H*** are OpenStack messages
|
||||
|
||||
if has_key(e, 'nr')
|
||||
let e['text'] .= printf(' [%s%03d]', e['type'], e['nr'])
|
||||
@ -50,11 +53,11 @@ function! SyntaxCheckers_python_flake8_GetLocList() dict
|
||||
call remove(e, 'nr')
|
||||
endif
|
||||
|
||||
if e['type'] =~? '\m^[CNW]'
|
||||
if e['type'] =~? '\m^[CHNW]'
|
||||
let e['subtype'] = 'Style'
|
||||
endif
|
||||
|
||||
let e['type'] = e['type'] =~? '\m^[EFC]' ? 'E' : 'W'
|
||||
let e['type'] = e['type'] =~? '\m^[EFHC]' ? 'E' : 'W'
|
||||
endfor
|
||||
|
||||
return loclist
|
||||
|
@ -27,12 +27,12 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_tex_chktex_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '-q -v1' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': ['-q', '-f', "%k:%n:%f:%l:%c:%m\n"] })
|
||||
|
||||
let errorformat =
|
||||
\ '%EError %n in %f line %l: %m,' .
|
||||
\ '%WWarning %n in %f line %l: %m,' .
|
||||
\ (g:syntastic_tex_chktex_showmsgs ? '%WMessage %n in %f line %l: %m,' : '') .
|
||||
\ '%EError:%n:%f:%l:%v:%m,' .
|
||||
\ '%WWarning:%n:%f:%l:%v:%m,' .
|
||||
\ (g:syntastic_tex_chktex_showmsgs ? '%WMessage:%n:%f:%l:%v:%m,' : '') .
|
||||
\ '%Z%p^,' .
|
||||
\ '%-G%.%#'
|
||||
|
||||
|
23
sources_non_forked/syntastic/syntax_checkers/vue/eslint.vim
Normal file
23
sources_non_forked/syntastic/syntax_checkers/vue/eslint.vim
Normal file
@ -0,0 +1,23 @@
|
||||
"============================================================================
|
||||
"File: eslint.vim
|
||||
"Description: Syntax checking plugin for syntastic
|
||||
"Maintainer: LCD 47 <lcd047 at gmail dot com>
|
||||
"License: This program is free software. It comes without any warranty,
|
||||
" to the extent permitted by applicable law. You can redistribute
|
||||
" it and/or modify it under the terms of the Do What The Fuck You
|
||||
" Want To Public License, Version 2, as published by Sam Hocevar.
|
||||
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
if exists('g:loaded_syntastic_vue_eslint_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_vue_eslint_checker = 1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'vue',
|
||||
\ 'name': 'eslint',
|
||||
\ 'redirect': 'javascript/eslint'})
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
@ -0,0 +1,42 @@
|
||||
"============================================================================
|
||||
"File: pug_lint_vue.vim
|
||||
"Description: Syntax checking plugin for syntastic using pug-lint-vue
|
||||
" (https://github.com/sourceboat/pug-lint-vue)
|
||||
"Maintainer: Tim Carry <tim at pixelastic 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_vue_pug_lint_vue_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_vue_pug_lint_vue_checker = 1
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_vue_pug_lint_vue_GetLocList() dict
|
||||
let buf = bufnr('')
|
||||
let makeprg = self.makeprgBuild({ 'fname': syntastic#util#shescape(fnamemodify(bufname(buf), ':p')) })
|
||||
|
||||
let errorformat = '%\s%#%l:%c %m'
|
||||
|
||||
return SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'defaults': { 'bufnr': buf, 'type': 'E' } })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'vue',
|
||||
\ 'name': 'pug_lint_vue',
|
||||
\ 'exec': 'pug-lint-vue' })
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
Reference in New Issue
Block a user