File tree Expand file tree Collapse file tree 3 files changed +37
-0
lines changed
Expand file tree Collapse file tree 3 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -752,6 +752,11 @@ let s:default_registry = {
752752\ ' suggested_filetypes' : [' verilog' ],
753753\ ' description' : ' Formats verilog files using verible.' ,
754754\ },
755+ \ ' markdownlint' : {
756+ \ ' function' : ' ale#fixers#markdownlint#Fix' ,
757+ \ ' suggested_filetypes' : [' markdown' ],
758+ \ ' description' : ' Fix markdown files with markdownlint.' ,
759+ \ },
755760\}
756761
757762" Reset the function registry to the default entries.
Original file line number Diff line number Diff line change 1+ :scriptencoding utf- 8
2+
3+ call ale#Set (' markdownlint_executable' , ' markdownlint' )
4+ call ale#Set (' markdownlint_options' , ' --fix' )
5+
6+ function ! ale#fixers#markdownlint#Fix (buffer ) abort
7+ let l: executable = ale#Var (a: buffer , ' markdownlint_executable' )
8+ let l: options = ale#Var (a: buffer , ' markdownlint_options' )
9+
10+ return {
11+ \ ' command' : ale#Escape (l: executable )
12+ \ . ' ' . l: options ,
13+ \}
14+ endfunction
15+
Original file line number Diff line number Diff line change 1+ Before:
2+ call ale#assert#SetUpFixerTest('markdown', 'markdownlint')
3+
4+ After:
5+ call ale#assert#TearDownFixerTest()
6+
7+ Execute:
8+ AssertFixer {
9+ \ 'command': ale#Escape('markdownlint') . ' --fix',
10+ \}
11+
12+ Execute:
13+ let g:ale_markdownlint_executable = 'custom_markdownlint'
14+
15+ AssertFixer {
16+ \ 'command': ale#Escape('custom_markdownlint') . ' --fix',
17+ \}
You can’t perform that action at this time.
0 commit comments