1
0
mirror of https://github.com/amix/vimrc synced 2025-07-01 12:45:00 +08:00

Updated plugins

This commit is contained in:
Amir
2021-08-04 15:52:11 +02:00
parent ab92a1d4f5
commit b3698e4d38
63 changed files with 5414 additions and 2901 deletions

View File

@ -73,7 +73,7 @@ endfunction
function! ale_linters#ansible#ansible_lint#GetCommand(buffer, version) abort
let l:commands = {
\ '>=5.0.0': '%e --nocolor --parseable-severity -x yaml -',
\ '>=5.0.0': '%e --nocolor --parseable-severity -x yaml %s',
\ '<5.0.0': '%e --nocolor -p %t'
\}
let l:command = ale#semver#GTE(a:version, [5, 0]) ? l:commands['>=5.0.0'] : l:commands['<5.0.0']
@ -91,6 +91,7 @@ call ale#linter#Define('ansible', {
\ '%e --version',
\ function('ale_linters#ansible#ansible_lint#GetCommand'),
\ )},
\ 'lint_file': 1,
\ 'callback': {buffer, lines -> ale#semver#RunWithVersionCheck(
\ buffer,
\ ale_linters#ansible#ansible_lint#GetExecutable(buffer),

View File

@ -0,0 +1,46 @@
" Author: Jon Parise <jon@indelible.org>
call ale#Set('thrift_thriftcheck_executable', 'thriftcheck')
call ale#Set('thrift_thriftcheck_options', '')
function! ale_linters#thrift#thriftcheck#GetCommand(buffer) abort
return '%e'
\ . ale#Pad(ale#Var(a:buffer, 'thrift_thriftcheck_options'))
\ . ' --stdin-filename %s'
\ . ' %t'
endfunction
function! ale_linters#thrift#thriftcheck#Handle(buffer, lines) abort
" Matches lines like the following:
"
" file.thrift:1:1:error: "py" namespace must match "^idl\\." (namespace.pattern)
" file.thrift:3:5:warning: 64-bit integer constant -2147483649 may not work in all languages (int.64bit)
let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+):(\d+):(\l+): (.*) \((.*)\)$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
if l:match[3] is# 'warning'
let l:type = 'W'
else
let l:type = 'E'
endif
call add(l:output, {
\ 'lnum': l:match[1] + 0,
\ 'col': l:match[2] + 0,
\ 'type': l:type,
\ 'text': l:match[4],
\ 'code': l:match[5],
\})
endfor
return l:output
endfunction
call ale#linter#Define('thrift', {
\ 'name': 'thriftcheck',
\ 'executable': {b -> ale#Var(b, 'thrift_thriftcheck_executable')},
\ 'command': function('ale_linters#thrift#thriftcheck#GetCommand'),
\ 'callback': 'ale_linters#thrift#thriftcheck#Handle',
\})

View File

@ -533,6 +533,7 @@ Notes:
* `write-good`
* Thrift
* `thrift`
* `thriftcheck`
* TypeScript
* `deno`
* `eslint`

View File

@ -42,5 +42,24 @@ g:ale_thrift_thrift_options *g:ale_thrift_thrift_options*
This variable can be changed to customize the additional command-line
arguments that are passed to the thrift compiler.
===============================================================================
thriftcheck *ale-thrift-thriftcheck*
g:ale_thrift_thriftcheck_executable *g:ale_thrift_thriftcheck_executable*
*b:ale_thrift_thriftcheck_executable*
Type: |String|
Default: `'thriftcheck'`
See |ale-integrations-local-executables|
g:ale_thrift_thriftcheck_options *g:ale_thrift_thriftcheck_options*
*b:ale_thrift_thriftcheck_options*
Type: |String|
Default: `''`
This variable can be changed to customize the additional command-line
arguments that are passed to thriftcheck.
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@ -460,7 +460,7 @@ integration should not be combined with ALE's own implementation.
ALE additionally integrates with asyncomplete.vim for offering automatic
completion data. ALE's asyncomplete source requires registration and should
use the defaults provided by the|asyncomplete#sources#ale#get_source_options| function >
use the defaults provided by the |asyncomplete#sources#ale#get_source_options| function >
" Use ALE's function for asyncomplete defaults
au User asyncomplete_setup call asyncomplete#register_source(asyncomplete#sources#ale#get_source_options({
@ -3053,6 +3053,7 @@ documented in additional help files.
write-good............................|ale-text-write-good|
thrift..................................|ale-thrift-options|
thrift................................|ale-thrift-thrift|
thriftcheck...........................|ale-thrift-thriftcheck|
typescript..............................|ale-typescript-options|
deno..................................|ale-typescript-deno|
eslint................................|ale-typescript-eslint|

View File

@ -270,7 +270,7 @@ formatting.
* JSON
* [fixjson](https://github.com/rhysd/fixjson)
* [jq](https://stedolan.github.io/jq/)
* [jsonlint](http://zaa.ch/jsonlint/)
* [jsonlint](https://github.com/zaach/jsonlint)
* [prettier](https://github.com/prettier/prettier)
* [spectral](https://github.com/stoplightio/spectral)
* Julia
@ -542,6 +542,7 @@ formatting.
* [write-good](https://github.com/btford/write-good) :warning:
* Thrift
* [thrift](http://thrift.apache.org/)
* [thriftcheck](https://github.com/pinterest/thriftcheck)
* TypeScript
* [deno](https://deno.land/)
* [eslint](http://eslint.org/)