1
0
Fork 0
mirror of synced 2024-06-01 06:51:09 -04:00
ultimate-vim/sources_non_forked/ale/autoload/ale/fixers/styler.vim
Amir Salihefendic fae0b73f0d Updated plugins
2019-05-17 16:09:13 +02:00

17 lines
546 B
VimL

" Author: tvatter <thibault.vatter@gmail.com>
" Description: Fixing R files with styler.
call ale#Set('r_styler_executable', 'Rscript')
call ale#Set('r_styler_options', 'tidyverse_style')
function! ale#fixers#styler#Fix(buffer) abort
return {
\ 'command': 'Rscript --vanilla -e '
\ . '"suppressPackageStartupMessages(library(styler));'
\ . 'style_file(commandArgs(TRUE), style = '
\ . ale#Var(a:buffer, 'r_styler_options') . ')"'
\ . ' %t',
\ 'read_temporary_file': 1,
\}
endfunction