@@ -31,7 +31,7 @@ function formatEditorWithSelection (editor, selection) {
31
31
32
32
function formatEditorTextInRange ( editor , range , text ) {
33
33
const marker = markRange ( editor , range )
34
- // @ NOTE : Branch on `getSoftTabs` if supported by formatter.
34
+ // NOTE: Branch on `getSoftTabs` if supported by formatter.
35
35
let indent = atom . config . get ( 'julia-client.juliaOptions.formattingOptions.indent' )
36
36
if ( indent === - 1 ) indent = editor . getTabLength ( )
37
37
let margin = atom . config . get ( 'julia-client.juliaOptions.formattingOptions.margin' )
@@ -40,10 +40,20 @@ function formatEditorTextInRange (editor, range, text) {
40
40
text,
41
41
indent,
42
42
margin,
43
+
44
+ // TODO:
45
+ // maintaining those lists are not so fun;
46
+ // do https://github.com/domluna/JuliaFormatter.jl/issues/184 and switch to respect a project configuration,
47
+ // then we will be able to leave each user to set those configurations
43
48
always_for_in : atom . config . get ( 'julia-client.juliaOptions.formattingOptions.always_for_in' ) ,
44
49
whitespace_typedefs : atom . config . get ( 'julia-client.juliaOptions.formattingOptions.whitespace_typedefs' ) ,
45
50
whitespace_ops_in_indices : atom . config . get ( 'julia-client.juliaOptions.formattingOptions.whitespace_ops_in_indices' ) ,
46
- remove_extra_newlines : atom . config . get ( 'julia-client.juliaOptions.formattingOptions.remove_extra_newlines' )
51
+ remove_extra_newlines : atom . config . get ( 'julia-client.juliaOptions.formattingOptions.remove_extra_newlines' ) ,
52
+ import_to_using : atom . config . get ( 'julia-client.juliaOptions.formattingOptions.import_to_using' ) ,
53
+ pipe_to_function_call : atom . config . get ( 'julia-client.juliaOptions.formattingOptions.pipe_to_function_call' ) ,
54
+ short_to_long_function_def : atom . config . get ( 'julia-client.juliaOptions.formattingOptions.short_to_long_function_def' ) ,
55
+ always_use_return : atom . config . get ( 'julia-client.juliaOptions.formattingOptions.always_use_return' ) ,
56
+ use_YAS_style : atom . config . get ( 'julia-client.juliaOptions.formattingOptions.use_YAS_style' ) ,
47
57
} ) . then ( ( { error, formattedtext } ) => {
48
58
if ( error ) {
49
59
atom . notifications . addError ( 'Julia-Client: Format-Code' , {
0 commit comments