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(
19
19
let client_id = config_manager. client_config . client_id ;
20
20
21
21
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
+
24
28
if !syntax_tree. get_errors ( ) . is_empty ( ) {
25
29
return None ;
26
30
}
27
31
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) ?;
29
37
let text = document. get_text ( ) ;
30
38
let file_path = document. get_file_path ( ) ;
31
39
let normalized_path = file_path. to_string_lossy ( ) . to_string ( ) . replace ( "\\ " , "/" ) ;
You can’t perform that action at this time.
0 commit comments