File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,16 @@ class BlackProcess {
1111 const maxLineLength =
1212 nova . workspace . config . get ( "is.flother.Blake.maxLineLength" ) ??
1313 nova . config . get ( "is.flother.Blake.maxLineLength" ) ;
14+ const previewStyle =
15+ nova . workspace . config . get ( "is.flother.Blake.blackPreviewStyle" ) ||
16+ nova . config . get ( "is.flother.Blake.blackPreviewStyle" ) ;
1417 let commandArguments = [ "--quiet" , "-" ] ;
1518 if ( maxLineLength ) {
1619 commandArguments = [ "--line-length" , maxLineLength . toString ( ) , ...commandArguments ] ;
1720 }
21+ if ( previewStyle ) {
22+ commandArguments = [ "--preview" , ...commandArguments ] ;
23+ }
1824 if ( ! blackPath ) {
1925 blackPath = "/usr/bin/env" ;
2026 commandArguments = [ "black" , ...commandArguments ] ;
Original file line number Diff line number Diff line change 4141 "title" : " Format Python source code files on save" ,
4242 "type" : " boolean" ,
4343 "default" : false
44+ },
45+ {
46+ "key" : " is.flother.Blake.blackPreviewStyle" ,
47+ "title" : " Enable preview style" ,
48+ "description" : " Include experimental style changes" ,
49+ "link" : " https://black.readthedocs.io/en/stable/the_black_code_style/future_style.html#preview-style" ,
50+ "type" : " boolean" ,
51+ "default" : false
4452 }
4553 ]
4654 }
You can’t perform that action at this time.
0 commit comments