Add raco_fmt fixer for Racket files (#4354)

* Add raco_fmt fixer for Racket files

* Fix command and add test

* Fix quoting
This commit is contained in:
Jeremy Cantrell authored and GitHub committed 2022-11-07 22:20:25 +09:00
1 parent edffffac25
commit 4b433e5693
5 files changed
+39

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
" Author: Jeremy Cantrell <jmcantrell@gmail.com>
" Description: Integration of raco fmt with ALE.
call ale#Set('racket_raco_fmt_executable', 'raco')
call ale#Set('racket_raco_fmt_options', '')
function! ale#fixers#raco_fmt#Fix(buffer) abort
let l:executable = ale#Var(a:buffer, 'racket_raco_fmt_executable')
let l:options = ale#Var(a:buffer, 'racket_raco_fmt_options')
return {
\ 'command': ale#Escape(l:executable) . ' fmt'
\ . (empty(l:options) ? '' : ' ' . l:options),
\}
endfunction