don't format files with syntax errors (#766)
* don't format files with syntax errors * Remove showMessage Co-authored-by: Auguste Rame <19855629+SuperAuguste@users.noreply.github.com>
This commit is contained in:
parent
40167a5b52
commit
f09ffb63db
@ -2098,6 +2098,10 @@ fn formattingHandler(server: *Server, writer: anytype, id: types.RequestId, req:
|
||||
return try respondGeneric(writer, id, null_result_response);
|
||||
};
|
||||
|
||||
if (handle.tree.errors.len != 0) {
|
||||
return try respondGeneric(writer, id, null_result_response);
|
||||
}
|
||||
|
||||
const formatted = try handle.tree.render(server.allocator);
|
||||
defer server.allocator.free(formatted);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user