1
0
Fork 0
mirror of synced 2024-12-25 08:13:20 -05:00
ultimate-vim/sources_non_forked/ale/ale_linters/markdown/markdownlint.vim

23 lines
713 B
VimL
Raw Normal View History

" Author: Ty-Lucas Kelley <tylucaskelley@gmail.com>
" Description: Adds support for markdownlint
2020-12-04 16:15:32 -05:00
call ale#Set('markdown_markdownlint_options', '')
function! ale_linters#markdown#markdownlint#GetCommand(buffer) abort
let l:executable = 'markdownlint'
let l:options = ale#Var(a:buffer, 'markdown_markdownlint_options')
return ale#Escape(l:executable)
\ . (!empty(l:options) ? ' ' . l:options : '') . ' %s'
endfunction
call ale#linter#Define('markdown', {
2019-03-08 06:04:56 -05:00
\ 'name': 'markdownlint',
\ 'executable': 'markdownlint',
\ 'lint_file': 1,
\ 'output_stream': 'both',
2020-12-04 16:15:32 -05:00
\ 'command': function('ale_linters#markdown#markdownlint#GetCommand'),
2019-03-08 06:04:56 -05:00
\ 'callback': 'ale#handlers#markdownlint#Handle'
\})