mirror of
https://github.com/dense-analysis/ale.git
synced 2026-11-19 02:01:03 +08:00
* update to lates Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com> * fix up docs Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com> * fix docs Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com> * get tests passing Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com> * update regex Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com> * use ale#Pad and AssertFixer Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>
19 lines
625 B
VimL
19 lines
625 B
VimL
" Authors: Trevor Whitney <trevorjwhitney@gmail.com> and Takuya Kosugiyama <re@itkq.jp>
|
|
" Description: Integration of jsonnetfmt with ALE.
|
|
|
|
call ale#Set('jsonnet_jsonnetfmt_executable', 'jsonnetfmt')
|
|
call ale#Set('jsonnet_jsonnetfmt_options', '')
|
|
|
|
function! ale#fixers#jsonnetfmt#Fix(buffer) abort
|
|
let l:executable = ale#Var(a:buffer, 'jsonnet_jsonnetfmt_executable')
|
|
let l:options = ale#Var(a:buffer, 'jsonnet_jsonnetfmt_options')
|
|
|
|
return {
|
|
\ 'command': ale#Escape(l:executable)
|
|
\ . ' -i'
|
|
\ . ale#Pad(l:options)
|
|
\ . ' %t',
|
|
\ 'read_temporary_file': 1,
|
|
\}
|
|
endfunction
|