mirror of
https://github.com/dense-analysis/ale.git
synced 2026-05-19 14:59:55 +08:00
new fixer elixir mix format
(only available in elixir > 1.6)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
" Author: carakan <carakan@gmail.com>
|
||||
" Description: Fixing files with elixir formatter 'mix format'.
|
||||
|
||||
call ale#Set('elixir_mix_executable', 'mix')
|
||||
|
||||
function! ale#fixers#mix_format#GetExecutable(buffer) abort
|
||||
return ale#Var(a:buffer, 'elixir_mix_executable')
|
||||
endfunction
|
||||
|
||||
function! ale#fixers#mix_format#Fix(buffer) abort
|
||||
return {
|
||||
\ 'command': ale#handlers#elixir#GetExecutable(a:buffer)
|
||||
\ . ale#fixers#mix_format#GetExecutable(a:buffer)
|
||||
\ . ' format %t',
|
||||
\ 'read_temporary_file': 1,
|
||||
\}
|
||||
endfunction
|
||||
Reference in New Issue
Block a user