@ -767,6 +767,21 @@ void Source::View::setup_format_style(bool is_generic_view) {
shown = true ;
shown = true ;
}
}
if ( ! prettier . empty ( ) & & ! prefer_prettier ) {
auto search_path = file_path . parent_path ( ) ;
auto file = " .prettier- " + language_id ;
while ( true ) {
boost : : system : : error_code ec ;
if ( boost : : filesystem : : exists ( search_path / file , ec ) ) {
prefer_prettier = true ;
break ;
}
if ( search_path = = search_path . root_directory ( ) )
break ;
search_path = search_path . parent_path ( ) ;
}
}
if ( ! prettier . empty ( ) & & prefer_prettier ) {
if ( ! prettier . empty ( ) & & prefer_prettier ) {
if ( is_generic_view ) {
if ( is_generic_view ) {
goto_next_diagnostic = [ this ] {
goto_next_diagnostic = [ this ] {