Files
ale/autoload/ale/fixers/roc_annotate.vim
Benjamin Block f9de268816 Adding Roc language linters and fixers. (#4966)
* `roc_language_server`

* `roc format`

* `roc format annotate`
2025-05-05 15:01:45 +09:00

22 lines
642 B
VimL

" Author: Benjamin Block <https://github.com/benjamindblock>
" Description: Official type annotation tool for Roc.
call ale#Set('roc_roc_annotate_executable', 'roc')
call ale#Set('roc_roc_annotate_options', '')
function! ale#fixers#roc_annotate#Fix(buffer) abort
let l:executable = ale#Var(a:buffer, 'roc_roc_annotate_executable')
let l:command = l:executable . ' format annotate'
let l:options = ale#Var(a:buffer, 'roc_roc_annotate_options')
if l:options isnot# ''
let l:command .= ' ' . l:options
endif
return {
\ 'command': l:command . ' %t',
\ 'read_temporary_file': 1,
\}
endfunction