mirror of
https://github.com/dense-analysis/ale.git
synced 2026-09-19 10:13:12 +08:00
* fix(tests): fix ale_c_build_dir_names being unset in tests (#5109) - Use ale#Set() to set the ale_c_build_dir_names variable. - Ensure SetUpLinterTest() is called before any Save commands in tests. - Add c.vim to runtime before non-linter tests are executed. - Remove workarounds in c.vim. * feat: Load Prettier from cjs also * fix: wrong command for markdownlint * feat: explicit support for markdownlint-cli2 - Add markdownlint-cli2 linter and fixer, separate from markdownilnt-cli - Rename markdownlint to markdownlint-cli - Keep markdownlint as alias for markdownlint-cli --------- Co-authored-by: w0rp <devw0rp@gmail.com> Co-authored-by: Horacio Sanson <horacio.sanson@dena.jp>
30 lines
968 B
VimL
30 lines
968 B
VimL
" Author: Horacio Sanson
|
|
" Description: Adds support for markdownlint-cli2
|
|
|
|
call ale#Set('markdown_markdownlint_cli2_executable', 'markdownlint-cli2')
|
|
call ale#Set('markdown_markdownlint_cli2_options', '')
|
|
|
|
function! ale_linters#markdown#markdownlint_cli2#GetExecutable(buffer) abort
|
|
return ale#handlers#markdownlint#GetExecutable(
|
|
\ a:buffer,
|
|
\ 'markdownlint_cli2',
|
|
\)
|
|
endfunction
|
|
|
|
function! ale_linters#markdown#markdownlint_cli2#GetCommand(buffer) abort
|
|
return ale#handlers#markdownlint#GetCommand(
|
|
\ a:buffer,
|
|
\ 'markdownlint_cli2',
|
|
\)
|
|
endfunction
|
|
|
|
call ale#linter#Define('markdown', {
|
|
\ 'name': 'markdownlint_cli2',
|
|
\ 'aliases': ['markdownlint-cli2'],
|
|
\ 'executable': function('ale_linters#markdown#markdownlint_cli2#GetExecutable'),
|
|
\ 'lint_file': 1,
|
|
\ 'output_stream': 'both',
|
|
\ 'command': function('ale_linters#markdown#markdownlint_cli2#GetCommand'),
|
|
\ 'callback': 'ale#handlers#markdownlint#Handle',
|
|
\})
|