Skip to content

Commit b3b20f0

Browse files
committed
Fix format
1 parent f764b0c commit b3b20f0

File tree

1 file changed

+11
-3
lines changed
  • crates/emmylua_ls/src/handlers/document_formatting

1 file changed

+11
-3
lines changed

crates/emmylua_ls/src/handlers/document_formatting/mod.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff 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("\\", "/");

0 commit comments

Comments
 (0)