File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
crates/emmylua_ls/src/handlers/document_formatting Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -19,13 +19,21 @@ pub async fn on_formatting_handler(
1919 let client_id = config_manager. client_config . client_id ;
2020
2121 let file_id = analysis. get_file_id ( & uri) ?;
22- let syntax_tree = analysis. compilation . get_db ( ) . get_vfs ( ) . get_syntax_tree ( & file_id) ?;
23-
22+ let syntax_tree = analysis
23+ . compilation
24+ . get_db ( )
25+ . get_vfs ( )
26+ . get_syntax_tree ( & file_id) ?;
27+
2428 if !syntax_tree. get_errors ( ) . is_empty ( ) {
2529 return None ;
2630 }
2731
28- let document = analysis. compilation . get_db ( ) . get_vfs ( ) . get_document ( & file_id) ?;
32+ let document = analysis
33+ . compilation
34+ . get_db ( )
35+ . get_vfs ( )
36+ . get_document ( & file_id) ?;
2937 let text = document. get_text ( ) ;
3038 let file_path = document. get_file_path ( ) ;
3139 let normalized_path = file_path. to_string_lossy ( ) . to_string ( ) . replace ( "\\ " , "/" ) ;
You can’t perform that action at this time.
0 commit comments