Files
ale/ale_linters/text/vale.vim
2026-02-07 17:23:48 +09:00

23 lines
622 B
VimL

" Author: chew-z https://github.com/chew-z
" Description: vale for text files
call ale#Set('vale_executable', 'vale')
call ale#Set('vale_options', '')
function! ale_linters#text#vale#GetCommand(buffer) abort
let l:executable = ale#Var(a:buffer, 'vale_executable')
let l:options = ale#Var(a:buffer, 'vale_options')
return ale#Escape(l:executable)
\ . ale#Pad(l:options)
\ . ' --output=JSON %t'
endfunction
call ale#linter#Define('text', {
\ 'name': 'vale',
\ 'executable': 'vale',
\ 'command': function('ale_linters#text#vale#GetCommand'),
\ 'callback': 'ale#handlers#vale#Handle',
\})