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

Removed syntastic and replaced it with ale

Read more here:
https://github.com/w0rp/ale
This commit is contained in:
Amir Salihefendic
2018-03-31 11:55:20 -03:00
parent 37297ddae6
commit 7c643a2d9c
679 changed files with 23508 additions and 27895 deletions

View File

@ -0,0 +1,11 @@
" Author: Johannes Wienke <languitar@semipol.de>
" Description: alex for rst files
call ale#linter#Define('rst', {
\ 'name': 'alex',
\ 'executable': 'alex',
\ 'command': 'alex %s -t',
\ 'output_stream': 'stderr',
\ 'callback': 'ale#handlers#alex#Handle',
\ 'lint_file': 1,
\})

View File

@ -0,0 +1,9 @@
" Author: Daniel M. Capella https://github.com/polyzen
" Description: proselint for reStructuredText files
call ale#linter#Define('rst', {
\ 'name': 'proselint',
\ 'executable': 'proselint',
\ 'command': 'proselint %t',
\ 'callback': 'ale#handlers#unix#HandleAsWarning',
\})

View File

@ -0,0 +1,9 @@
" Author: rhysd https://rhysd.github.io
" Description: Redpen, a proofreading tool (http://redpen.cc)
call ale#linter#Define('rst', {
\ 'name': 'redpen',
\ 'executable': 'redpen',
\ 'command': 'redpen -f rest -r json %t',
\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput',
\})

View File

@ -0,0 +1,37 @@
" Author: John Nduli https://github.com/jnduli
" Description: Rstcheck for reStructuredText files
"
function! ale_linters#rst#rstcheck#Handle(buffer, lines) abort
" matches: 'bad_rst.rst:1: (SEVERE/4) Title overline & underline
" mismatch.'
let l:pattern = '\v^(.+):(\d*): \(([a-zA-Z]*)/\d*\) (.+)$'
let l:dir = expand('#' . a:buffer . ':p:h')
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
call add(l:output, {
\ 'filename': ale#path#GetAbsPath(l:dir, l:match[1]),
\ 'lnum': l:match[2] + 0,
\ 'col': 0,
\ 'type': l:match[3] is# 'SEVERE' ? 'E' : 'W',
\ 'text': l:match[4],
\})
endfor
return l:output
endfunction
function! ale_linters#rst#rstcheck#GetCommand(buffer) abort
return ale#path#BufferCdString(a:buffer)
\ . 'rstcheck'
\ . ' %t'
endfunction
call ale#linter#Define('rst', {
\ 'name': 'rstcheck',
\ 'executable': 'rstcheck',
\ 'command_callback': 'ale_linters#rst#rstcheck#GetCommand',
\ 'callback': 'ale_linters#rst#rstcheck#Handle',
\ 'output_stream': 'both',
\})

View File

@ -0,0 +1,9 @@
" Author: chew-z https://github.com/chew-z
" Description: vale for RST files
call ale#linter#Define('rst', {
\ 'name': 'vale',
\ 'executable': 'vale',
\ 'command': 'vale --output=JSON %t',
\ 'callback': 'ale#handlers#vale#Handle',
\})

View File

@ -0,0 +1,9 @@
" Author: Sumner Evans <sumner.evans98@gmail.com>
" Description: write-good for reStructuredText files
call ale#linter#Define('rst', {
\ 'name': 'write-good',
\ 'executable_callback': 'ale#handlers#writegood#GetExecutable',
\ 'command_callback': 'ale#handlers#writegood#GetCommand',
\ 'callback': 'ale#handlers#writegood#Handle',
\})